Generic4626Router on Base
Uniswap v4 Hook Contract 0xd60a6a0f0d5e3fd451449c7256bbbdc59561e888 on Base · Utility · Verified contract
- Volume (24h)
- $0
- Value locked (TVL)
- $0
- All-time volume
- $0
- Pools using this hook
- 100
- Swaps (24h)
- 0 (0 traders)
- Total swaps
- 1,193
What it does
A router that lets Uniswap v4 pools swap directly between an ERC4626 vault share token and its underlying asset, wrapping and unwrapping at the vault's rate with no liquidity providers.
How it works step by step
- Creates a zero-fee pool pairing an ERC4626 vault with its underlying asset via initializePool
- Routes swaps in both directions by calling vault.deposit or vault.redeem inside beforeSwap
- Overrides swap deltas with beforeSwapReturnDelta so the pool manager settles against the vault result
- Rejects any pool initialized with a non-zero fee or not created through the hook
- Blocks all liquidity additions so the pool has no LPs and no hook fee
- Swap behaviour
- Swaps are executed inside beforeSwap: input tokens are taken from the pool manager and deposited into the vault (wrap) or the vault shares are redeemed (unwrap), and the return delta settles the swap against the vault output.
- Liquidity behaviour
- Adding liquidity is blocked (beforeAddLiquidity always reverts with Generic4626Router__NotAllowed). Removing liquidity has no hook callback. Liquidity is effectively supplied only by the vault mechanics.
- Fee behaviour
- Pools are forced to a fee of 0; the hook reverts any initialization with a non-zero fee. No hook fee is taken, the swap is a 1:1-style ERC4626 wrap or unwrap at the vault exchange rate.
- Owner & admin controls
- No admin controls found. The router has no owner, pause or upgrade functions; pool creation is open to anyone via initializePool(vault).
Enabled Uniswap v4 callbacks
beforeInitialize, beforeAddLiquidity, beforeSwap, beforeSwapReturnDelta
beforeInitialize validates the pool fee is zero and that the pool was created through initializePool; beforeAddLiquidity reverts to block LP deposits; beforeSwap performs the vault deposit or redeem and returns a delta so the pool manager settles against the vault; beforeSwapReturnDelta lets the hook override the swap amounts with the vault result.
Security & trust assessment
Risk level: medium (verified source, high confidence).
Who controls it: No privileged key exists. Anyone can create a pool for any ERC4626 vault, which is the only permissionless surface.
Risk to user funds: The hook takes the input token from the pool manager, deposits or redeems through the vault, and returns the output via delta settlement, so swap funds transit the router and the vault. Liquidity providers cannot deposit, so pooled funds are not held by the hook. The main exposure is to the chosen vault contract, which controls the conversion and holds the underlying.
Security findings
- [medium] Trust in arbitrary ERC4626 vaults: The hook settles swaps by depositing into or redeeming from an arbitrary ERC4626 vault. The vault's deposit and redeem logic is trusted entirely, so a malicious or buggy vault can misreport shares or assets.
- [medium] Unlimited token approval to vault: initializePool grants the vault unlimited approval of the underlying token held by the router, and _deposit re-approves on demand. A vault that is malicious could drain any underlying tokens sitting in the router.
- [low] Assumes symmetric, honest vault pricing: Only symmetric ERC4626 vaults are supported per the contract comment, and convertToAssets/convertToShares are used for exact-output pricing, so rounding or non-linear vault behaviour may cause swap mismatches.
- [info] Permissionless pool creation at fixed 1:1 price: Pool initialization is permissionless and uses a fixed sqrt price of 2^96 (1:1), which is only correct if the vault exchange rate is near parity at creation time.
Contract details
- Verified source
- Yes (Generic4626Router)
- Compiler
- solc 0.8.26+commit.8a97fa7a
- Bytecode size
- 6,347 bytes
- Upgradeable proxy
- No
- Detected patterns
- erc6909-claims, moves-currency, return-delta
Pools using Generic4626Router
- WETH / mwETH (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- CSUSDC / USDC (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDC / mwUSDC (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- WETH / gtWETHc (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- EURC / mwEURC (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDC / steakUSDC (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- sparkUSDC / USDC (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDC / gtUSDCp (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- smUSDC / USDC (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDC / uUSDC (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- pythUSDC / USDC (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDC / gtUSDCc (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- meUSD / eUSD (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- WETH / Re7WETH (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- USDC / ymvOG-USDC (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- WETH / steakETH (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- DEGEN / mDEGEN (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- smcbBTC / cbBTC (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- gtUSDCf / USDC (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today
- WETH / 9SETHcore (0.00% fee) — 24h volume $0, TVL $0, 0 swaps today