Token hook on Monad

Uniswap v4 Hook Contract 0x405f032519ba148048254e01c78e77bd9930a888 on Monad · Token

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

This hook gives a zero-fee wrap and unwrap path between an ERC-4626 vault's shares and its underlying asset, executed at the vault's own exchange rate, with no liquidity provision allowed.

This read was written for the hook 0xcb1b…a888 on Monad and reused here: the two share a code shape, so constants such as fees, owners and addresses can differ.

How it works step by step

  • Creates a Uniswap v4 pool pairing an ERC-4626 vault share token (wrapper currency) with its underlying asset (underlying currency) at zero fee
  • Swaps across the pool in the wrap direction call vault.deposit, minting vault shares to the pool manager and settling them there
  • Swaps in the unwrap direction take vault shares from the pool manager, call vault.redeem, and settle the underlying asset back to the pool manager
  • Uses beforeSwapReturnDelta so the hook fully replaces pool accounting for each swap, with the pool price set by the vault's previewMint and previewWithdraw
  • Blocks all liquidity additions and rejects any pool whose tokens are not the wrapper/underlying pair or whose fee is non-zero
Swap behaviour
Every swap is executed by the hook at the vault's exchange rate with no fee: exact-input swaps only, exact-output reverts. Wrapping swaps deposit underlying into the vault and deliver shares; unwrapping swaps redeem shares and deliver underlying. Trades pay no fee and receive the vault's rate, so neither direction is favoured beyond the vault's own deposit and redeem pricing.
Liquidity behaviour
Liquidity additions always revert with LiquidityNotAllowed. Removals are not blocked by the hook, but no liquidity can be added so the pool holds no hook-managed LP positions.
Fee behaviour
Pool fee must be 0 and the hook returns a zero LP fee override on every swap. Fees are not taken or shared.
Owner & admin controls
No owner, pause, upgrade or parameter-setting functions were found in the source. The vault and tokens are fixed immutables set in the constructor.

Enabled Uniswap v4 callbacks

beforeInitialize, beforeAddLiquidity, beforeSwap, beforeSwapReturnDelta

beforeInitialize validates the pool token pair and zero fee. beforeAddLiquidity always reverts to block liquidity. beforeSwap performs the wrap or unwrap and returns a custom delta replacing the pool swap. beforeSwapReturnDelta is required so that custom delta is applied.

Security & trust assessment

Risk level: medium, estimated (decoded bytecode, high confidence).

Who controls it: No privileged key is present in the hook; the vault itself is the main trust point and may have its own admin controls that affect whether swaps succeed.

Risk to user funds: The hook briefly holds underlying tokens during wrap and unwrap and uses return deltas to move user-facing balances through the pool manager. Funds are not kept by the hook long term, but a flawed or malicious vault could cause incorrect amounts or failed swaps.

Security findings

  • [info] Hook takes and settles vault tokens via return delta: beforeSwap calls poolManager.take and poolManager.settle and returns a custom BeforeSwapDelta, so the hook directly moves pool-manager balances on every swap. This is the intended wrapper mechanism.
  • [medium] Trust in external vault: The hook calls vault.deposit, vault.redeem, previewMint and previewWithdraw on an arbitrary ERC-4626 vault fixed at construction. A malicious or misbehaving vault could return wrong amounts or revert, and the hook approves the vault for unlimited underlying tokens in its constructor.
  • [info] Settlement mismatch guards: deposit and withdraw revert with SettlementMismatch if the measured amount differs from the amount settled, limiting accounting errors from rebasing or fee-on-transfer tokens, though fee-on-transfer underlying is documented as unsupported.
  • [low] Possible swap blocking by vault: If vault.deposit or vault.redeem reverts (for example due to vault pausing or liquidity limits), swaps in that direction will revert, leaving the pool unable to process those trades.

Contract details

Verified source
No
Bytecode size
7,988 bytes
Upgradeable proxy
No
Detected patterns
moves-currency, return-delta

Pools using Token hook