Add EulerSwap hook on ethereum - #7122
Conversation
|
Deployment failed for project hooklist with the following error: Learn More: https://vercel.com/uniswap?upgradeToPro=build-rate-limit |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Review: hooks/ethereum/0x75ea81012d8b2c618f1c01c4dba364addfdba8a8.json
Flags Verification
Address last 2 bytes: 0xa8a8 = 1010100010101000 binary.
| Bit | Flag | Address | File |
|---|---|---|---|
| 13 | beforeInitialize | 1 | true ✓ |
| 12 | afterInitialize | 0 | false ✓ |
| 11 | beforeAddLiquidity | 1 | true ✓ |
| 10 | afterAddLiquidity | 0 | false ✓ |
| 9 | beforeRemoveLiquidity | 0 | false ✓ |
| 8 | afterRemoveLiquidity | 0 | false ✓ |
| 7 | beforeSwap | 1 | true ✓ |
| 6 | afterSwap | 0 | false ✓ |
| 5 | beforeDonate | 1 | true ✓ |
| 4 | afterDonate | 0 | false ✓ |
| 3 | beforeSwapReturnsDelta | 1 | true ✓ |
| 2 | afterSwapReturnsDelta | 0 | false ✓ |
| 1 | afterAddLiquidityReturnsDelta | 0 | false ✓ |
| 0 | afterRemoveLiquidityReturnsDelta | 0 | false ✓ |
Also confirmed by getHookPermissions() in UniswapHook.sol.
Properties Verification
-
dynamicFee: false ✓ —
_beforeSwapreturns(selector, returnDelta, 0)with fee override hardcoded to0. No call topoolManager.updateDynamicLPFee()anywhere in the hook source. -
upgradeable: false ✓ — No
upgradeTo, noSELFDESTRUCT, no mutable implementation slot in the source. The contract uses immutableevcandpoolManageraddresses. EulerSwap instances are minimal delegatecall proxies pointing to a fixed implementation; the implementation address is not admin-configurable. -
requiresCustomSwapData: false ✓ — The
bytes calldataparameter in_beforeSwapis unnamed and completely ignored. Swaps execute correctly without any hookData. -
vanillaSwap: false ✓ —
beforeSwapReturnsDeltaistrue, and_beforeSwapcompletely overrides swap execution by routing tokens through Euler lending vaults (deposit input, withdraw output), verifying a custom reserve curve invariant. This is not vanilla swap behavior. -
swapAccess: "none" ✓ —
_beforeSwaphas no access control: no allowlist checks, no governance flags, no timestamp/block gating. Any caller may swap.
Metadata Verification
- verifiedSource: true ✓ —
source_meta.jsonconfirms"verified": true, contract name"EulerSwap". - chainId: 1 ✓ — Ethereum mainnet.
- name: "EulerSwap" ✓ — Matches
contractNamefrom Etherscan. - description ✓ — Accurately describes the on-chain logic: custom-curve AMM routing through Euler vaults, deposits input into and withdraws output from vaults, verifies reserve curve invariant, and intentionally blocks standard LP liquidity additions and donations via the
beforeAddLiquidityandbeforeDonatereverts.
All fields are correct.
Ponx
left a comment
There was a problem hiding this comment.
Bot review verified; bitmask/flags/properties check out. LGTM.
Summary
A custom-curve AMM hook for Uniswap v4 that routes swaps through Euler lending vaults: input tokens are deposited into and output tokens are withdrawn from Euler vaults, with each swap verified against a custom reserve curve invariant. Standard LP positions and donations are intentionally blocked.
Flags
Properties
Warnings
Closes #7103