Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/EulerSwap.sol
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ contract EulerSwap is IEulerSwap, EVCUtil, UniswapHook {
}

/// @inheritdoc IEulerSwap
function activate(InitialState calldata initialState) public {
function activate(InitialState calldata initialState) external {
CtxLib.Storage storage s = CtxLib.getStorage();
Params memory p = CtxLib.getParams();

Expand Down
2 changes: 1 addition & 1 deletion src/EulerSwapFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ contract EulerSwapFactory is IEulerSwapFactory, EVCUtil, ProtocolFee {
abi.encodePacked(
bytes1(0xff),
address(this),
keccak256(abi.encode(address(poolParams.eulerAccount), salt)),
keccak256(abi.encode(poolParams.eulerAccount, salt)),
keccak256(MetaProxyDeployer.creationCodeMetaProxy(eulerSwapImpl, abi.encode(poolParams)))
)
)
Expand Down
6 changes: 3 additions & 3 deletions src/libraries/CurveLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ library CurveLib {
error Overflow();
error CurveViolation();

/// @notice Returns true iff the specified reserve amounts would be acceptable.
/// @notice Returns true if the specified reserve amounts would be acceptable, false otherwise.
/// Acceptable points are on, or above and to-the-right of the swapping curve.
function verify(IEulerSwap.Params memory p, uint256 newReserve0, uint256 newReserve1)
internal
Expand Down Expand Up @@ -55,7 +55,7 @@ library CurveLib {
int256 term1 = int256(Math.mulDiv(py * 1e18, y - y0, px, Math.Rounding.Ceil)); // scale: 1e36
int256 term2 = (2 * int256(c) - int256(1e18)) * int256(x0); // scale: 1e36
B = (term1 - term2) / int256(1e18); // scale: 1e18
C = Math.mulDiv((1e18 - c), x0 * x0, 1e18, Math.Rounding.Ceil); // scale: 1e36
C = Math.mulDiv(1e18 - c, x0 * x0, 1e18, Math.Rounding.Ceil); // scale: 1e36
fourAC = Math.mulDiv(4 * c, C, 1e18, Math.Rounding.Ceil); // scale: 1e36
}

Expand All @@ -68,7 +68,7 @@ library CurveLib {
unchecked {
squaredB = absB * absB; // scale: 1e36
discriminant = squaredB + fourAC; // scale: 1e36
sqrt = Math.sqrt(discriminant); // // scale: 1e18
sqrt = Math.sqrt(discriminant); // scale: 1e18
sqrt = (sqrt * sqrt < discriminant) ? sqrt + 1 : sqrt;
}
} else {
Expand Down