EdenRing on Arc

Uniswap v4 Hook Contract 0xf992d6b6b686c5aeb723d4fc43fd15c51fba28cc on Arc · Dynamic fee · Verified contract

Volume (24h)
$0
Value locked (TVL)
$14
All-time volume
$166
Pools using this hook
3
Swaps (24h)
0 (0 traders)
Total swaps
18

What it does

EdenRing is a fee and rules hook for Eden launch pools that charges a fixed rate (plus optional rule-module surcharges) on the pair-asset side of every trade, routing most of it to the vault and paying rule-designated shares to accounts.

How it works step by step

  • Charges a per-pool docking rate (up to 10%) on the pair-asset side of swaps, with the pool's own LP fee set to zero
  • Adds surcharges from allowlisted rule modules, capped so the total rate never exceeds 50%
  • Mints fees as ERC-6909 claims: the docking share goes to the vault's ledger, account shares are credited for redemption
  • Restricts liquidity provision to the vault and only allows pools to be opened by the vault's dock
  • Tracks each pool's high-water price and graduates the pool at a maturity tick, after which rules stop running but the fee remains
  • Exempts the vault's own buybacks from fees and rules
Swap behaviour
Non-vault swaps have a fee charged on the pair-asset leg: exact-input buys are charged in beforeSwap, while sells and exact-output buys are charged in afterSwap on the unspecified leg. Pre-trade and post-trade rule modules are called for each swap and can add surcharges or revert. Vault swaps are exempt.
Liquidity behaviour
Only the vault may add liquidity (beforeAddLiquidity reverts for any other sender). Remove-liquidity hooks revert as unsupported, so liquidity is removed without hook involvement.
Fee behaviour
The pool's LP fee is zero; the ring charges a fixed docking rate (at most 10%) on the pair-asset leg of each swap, plus extra rates returned by allowlisted rule modules, with the total capped at 50%. Fees are minted as ERC-6909 claims on the pool manager; the docking's share goes to the vault's ledger and any account share is credited to an account that redeems it via redeem(). Buys with quote in exact-input are charged in beforeSwap; other cases are charged in afterSwap on the unspecified leg. Vault buybacks are exempt.
Owner & admin controls
Owner (two-step transfer via transferOwnership/acceptOwnership) can allowlist rule modules (allowRule) and mark trusted routers (trustRouter); trusted routers can cause hookData to name the trader. Owner cannot change any pool's fee rate or rules after openRing, and cannot pause swaps. Only the vault's current dock can open pools, and only the vault can drain accrued fees or add liquidity.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta

beforeInitialize: reverts for all callers so pools can only be opened through openRing by the dock. beforeAddLiquidity: restricts liquidity provision to the vault. beforeSwap: computes and takes the pre-swap fee and runs pre-trade rule modules. afterSwap: takes the post-swap fee on the unspecified leg, updates the high-water tick, runs post-trade rule modules and triggers graduation when the maturity tick is reached. beforeSwapReturnDelta and afterSwapReturnDelta: allow the hook to take its fee as a return delta against the swap.

Security & trust assessment

Risk level: medium (verified source, high confidence).

Who controls it: The owner can add or remove rule modules allowed for future docks and mark routers as trusted so hookData sets the trader identity. The owner cannot alter an existing pool's fee or rules, cannot pause trading, and cannot withdraw funds. Rule modules, once allowed, run arbitrary logic that can revert swaps for enrolled pools.

Risk to user funds: The hook holds ERC-6909 claims minted during swaps and the owed balances for accounts, which redeem against the pool manager. It charges fees on the pair asset of each swap, and it can block swaps through rule modules. User funds are not held as a balance by the hook itself beyond these claims.

Security findings

  • [medium] Rule modules can block swaps: Rule modules run inside beforeSwap and afterSwap and may revert to refuse a swap; a misbehaving module enrolled in a pool can block that pool's trading until graduation.
  • [low] Fee not refunded on partial fill: Fees on exact-input buys are charged before the swap; a price limit that stops the swap partway refunds unspent input but not its fee.
  • [info] Trader identity depends on trusted routers: Trader identity is taken from hookData for the dock and for owner-trusted routers, otherwise tx.origin is used; rules that depend on trader identity can be influenced by these settings.
  • [info] Swap-scoped transient state: Ledger accounting is separate from ERC-6909 claims, and the hook uses transient storage for the in-flight swap, so the pairing of beforeSwap and afterSwap relies on the pool manager calling them strictly in sequence.

Contract details

Verified source
Yes (EdenRing)
Compiler
solc 0.8.30+commit.73712a01
Bytecode size
15,520 bytes
Upgradeable proxy
No
Detected patterns
access-control, erc6909-claims, liquidity-management, mev-protection, moves-currency, ownable, return-delta, self-unlock

Pools using EdenRing