ERC-4626

ERC-4626 is the Ethereum standard for tokenized vaults — smart contracts that accept a deposit token and issue a yield-bearing receipt token representing a share of the vault’s underlying assets. Before ERC-4626, every DeFi protocol invented its own vault interface: Compound issued cTokens, Aave issued aTokens, Yearn issued yvTokens — all doing the same thing (deposit assets, earn yield, withdraw with gains) but using incompatible function signatures. ERC-4626 (finalized in March 2022) standardizes the interface so any protocol can integrate any vault without writing a custom adapter for each. It became a cornerstone of DeFi composability infrastructure.


How It Works

An ERC-4626 vault is also an ERC-20 token. When a user deposits the underlying asset (e.g., USDC), the vault mints shares representing their proportional claim on the vault’s assets. As the vault earns yield, the exchange rate between shares and the underlying asset increases — so the same number of shares redeems for more USDC over time. This is sometimes called a “rebasing” model but without balance changes; value accrues through the share price.

Core interface functions:

“`

asset() → Address of the underlying ERC-20 asset

totalAssets() → Total assets held by the vault (including yield)

convertToShares(assets) → How many shares you’d get for a given asset amount

convertToAssets(shares) → How many assets a given number of shares redeems for

maxDeposit(receiver) → Max deposit allowed for an address

previewDeposit(assets) → Simulated shares received for a deposit

deposit(assets, receiver) → Deposit assets, receive shares

maxMint(receiver) → Max shares mintable

previewMint(shares) → Assets needed to mint a given number of shares

mint(shares, receiver) → Mint exact shares by depositing assets

maxWithdraw(owner) → Max assets withdrawable

previewWithdraw(assets) → Shares burned for a given asset withdrawal

withdraw(assets, receiver, owner) → Withdraw exact assets, burn shares

maxRedeem(owner) → Max shares redeemable

previewRedeem(shares) → Assets returned for redeeming given shares

redeem(shares, receiver, owner) → Redeem shares for assets

“`

Events:

“`

Deposit(caller, owner, assets, shares)

Withdraw(caller, receiver, owner, assets, shares)

“`

The standardized preview* functions are especially important — they let integrators calculate expected returns before executing a transaction, enabling gas-efficient routing and on-chain strategy evaluation.


Why Composability Matters

Before ERC-4626, a yield aggregator wanting to route deposits into Compound, Aave, and Yearn needed three separate integration modules. After ERC-4626, any vault conforming to the standard can be plugged in with zero custom code. This has tangible effects:

  • Aggregators (like Yearn v3) can dynamically allocate between multiple ERC-4626 vaults without upgrades
  • Lending protocols can use any ERC-4626 vault as collateral by relying on the standardized convertToAssets for pricing
  • Portfolio trackers and wallets can display share values uniformly
  • Security auditors can audit once and apply findings category-wide

ERC-4626 is sometimes described as “the ERC-20 of yield” — just as ERC-20 made any token interoperable with any exchange, ERC-4626 makes any vault interoperable with any yield-aware protocol.

Notable ERC-4626 Implementations

Protocol Vault Underlying
Yearn v3 yvUSDC USDC
Morpho Morpho Vaults USDC, WETH
Angle agEUR Savings EUR stablecoin
EtherFi weETH ETH
Sommelier Strategy Cellars Various

History

  • 2021, December — Joey Santoro and others draft EIP-4626 on the Ethereum Magicians forum, motivated by constant re-implementation of vault interfaces across DeFi.
  • 2022, March 18 — EIP-4626 finalized and accepted as an Ethereum standard.
  • 2022 — Rapid adoption across DeFi protocols: Yearn v3, Tribe DAO, Balancer, and others commit to ERC-4626 as their vault interface.
  • 2023 — Morpho launches Morpho Vaults (formerly MetaMorpho) as a flagship ERC-4626 use case — curated lending vaults where risk managers allocate across Morpho markets.
  • 2024 — ERC-4626 becomes default for new vault launches; most major DeFi audits now check ERC-4626 compliance as a security standard.

Common Misconceptions

“ERC-4626 automatically generates yield.”

The standard defines the interface for interacting with yield-bearing vaults — it says nothing about how yield is generated. The actual yield strategy (lending, liquidity provision, staking) is entirely up to the vault’s internal logic. ERC-4626 is the wrapper, not the engine.

“All ERC-4626 vaults are safe and audited.”

Conforming to ERC-4626 means the interface is standard; it says nothing about security. A malicious or buggy vault can implement ERC-4626 and drain depositor funds. The standard enables composability, not safety guarantees.

“ERC-4626 replaces ERC-20.”

ERC-4626 vaults are ERC-20 tokens (the share token is ERC-20 compliant). ERC-4626 is an extension of ERC-20 for the specific vault use case, not a replacement.


Criticisms

  1. Inflation attack vector — A known vulnerability in vanilla ERC-4626 implementations: an attacker can front-run the first deposit with a tiny amount + direct ERC-20 transfer to “inflate” the share price per the totalAssets calculation, rounding subsequent depositors’ shares to zero. OpenZeppelin’s ERC-4626 implementation includes a virtual share offset to mitigate this.
  2. No yield oracle standard — ERC-4626 standardizes deposits and redemptions but doesn’t standardize how external protocols can query historical yield rates — each analytics integration still needs custom indexing.
  3. Preview rounding complexity — The spec requires rounding in depositor-favored directions, which introduces subtle implementation differences between vaults that can cause integration bugs.

Social Media Sentiment

r/ethfinance and DeFi Twitter/X position ERC-4626 as a significant but unglamorous infrastructure win — rarely discussed in price communities but consistently cited by developers as one of the most practical improvements to DeFi tooling. Developer tweets on new ERC-4626 vaults tend to focus on yield rates and risk parameters rather than the standard itself.

The inflation attack received significant attention in 2023 security circles on Twitter/X, with several auditing firms publishing post-mortems on ERC-4626 vaults that shipped without the OpenZeppelin virtual offset mitigation.


Last updated: 2026-04

Related Terms


Sources

  1. Santoro, J. et al. (2022). EIP-4626: Tokenized Vault Standard. Ethereum Improvement Proposals, GitHub.
  1. Trail of Bits (2023). Common ERC-4626 Security Issues. Trail of Bits Blog.
  1. OpenZeppelin (2022). ERC4626: Tokenized Vault. OpenZeppelin Docs.
  1. Morpho Labs (2023). Morpho Vaults Technical Documentation. Morpho.org.