LayerNexV4Hook on Monad
Uniswap v4 Hook Contract 0xef2d253c1c9d051e687211901c219694279f6acc on Monad · Custom pricing · Verified contract
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 1
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 0
What it does
A fixed-fee custom-accounting hook that charges a 1% fee on the quote-currency side of each swap and splits collected fees between a market creator and a platform recipient.
How it works step by step
- Allows one seed liquidity position per market, locked to a fixed salt, tick range and liquidity amount.
- Takes a fixed 1% fee on quote-currency flow: on the input for buys and on the output for sells.
- Mints ERC6909 claims for accrued fees and burns and takes them to the hook when collect is called.
- Splits collected fees 50/50 between the market creator and the immutable platform recipient.
- Lets the creator or platform claim their balance, with the creator able to direct payouts to another address.
- Enforces solvency checks on every collection and payout so claims cannot exceed backing balances.
- Swap behaviour
- Exact-input swaps only. On buys, the hook takes 1% of the quote input before the swap via beforeSwap. On sells, the hook takes 1% of the quote output after the swap via afterSwap. Partial fills and exact-output swaps revert. Core pool LP and protocol fees must be zero.
- Liquidity behaviour
- Only one seed liquidity addition is allowed per market, from the position manager, with a fixed salt, fixed tick range and fixed liquidity amount. After seeding, liquidity removal is only permitted with the same salt and ticks and a zero liquidity delta, and the hook's beforeRemoveLiquidity check requires the market to already be seeded. No afterAddLiquidity or afterRemoveLiquidity logic runs.
- Fee behaviour
- A fixed 1% (100 bps) fee on quote-currency flow. On buys (quote in, token out) the hook takes 1% of the quote input via a beforeSwap return delta and mints an ERC6909 claim. On sells (token in, quote out) the hook takes 1% of the actual quote output via an afterSwap return delta. Accrued fees are burned and taken to the hook on collect, then split 50/50 between the market creator and the platform recipient (rounded in favor of the creator). The core pool LP and protocol fees must be zero.
- Owner & admin controls
- No owner or admin key is stored. Registration is restricted to the immutable factory, and the platform recipient is fixed at construction. Governance can halt markets indirectly by enabling a protocol fee on the core pool (the hook reverts if protocolFee or lpFee is nonzero). No upgrade, pause, rescue or fee setter function was found in the decoded interface.
Enabled Uniswap v4 callbacks
beforeInitialize, beforeAddLiquidity, beforeRemoveLiquidity, beforeSwap, afterSwap, beforeSwapReturnDelta, afterSwapReturnDelta
beforeInitialize: validates the sender is the factory and the initial price matches the registered price, then marks the market initialized. beforeAddLiquidity: enforces the single locked seed position. beforeRemoveLiquidity: enforces the locked position shape and seeded state. beforeSwap: enforces the core fee is zero and computes the buy-side fee as a return delta. afterSwap: validates exact-input fills, mints ERC6909 fee claims and returns the sell-side fee as a return delta. beforeSwapReturnDelta and afterSwapReturnDelta: enabled so the hook can take its fee from swap deltas.
Security & trust assessment
Risk level: low (decoded bytecode, medium confidence).
Who controls it: No privileged key or owner was found. The factory is the only account that can register markets, and the platform recipient is fixed and immutable, so there is no admin path to change fees, pause swaps or redirect funds. The main centralization vector is the core protocol governance, which can set a nonzero protocol fee on the pool and thereby halt swaps for every market served by this hook.
Risk to user funds: The hook holds only quote-currency fee receipts (as ERC6909 claims and transient or collected balances) and does not hold the pool's liquidity directly. It takes a 1% fee on quote flow and can block swaps only via the core-pool fee check. Claims are gated by balance-backing assertions, and recipients are either the immutable creator and platform or an address chosen by the authorised beneficiary. No function lets the hook or any key move trader or LP principal.
Security findings
- [medium] Core protocol governance can halt trading: Enabling a protocol or LP fee on the core pool causes beforeSwap and afterSwap to revert with NonzeroCoreFee, which halts trading. Governance of the core protocol is therefore a practical kill switch for this hook's markets.
- [low] Fee collection relies on exact token behaviour: Fee accounting depends on the ERC6909 balance of the hook for the quote currency and on exact balance deltas. Non-standard quote tokens or unexpected PoolManager behaviour could cause claims to revert and temporarily block collection, though the backing checks fail closed rather than misallocating funds.
- [info] Exact-input and full-fill swaps only: Swaps are restricted to exact-input orders with a full fill (amountSpecified must be negative and within int128 range). Partial fills and exact-output swaps revert with PartialFill or UnsupportedSwap, which limits routing compatibility by design.
- [info] Solvency assertions on every payout: Fee claims are backed by a totalLiability and totalPendingFees accounting check against actual balances and the ERC6909 claim balance. The code reverts with InsolventFeeClaims if backing is short, so pool funds are not used to cover fee payouts.
Contract details
- Verified source
- Yes (LayerNexV4Hook)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 10,183 bytes
- Upgradeable proxy
- No
- Detected patterns
- moves-currency, return-delta, self-unlock
Pools using LayerNexV4Hook
- MON / CAT (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today