Skip to content

Add EulerSwap hook on ethereum - #7163

Merged
Ponx merged 1 commit into
mainfrom
hooks/ethereum/0x0844aedb1b2e022222e22214156a10ff1d86e8a8
Sep 16, 2026
Merged

Ponx merged 1 commit into
mainfrom
hooks/ethereum/0x0844aedb1b2e022222e22214156a10ff1d86e8a8

Conversation

@hooklist-generator

Copy link
Copy Markdown
Contributor

Summary

A Uniswap v4 hook implementing a custom AMM backed by Euler Finance lending vaults. Swaps are fully handled in beforeSwap: input tokens are deposited into Euler vaults and output tokens are withdrawn, with pricing enforced by a configurable bonding curve (CurveLib). Standard concentrated liquidity operations are blocked; a single LP provides liquidity exclusively through Euler vaults.

Flags

Flag Value
beforeInitialize true
afterInitialize false
beforeAddLiquidity true
afterAddLiquidity false
beforeRemoveLiquidity false
afterRemoveLiquidity false
beforeSwap true
afterSwap false
beforeDonate true
afterDonate false
beforeSwapReturnsDelta true
afterSwapReturnsDelta false
afterAddLiquidityReturnsDelta false
afterRemoveLiquidityReturnsDelta false

Properties

Property Value
dynamicFee false
upgradeable false
requiresCustomSwapData false
vanillaSwap false
swapAccess none

Warnings

  • Submitter did not provide a name. Using AI-derived "EulerSwap".
  • Submitter did not provide a description. Using AI-generated description.

Closes #7154

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: hooks/ethereum/0x0844aedb1b2e022222e22214156a10ff1d86e8a8.json

Flags

Address suffix 0xe8a8 decodes to 1110 1000 1010 1000 (binary). The lowest 14 bits:

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 ✓

All flags match getHookPermissions() in src_UniswapHook.sol.

Properties

  • dynamicFee: false ✓ — _beforeSwap returns fee override of 0. Pool initialized with a fixed fee derived from p.fee / 1e12 (a static pips value). No updateDynamicLPFee() calls anywhere in source.

  • upgradeable: false ✓ — The hook is deployed via EIP-3448 MetaProxy (minimal proxy with trailing calldata parameters via CtxLib.getParams()). The implementation address is fixed in the proxy bytecode at creation time and cannot be changed by any admin. source_meta.json also lists "proxy": false (Etherscan does not classify this as an upgradeable proxy). This is a deployment-time code pattern, not an upgrade path.

  • requiresCustomSwapData: false ✓ — _beforeSwap's bytes calldata hookData parameter is entirely unused (not decoded). Swaps function correctly with empty hookData.

  • vanillaSwap: false ✓ — Correct. beforeSwapReturnsDelta is true, and the hook takes full control of swap execution: it withdraws input tokens from PoolManager, deposits them into Euler vaults, withdraws output from Euler vaults, and returns a BeforeSwapDelta overriding the standard AMM calculation. This is explicitly non-vanilla behavior.

  • swapAccess: "none" ✓ — _beforeSwap has no access control checks. Any address can swap through the pool.

Metadata

  • verifiedSource: true ✓ — Confirmed by source_meta.json ("verified": true).
  • chainId: 1 ✓ — Matches chains.json entry for "ethereum".
  • name: "EulerSwap" ✓ — Matches contractName: "EulerSwap" from source metadata.
  • description ✓ — Accurately describes the on-chain logic: swaps fully handled in beforeSwap via Euler vault deposits/withdrawals, pricing via CurveLib, concentrated liquidity blocked by beforeAddLiquidity/beforeDonate reverts, and single-LP architecture. No promotional or audit language.

All fields are correct.

@Ponx Ponx left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bot review verified; bitmask/flags/properties check out. LGTM.

@Ponx
Ponx merged commit 5bb0024 into main Sep 16, 2026
5 checks passed
@Ponx
Ponx deleted the hooks/ethereum/0x0844aedb1b2e022222e22214156a10ff1d86e8a8 branch September 16, 2026 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

hook: 0x0844aedb1b2e022222e22214156a10ff1d86e8a8 on ethereum

1 participant