Skip to content

Commit

Permalink
Cleanup comments
Browse files Browse the repository at this point in the history
  • Loading branch information
xavikh committed Dec 11, 2024
1 parent c604641 commit 2bd0c19
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions test/escrow/curve/QuadraticCurveMath.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ contract TestQuadraticIncreasingCurve is QuadraticCurveBase {
function test_votingPowerComputesCorrect() public {
/**
Period Result
1 1
2 1.428571429
3 2.142857143
4 3.142857143
5 4.428571429
6 6
0 1
1 2
2 3
3 4
4 5
5 6
*/
uint256 amount = 100e18;

Expand Down Expand Up @@ -104,17 +104,13 @@ contract TestQuadraticIncreasingCurve is QuadraticCurveBase {
// warmup complete
vm.warp(block.timestamp + 1);

// python: 449.206279554928541696
// solmate (optimized): 449.206254284606635135
assertEq(
curve.votingPowerAt(tokenIdFirst, block.timestamp),
510838204935452985628,
"Balance incorrect after warmup"
);
assertEq(curve.isWarm(tokenIdFirst), true, "Still warming up");

// python: 1067784543380942056100724736
// solmate: 1067784483312193385000000000
assertEq(
curve.votingPowerAt(tokenIdSecond, block.timestamp),
1214286541005141519000000000,
Expand All @@ -123,11 +119,6 @@ contract TestQuadraticIncreasingCurve is QuadraticCurveBase {

// warp to the start of period 2
vm.warp(start + clock.epochDuration());
// excel: 600.985714300000000000
// PRB: 600.985163959347100568
// solmate: 600.985163959347101852
// python : 600.985714285714341888
// solmate2: 600.985163959347101952
assertEq(
curve.votingPowerAt(tokenIdFirst, block.timestamp),
841379999999706526656,
Expand Down

0 comments on commit 2bd0c19

Please sign in to comment.