@@ -9,7 +9,7 @@ library CurveLib {
9
9
error Overflow ();
10
10
error CurveViolation ();
11
11
12
- /// @notice Returns true iff the specified reserve amounts would be acceptable.
12
+ /// @notice Returns true if the specified reserve amounts would be acceptable, false otherwise .
13
13
/// Acceptable points are on, or above and to-the-right of the swapping curve.
14
14
function verify (IEulerSwap.Params memory p , uint256 newReserve0 , uint256 newReserve1 )
15
15
internal
@@ -55,7 +55,7 @@ library CurveLib {
55
55
int256 term1 = int256 (Math.mulDiv (py * 1e18 , y - y0, px, Math.Rounding.Ceil)); // scale: 1e36
56
56
int256 term2 = (2 * int256 (c) - int256 (1e18 )) * int256 (x0); // scale: 1e36
57
57
B = (term1 - term2) / int256 (1e18 ); // scale: 1e18
58
- C = Math.mulDiv (( 1e18 - c) , x0 * x0, 1e18 , Math.Rounding.Ceil); // scale: 1e36
58
+ C = Math.mulDiv (1e18 - c, x0 * x0, 1e18 , Math.Rounding.Ceil); // scale: 1e36
59
59
fourAC = Math.mulDiv (4 * c, C, 1e18 , Math.Rounding.Ceil); // scale: 1e36
60
60
}
61
61
@@ -68,7 +68,7 @@ library CurveLib {
68
68
unchecked {
69
69
squaredB = absB * absB; // scale: 1e36
70
70
discriminant = squaredB + fourAC; // scale: 1e36
71
- sqrt = Math.sqrt (discriminant); // // scale: 1e18
71
+ sqrt = Math.sqrt (discriminant); // scale: 1e18
72
72
sqrt = (sqrt * sqrt < discriminant) ? sqrt + 1 : sqrt;
73
73
}
74
74
} else {
0 commit comments