diff --git a/.gitignore b/.gitignore index c72c6f7..b331b2d 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,5 @@ lcov* # multisig addresses script/multisig-*.json ^script/multisig-members.json + +.DS_Store diff --git a/src/libs/CurveConstantLib.sol b/src/libs/CurveConstantLib.sol index bf23e52..6692ce7 100644 --- a/src/libs/CurveConstantLib.sol +++ b/src/libs/CurveConstantLib.sol @@ -13,7 +13,7 @@ pragma solidity ^0.8.0; library CurveConstantLib { int256 internal constant SHARED_CONSTANT_COEFFICIENT = 1e18; /// @dev 2 / (7 * 2_weeks) - expressed in fixed point - int256 internal constant SHARED_LINEAR_COEFFICIENT = 826714169348; + int256 internal constant SHARED_LINEAR_COEFFICIENT = 826719576719; /// @dev 1 / (7 * (2_weeks)^2) - expressed in fixed point int256 internal constant SHARED_QUADRATIC_COEFFICIENT = 0; diff --git a/test/escrow/curve/QuadraticCurveMath.t.sol b/test/escrow/curve/QuadraticCurveMath.t.sol index 9b565da..bd16acd 100644 --- a/test/escrow/curve/QuadraticCurveMath.t.sol +++ b/test/escrow/curve/QuadraticCurveMath.t.sol @@ -108,7 +108,7 @@ contract TestQuadraticIncreasingCurve is QuadraticCurveBase { // solmate (optimized): 449.206254284606635135 assertEq( curve.votingPowerAt(tokenIdFirst, block.timestamp), - 510837615298044126114, + 510838204935452985628, "Balance incorrect after warmup" ); assertEq(curve.isWarm(tokenIdFirst), true, "Still warming up"); @@ -117,7 +117,7 @@ contract TestQuadraticIncreasingCurve is QuadraticCurveBase { // solmate: 1067784483312193385000000000 assertEq( curve.votingPowerAt(tokenIdSecond, block.timestamp), - 1214285139409170948000000000, + 1214286541005141519000000000, "Balance incorrect after warmup II" ); @@ -130,12 +130,12 @@ contract TestQuadraticIncreasingCurve is QuadraticCurveBase { // solmate2: 600.985163959347101952 assertEq( curve.votingPowerAt(tokenIdFirst, block.timestamp), - 841377248369081041152, + 841379999999706526656, "Balance incorrect after p1" ); - uint256 expectedMaxI = 2524126241845405205760; - uint256 expectedMaxII = 5999967296216704000000000000; + uint256 expectedMaxI = 2524139999998532633280; + uint256 expectedMaxII = 5999999999996512000000000000; // warp to the final period // TECHNICALLY, this should finish at exactly 5 periods and 6 * voting power