Skip to content

Commit 6b1bdf2

Browse files
committed
cosmetic fixes identified in audit
1 parent a8cf496 commit 6b1bdf2

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/EulerSwap.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ contract EulerSwap is IEulerSwap, EVCUtil, UniswapHook {
5858
}
5959

6060
/// @inheritdoc IEulerSwap
61-
function activate(InitialState calldata initialState) public {
61+
function activate(InitialState calldata initialState) external {
6262
CtxLib.Storage storage s = CtxLib.getStorage();
6363
Params memory p = CtxLib.getParams();
6464

src/EulerSwapFactory.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ contract EulerSwapFactory is IEulerSwapFactory, EVCUtil, ProtocolFee {
9191
abi.encodePacked(
9292
bytes1(0xff),
9393
address(this),
94-
keccak256(abi.encode(address(poolParams.eulerAccount), salt)),
94+
keccak256(abi.encode(poolParams.eulerAccount, salt)),
9595
keccak256(MetaProxyDeployer.creationCodeMetaProxy(eulerSwapImpl, abi.encode(poolParams)))
9696
)
9797
)

src/libraries/CurveLib.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ library CurveLib {
99
error Overflow();
1010
error CurveViolation();
1111

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.
1313
/// Acceptable points are on, or above and to-the-right of the swapping curve.
1414
function verify(IEulerSwap.Params memory p, uint256 newReserve0, uint256 newReserve1)
1515
internal
@@ -55,7 +55,7 @@ library CurveLib {
5555
int256 term1 = int256(Math.mulDiv(py * 1e18, y - y0, px, Math.Rounding.Ceil)); // scale: 1e36
5656
int256 term2 = (2 * int256(c) - int256(1e18)) * int256(x0); // scale: 1e36
5757
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
5959
fourAC = Math.mulDiv(4 * c, C, 1e18, Math.Rounding.Ceil); // scale: 1e36
6060
}
6161

@@ -68,7 +68,7 @@ library CurveLib {
6868
unchecked {
6969
squaredB = absB * absB; // scale: 1e36
7070
discriminant = squaredB + fourAC; // scale: 1e36
71-
sqrt = Math.sqrt(discriminant); // // scale: 1e18
71+
sqrt = Math.sqrt(discriminant); // scale: 1e18
7272
sqrt = (sqrt * sqrt < discriminant) ? sqrt + 1 : sqrt;
7373
}
7474
} else {

0 commit comments

Comments
 (0)