TokiHook on Arbitrum
Uniswap v4 Hook Contract 0xd4234a3d471159e03501fcc2ffd61aaf43fe1888 on Arbitrum · Custom pricing · Verified contract
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 39
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 92
What it does
A Uniswap v4 custom-curve hook for Pendle-style principal token trading that disables direct PoolManager liquidity, routes deposits and withdrawals through the hook, and can rehypothecate idle pool liquidity into ERC4626 vaults.
How it works step by step
- Deploys a pool per principal token pair with a custom yield-trading AMM curve (TokiSwap) and a zero static fee, enforced in afterInitialize.
- Blocks liquidity additions made directly through the PoolManager (beforeAddLiquidity reverts); liquidity must go through the hook's addLiquidity and removeLiquidity functions.
- Mints and burns an ERC20 LP token (TokiPoolToken) on liquidity operations, and locks a minimum liquidity amount to the zero address on first deposit.
- Optionally deposits idle balances into per-currency ERC4626 vaults (rehypothecation) to earn yield, with losses socialized to LPs.
- Maintains a TWAP oracle of log implied rates, with observation cardinality expandable by anyone who pays gas.
- Collects curator and protocol fees in the underlying token and withdraws them via the PoolManager on demand.
- Swap behaviour
- beforeSwap runs the custom curve via TokiHookLogic and returns a before-swap delta, so the hook sets the swap amounts itself instead of the standard pool math. Swaps are paused when the pausable swap flag is set and are disabled after expiry.
- Liquidity behaviour
- beforeAddLiquidity reverts for any direct PoolManager liquidity. Liquidity added through the hook's addLiquidity pulls tokens, optionally deposits surplus into vaults, updates reserves and raw balances, and mints LP tokens. removeLiquidity burns LP tokens, withdraws from vaults if set, and returns tokens to the receiver.
- Fee behaviour
- The pool's static fee must be zero. Swap fees are computed by the TokiSwap curve and split between the curator and the Napier treasury according to a configurable split ratio. The curator can collect its share and the treasury can collect the protocol share.
- Owner & admin controls
- The curator (via AccessManager) can update vault addresses and target ratios, permanently freeze vault or ratio settings, unwind vault positions into raw balances, and collect curator fees. The factory-designated treasury receives protocol fees, and collectProtocolFee is restricted to the access manager's role. Pause flags for swaps, deposits, withdrawals, transfers and configuration are set at deployment and are immutable. An optional hooklet contract is called on each lifecycle event, and its behaviour is curator-defined.
Enabled Uniswap v4 callbacks
afterInitialize, beforeAddLiquidity, beforeSwap, beforeSwapReturnDelta
afterInitialize enforces a zero pool fee and rejects non-zero fee pools. beforeAddLiquidity reverts direct PoolManager liquidity so that only the hook's own entry points can add it. beforeSwap executes the custom curve and returns a before-swap delta, which lets the hook take or owe tokens during swaps.
Security & trust assessment
Risk level: medium (verified source, medium confidence).
Who controls it: The curator controls vault configuration, fee collection and unwinding, and the hooklet is curator-defined. The factory-designated treasury receives protocol fees. The curator key could redirect vault funds or extract fees, so users depend on the curator being trustworthy.
Risk to user funds: The hook custodies pool balances through the PoolManager and can hold ERC4626 vault shares. It moves tokens on swaps, liquidity operations, fee collection and vault unwinds, and it can block swaps, deposits and withdrawals through pause flags and expiry.
Security findings
- [medium] Curator controls pause and vault configuration: The curator can change vault addresses and ratios, unwind vault positions into raw balances, and collect curator fees. Pool users must trust the curator not to redirect or strand funds, as the source notes the pool is entirely controlled by the curator.
- [medium] Vault losses socialized to LPs: Rehypothecated assets sit in external ERC4626 vaults, so a vault loss or a malicious vault reduces the value of every LP share. A curator-chosen vault can therefore lower LP balances through vault changes or unwinds.
- [medium] Hook takes tokens through return delta: beforeSwapReturnDelta lets the hook set the swap amounts and move currency through the PoolManager, so the curve logic determines how much users receive and pay.
- [low] Pausable swaps, deposits and withdrawals: Pause flags for swaps, LP deposits and withdrawals are checked on each operation, so a paused configuration can block user actions. The flags are set at deployment and cannot be changed later, which limits the risk.
- [info] Hooklet extension point: An optional hooklet contract executes on swaps and liquidity operations; its behaviour is defined by the curator and was not reviewed here.
Contract details
- Verified source
- Yes (TokiHook)
- Compiler
- solc 0.8.28+commit.7893614a
- Bytecode size
- 23,490 bytes
- Upgradeable proxy
- No
- Detected patterns
- erc6909-claims, liquidity-management, moves-currency, oracle, pausable, return-delta, self-unlock
Pools using TokiHook
- fUSDC / PT-fUSDC@1/6/2026 (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- wstETH / PT-wstETH@4/2/2027 (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- fUSDC / PT-fUSDC@2/6/2026 (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- yOG-USDC / PT-yOG-USDC@28/11/2026 (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- fUSDC / PT-fUSDC@13/4/2026 (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- gtUSDCp / PT-gtUSDCp@22/6/2026 (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- fUSDC / PT-fUSDC@4/8/2026 (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- fUSDC / PT-fUSDC@4/8/2026 (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- fUSDC / PT-fUSDC@3/5/2026 (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- sUSDai / PT-sUSDai@3/2/2027 (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- sUSDai / PT-sUSDai@3/5/2026 (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- fWETH / PT-fWETH@21/4/2026 (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- fUSDC / PT-fUSDC@19/1/2027 (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- gtUSDCp / PT-gtUSDCp@14/4/2026 (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- fUSDC / PT-fUSDC@13/4/2026 (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- fUSDC / PT-fUSDC@13/4/2026 (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- fUSDC / PT-fUSDC@13/4/2026 (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- fUSDC / PT-fUSDC@13/4/2026 (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- fUSDC / PT-fUSDC@12/4/2026 (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- gtUSDCp / PT-gtUSDCp@6/4/2026 (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today