Fee sharing hook on Monad
Uniswap v4 Hook Contract 0x0eb88f97b8abc3b0557c3b47d49fd228de8cc0cc on Monad · Fee sharing
- Volume (24h)
- $0
- Value locked (TVL)
- $187
- All-time volume
- $132.32K
- Pools using this hook
- 5
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 961
What it does
A fee-sharing hook that takes a fixed basis-point cut from swaps on registered pools and splits it between the protocol and pool creators, who can claim their accrued fees.
How it works step by step
- Registers pools through a factory-only registerPool call and stores a per-pool fee configuration
- Takes a fixed total fee in basis points on swaps via beforeSwap and afterSwap return deltas
- Splits the collected fee between the protocol treasury and the pool creator using fixed BPS constants
- Accrues creator fees in token and quote balances per pool
- Lets creators claim accrued fees with claimCreatorFees
- Uses an unlock callback to settle currency with the pool manager
- Swap behaviour
- On beforeSwap and afterSwap the hook computes the fee split, takes its share through return deltas, and records creator and protocol balances per pool.
- Liquidity behaviour
- No liquidity callbacks are enabled in the permissions; beforeAddLiquidity, afterAddLiquidity, beforeRemoveLiquidity and afterRemoveLiquidity exist in the dispatch table but are not gated by the enabled permissions, so they are not expected to run.
- Fee behaviour
- Swap fees are split by fixed basis-point constants (TOTAL_FEE_BPS, PROTOCOL_FEE_BPS, CREATOR_FEE_BPS) against a 10000 BPS denominator; a per-pool fee config is stored and creator fees accrue in token and quote balances that are claimable via claimCreatorFees.
- Owner & admin controls
- Owner (Ownable2Step) can set the factory address via setFactory and transfer or renounce ownership; the factory is the only address allowed to register pools (FactoryOnly). No pause or fee-parameter setter is visible in the dispatched selectors, though fee constants are exposed as BPS, PROTOCOL_FEE_BPS, CREATOR_FEE_BPS and TOTAL_FEE_BPS views.
Enabled Uniswap v4 callbacks
beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeSwap: charges and records the fee split before each swap. afterSwap: accounts fees after execution and settles them. beforeSwapReturnDelta: lets the hook take a share of the swap input or output via a return delta. afterSwapReturnDelta: lets the hook take a share of the unspecified amount after the swap.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, medium confidence).
Who controls it: The owner can change the factory address, which controls which pools can be registered, and can transfer ownership to another key. Fee rates appear to be constants, so the owner cannot directly raise fees from the decoded functions, but a compromised owner could redirect the factory or treasury path.
Risk to user funds: The hook can take a fee cut from swap amounts through return deltas and holds accrued creator fees in its own balances, so user swap value passes through the hook. Without source, it is not possible to confirm that funds cannot be trapped or drained.
Security findings
- [info] Hook takes swap value via return deltas: Swap callbacks use beforeSwapReturnDelta and afterSwapReturnDelta, so the hook takes tokens from every swap through return deltas.
- [medium] Hook moves currency through the pool manager: The hook calls unlock and take on the pool manager and holds a reentrancy guard and an unlockCallback, so it can move pool and user funds during swaps.
- [medium] Owner controls factory which gates pool registration: setFactory is callable by the owner and gates pool registration, so a malicious or compromised owner could register pools that route fees to unexpected parties.
- [low] Unverified creator fee accounting: Creator fee claiming exists (claimCreatorFees, claimableCreatorToken, claimableCreatorQuote); correctness depends on the accounting in storage slots 6 and 7 which cannot be verified without source.
Contract details
- Verified source
- No
- Bytecode size
- 8,303 bytes
- Upgradeable proxy
- No
- Detected patterns
- moves-currency, ownable, return-delta, self-unlock
Pools using Fee sharing hook
- WMON / PURPLX (0.00% fee) — 24h volume $0, TVL $171, 0 swaps today
- XAUt0 / PCAT (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- WMON / JACKET (0.00% fee) — 24h volume $0, TVL $4.75, 0 swaps today
- PURPLE / WMON (0.00% fee) — 24h volume $0, TVL $12, 0 swaps today
- XAUt0 / MOLANDAK (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today