Fee sharing hook on Monad
Uniswap v4 Hook Contract 0xecb9c7162e14807da156badace75061d00fc50cc on Monad · Fee sharing
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 1
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 14
What it does
This hook adds an owner-set swap fee, capped by an unverified maximum, that every trader pays to a fee recipient, and it updates an on-chain random seed on each swap, while LPs can withdraw freely.
How it works step by step
- Charges a 'mint fee' on swaps, set in basis points by the owner, and sends it to a designated fee recipient.
- Uses swap return deltas to take the fee portion directly out of swap amounts via the PoolManager.
- Updates an on-chain random seed and counter after every swap, likely for a game or lottery-style feature.
- Does not touch liquidity adds or withdrawals; LPs can withdraw freely.
- Swap behaviour
- On each swap the hook can skim a fee (the mint fee percentage) from the swap amounts and transfer it to the fee recipient. After the swap it also updates a pseudo-random seed and counter.
- Liquidity behaviour
- No liquidity callbacks; LPs can add and withdraw freely.
- Fee behaviour
- An extra hook fee set as a percentage of the swap is taken on top of the pool's normal fee and paid to the mint fee recipient. A maximum fee constant exists in the code, but its exact value cannot be confirmed from bytecode.
- Owner & admin controls
- The owner can change the mint fee percentage, up to a hard-coded maximum whose exact value is unverified, and change the fee recipient address. Ownership can be transferred or renounced.
Enabled Uniswap v4 callbacks
afterInitialize, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
afterInitialize: sets up or validates the pool at creation; beforeSwap: computes and may take the fee before the swap; afterSwap: takes the fee from output and updates the random seed; beforeSwapReturnDelta/afterSwapReturnDelta: let the hook adjust swap amounts to collect its fee.
Security & trust assessment
Risk level: medium, estimated (decoded bytecode, medium confidence).
Who controls it: A single owner can change the swap fee within its built-in cap and redirect fees to any address. The owner cannot touch LP principal.
Risk to user funds: The hook can take a fee from swappers' amounts, up to an unverified built-in maximum. LP principal cannot be locked or drained by this hook.
Security findings
- [low] Owner-adjustable swap fee: The owner can set the hook's swap fee, bounded by a built-in maximum constant whose exact value cannot be read from the decoded bytecode.
- [info] Predictable on-chain randomness: The random seed is updated from swap data on-chain, so it can likely be predicted or influenced by traders.
- [info] LP withdrawals unrestricted: Remove-liquidity callbacks are disabled, so the hook cannot block or charge LP withdrawals.
Contract details
- Verified source
- No
- Bytecode size
- 5,666 bytes
- Upgradeable proxy
- No
- Detected patterns
- fee-sharing, moves-currency, ownable, return-delta
Pools using Fee sharing hook
- PKM / LVMON (0.30% fee) — 24h volume $0, TVL $0, 0 swaps today