OndexHook on Ethereum
Uniswap v4 Hook Contract 0xf6ce7756e6813f259a2b2bcb746f8cf0042fe0cc on Ethereum · Custom pricing · Verified contract
- Volume (24h)
- $16.60K
- Value locked (TVL)
- $16.70K
- All-time volume
- $1.51M
- Pools using this hook
- 154
- Swaps (24h)
- 657 (231 traders)
- Total swaps
- 13,901
What it does
A shared Ondex hook that charges a 1% fee on every swap in Ondex launch pools, splits the fee into treasury, holder reward, creator, liquidity and burn buckets, and feeds the liquidity bucket back into the pool as base-only liquidity.
How it works step by step
- Charges a fixed 1% protocol fee on each swap, taking the specified-leg part in beforeSwap and the unspecified-leg part in afterSwap.
- Routes the base-currency fee into per-pool ledger buckets: treasury, holders, creator, and liquidity; the token-leg fee is burned.
- Mints ERC-6909 claims on the PoolManager for unpaid base fees and pays creator shares by pushing to the recipient or deferring to claimCreator.
- Adds accumulated liquidity buckets as one-sided positions through a locker contract that can add but never remove liquidity.
- Blocks buys (not sells) until a per-token guard block, except for the factory's opening buys.
- Swap behaviour
- beforeSwap validates the pool against the registry, enforces the buy guard, caches the pool record and returns a specified-leg fee delta. afterSwap burns the token-leg fee, books base buckets, funds holder rewards in the token, attempts a creator payout and an in-swap liquidity add under gas limits, then emits FeeCharged and returns the unspecified-leg fee.
- Liquidity behaviour
- No liquidity callbacks. Liquidity is added by the hook only through the locker (in-swap when gas allows, or permissionlessly via compound), and never removed by the hook.
- Fee behaviour
- Fixed 1% of swap volume (FEE_BPS = 100) on every Ondex pool, with the pool's LP fee required to be zero. Fee buckets are split by the per-pool basis points stored in the registry. Unpaid base fees are held as ERC-6909 claims by the hook.
- Owner & admin controls
- No owner, pause or upgrade functions were found in the hook source. Pool parameters are fixed in the registry, which is write-once. The treasury address is read from the factory at sweep time, and the factory is an upgradeable proxy per the comments, so the factory's admin can change the treasury destination and possibly other factory-level behaviour that the hook reads.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize: records the currency pair and enforces factory-only initialization with zero LP fee. beforeSwap: validates pool, applies buy guard, and charges the specified-leg fee via a returned delta. afterSwap: settles all fee buckets, burns token fees, funds holder rewards, and charges the unspecified-leg fee via a returned delta. beforeSwapReturnDelta and afterSwapReturnDelta: allow the hook to take fees in the specified and unspecified legs.
Security & trust assessment
Risk level: medium (verified source, medium confidence).
Who controls it: Within the visible hook code, no owner-controlled parameter exists, and the registry and locker are write-once. Centralization sits mainly in the factory (a proxy), which fixes the treasury address, launch-time registration and the hook's pool records through the registry. A compromised factory admin could redirect treasury fees and the factory's configuration.
Risk to user funds: The hook holds ERC-6909 claims on base currency and can hold token balances from burns and rewards. It takes 1% of every swap through return deltas. Users' swaps are not blocked by pausing, but buys can be blocked by the guard until guardUntilBlock. Funds are routed to fixed recipients by the registry or the factory's treasury address.
Security findings
- [medium] Factory proxy controls treasury destination: sweepTreasury sends treasuryPending to the address returned by factory.treasury() at call time, and the factory is described as a proxy. Whoever controls the factory upgrade path can redirect accrued treasury fees.
- [low] Buy guard blocks purchases for a period: beforeSwap reverts buys while block.number is below guardUntilBlock for the token, excluding the factory and the factory's opening buys. This is an intentional launch restriction that can block buyers.
- [info] Return-delta fee taking on every swap: beforeSwapReturnDelta and afterSwapReturnDelta let the hook take 1% of each swap, and the fee is also burned or held as ERC-6909 claims, so the hook holds user-paid value between swaps and at the liquidity-add stage.
- [info] Permissionless compound and payout triggers: compound, claimCreator, sweepTreasury and claimAllFor can be called by anyone; they move funds only to stored recipients, so the risk is limited to timing and gas griefing rather than theft.
- [info] Liquidity added with hook-held base: Liquidity principal is paid from the hook's ERC-6909 claims by the locker, and fee credits return to the hook. The locker has no remove path, so the added liquidity is locked permanently.
Contract details
- Verified source
- Yes (OndexHook)
- Compiler
- solc 0.8.37+commit.f401782d
- Bytecode size
- 17,838 bytes
- Upgradeable proxy
- No
- Detected patterns
- liquidity-management, moves-currency, return-delta, rewards
Pools using OndexHook
- ETH / ONDEX (0.00% fee) — 24h volume $10.62K, TVL $9.74K, 110 swaps today
- ONDEX / ONDO (0.00% fee) — 24h volume $2.95K, TVL $4.79K, 42 swaps today
- SEND / ONDEX (0.00% fee) — 24h volume $1.85K, TVL $0, 41 swaps today
- ETH / FRIES (0.00% fee) — 24h volume $474, TVL $86, 6 swaps today
- SENDONDO / ONDO (0.00% fee) — 24h volume $317, TVL $40, 13 swaps today
- SEND / SENDONDO (0.00% fee) — 24h volume $312, TVL $0, 13 swaps today
- SS / XAUt (0.00% fee) — 24h volume $20, TVL $23, 1 swaps today
- WBTC / SS (0.00% fee) — 24h volume $16, TVL $33, 1 swaps today
- ETH / CONDO (0.00% fee) — 24h volume $9.77, TVL $164, 1 swaps today
- CONDO / ONDO (0.00% fee) — 24h volume $9.54, TVL $185, 1 swaps today
- ETH / ONDEXINU (0.00% fee) — 24h volume $9.01, TVL $22, 1 swaps today
- ETH / OCAT (0.00% fee) — 24h volume $1.90, TVL $251, 1 swaps today
- SPCXon / FTR (0.00% fee) — 24h volume $0, TVL $0, 192 swaps today
- TSLAon / FTR (0.00% fee) — 24h volume $0, TVL $0, 159 swaps today
- GIGA / SEND (0.00% fee) — 24h volume $0, TVL $0, 13 swaps today
- GIGA / BRAINon (0.00% fee) — 24h volume $0, TVL $0, 11 swaps today
- MCDon / FI (0.00% fee) — 24h volume $0, TVL $0, 10 swaps today
- KOon / FI (0.00% fee) — 24h volume $0, TVL $0, 7 swaps today
- STARMAN / SPCXon (0.00% fee) — 24h volume $0, TVL $0, 7 swaps today
- FRIES / MCDon (0.00% fee) — 24h volume $0, TVL $0, 6 swaps today