LLMs.txt: agent-readable Markdown index of this site at /llms.txt

ERC-4626 Wrapper Overview

Understand the ERC4626 Wrapper Hook, a Uniswap v4 hook that wraps and unwraps ERC-4626 vault shares against their underlying asset at the vault's own exchange rate.

ERC4626WrapperHook exposes an ERC-4626 vault as a Uniswap v4 pool. One side of the pool is the vault's share token (the wrapper currency), the other is vault.asset() (the underlying currency). A swap in one direction deposits the underlying into the vault and returns freshly minted shares; a swap in the other direction redeems shares and returns the underlying. Conversion always happens at the vault's reported exchange rate, so a swap settles exactly as vault.deposit or vault.redeem would, reached through the swap interface routers and aggregators already speak to.

The pool holds no liquidity and charges no fee. It is a conversion venue, not a market: no price discovery, no LP position, and no slippage beyond the vault's own rounding. All swap-time logic lives in beforeSwap, which absorbs the entire swap and returns a BeforeSwapDelta describing the conversion.

Concepts

Guides

  • Integration: route, quote, and execute wrapper hops

Security

See ERC-4626 Wrapper Security for the security model, invariants, and audit.