Skip to content

Add EulerSwap hook on ethereum - #7122

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

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

Conversation

@hooklist-generator

Copy link
Copy Markdown
Contributor

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

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 #7103

@vercel

vercel Bot commented Sep 16, 2026

Copy link
Copy Markdown

Deployment failed for project hooklist with the following error:

Resource is limited - try again in 60 minutes (more than 450, code: "api-deployments-paid-per-hour").

Learn More: https://vercel.com/uniswap?upgradeToPro=build-rate-limit

@vercel

vercel Bot commented Sep 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
hooklist Ready Ready Preview Sep 16, 2026 9:14pm UTC

Request Review

@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/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 ✓ — _beforeSwap returns (selector, returnDelta, 0) with fee override hardcoded to 0. No call to poolManager.updateDynamicLPFee() anywhere in the hook source.

  • upgradeable: false ✓ — No upgradeTo, no SELFDESTRUCT, no mutable implementation slot in the source. The contract uses immutable evc and poolManager addresses. EulerSwap instances are minimal delegatecall proxies pointing to a fixed implementation; the implementation address is not admin-configurable.

  • requiresCustomSwapData: false ✓ — The bytes calldata parameter in _beforeSwap is unnamed and completely ignored. Swaps execute correctly without any hookData.

  • vanillaSwap: false ✓ — beforeSwapReturnsDelta is true, and _beforeSwap completely 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" ✓ — _beforeSwap has no access control: no allowlist checks, no governance flags, no timestamp/block gating. Any caller may swap.

Metadata Verification

  • verifiedSource: true ✓ — source_meta.json confirms "verified": true, contract name "EulerSwap".
  • chainId: 1 ✓ — Ethereum mainnet.
  • name: "EulerSwap" ✓ — Matches contractName from 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 beforeAddLiquidity and beforeDonate reverts.

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 3451f70 into main Sep 16, 2026
7 checks passed
@Ponx
Ponx deleted the hooks/ethereum/0x75ea81012d8b2c618f1c01c4dba364addfdba8a8 branch September 16, 2026 23:08
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: 0x75ea81012d8b2c618f1c01c4dba364addfdba8a8 on ethereum

1 participant