ERC-4626

An Ethereum token standard that creates a unified interface for tokenized vaults, standardizing deposit, withdrawal, and yield accounting.

What Is ERC-4626?

ERC-4626 is an Ethereum token standard that defines a unified interface for tokenized vaults — smart contracts that accept deposits of an underlying asset and issue shares representing proportional ownership of the vault's holdings. Built as an extension of ERC-20, ERC-4626 standardizes how deposit, withdraw, mint, redeem, and share-accounting functions work for any yield-bearing vault. Finalized in March 2022, it has rapidly become the dominant standard for lending pools, yield aggregators, and staking contracts across DeFi.

Why ERC-4626 Was Created

Before ERC-4626, every protocol that managed user deposits and generated yield implemented its own vault logic. Aave had aTokens, Compound had cTokens, Yearn had yVaults — each with a different interface, different accounting methods, and different integration requirements. This fragmentation created several problems:

  • Integration overhead: Every wallet, dashboard, and protocol that wanted to display or interact with yield-bearing positions needed custom code for each vault implementation.
  • Audit duplication: Without a standard, each vault's accounting logic had to be audited independently, multiplying security review costs across the ecosystem.
  • Composability friction: Building on top of multiple vault types required adapters and wrapper contracts, adding gas costs and potential points of failure.

ERC-4626 solved these problems by providing a single, well-defined API that any vault-type contract can adopt. Joey Santoro (Fei Protocol) and several co-authors proposed the standard to unify the fragmented landscape and accelerate DeFi composability.

How ERC-4626 Works

The mechanics of an ERC-4626 vault follow a straightforward share-based accounting model.

Depositing Assets

When a user deposits an underlying asset (say, USDC) into an ERC-4626 vault, the vault mints shares that represent the user's proportional claim on the total assets held in the vault. If the vault holds 1,000 USDC and has issued 1,000 shares, depositing 100 USDC would mint approximately 100 new shares (subject to the current exchange rate).

Yield Accrual

As the vault earns yield — whether from lending interest, trading fees, or staking rewards — the total assets in the vault increase while the number of shares remains the same. This causes the share-to-asset exchange rate to rise over time. A share that was worth 1.00 USDC at deposit might be worth 1.05 USDC after a period of yield accrual.

Withdrawing Assets

When a user wants to exit, they redeem their shares, which are burned by the vault in exchange for the corresponding proportion of underlying assets (including accrued yield). The user receives more assets than they originally deposited, with the difference representing their earnings.

Key Functions

The standard defines several critical functions:

  • deposit(assets, receiver): Deposits a specific amount of underlying assets and mints shares to the receiver.
  • mint(shares, receiver): Mints a specific number of shares by pulling the required assets from the caller.
  • withdraw(assets, receiver, owner): Burns enough shares from the owner to release a specific amount of assets.
  • redeem(shares, receiver, owner): Burns a specific number of shares and releases the corresponding assets.
  • convertToShares(assets) and convertToAssets(shares): Preview functions that show the current exchange rate without executing a transaction.

Impact on DeFi Lending

ERC-4626 has had a profound impact on lending protocols and the broader DeFi ecosystem. Morpho, one of the leading lending optimizers, built its Morpho Blue vaults entirely on the ERC-4626 standard. This means any wallet, aggregator, or protocol that supports ERC-4626 can automatically interact with Morpho vaults without any custom integration work.

For lenders, this standardization means their yield-bearing positions are portable and composable. An ERC-4626 vault share can be used as collateral in another protocol, traded on a decentralized exchange, or deposited into a meta-vault that optimizes across multiple yield sources. This composability is what makes DeFi's "money legos" vision practical at scale.

ERC-4626 and Security

While standardization improves interoperability, it also introduces specific security considerations. The most notable is the "vault inflation attack," where an attacker manipulates the share-to-asset exchange rate during initial vault deployment by making a large direct transfer of the underlying asset to the vault contract. Well-designed implementations mitigate this by including virtual shares and assets in their accounting, a pattern recommended by OpenZeppelin and other security firms.

Because the standard is widely adopted, it benefits from extensive community review and battle-tested reference implementations. The OpenZeppelin and Solmate libraries both provide audited ERC-4626 base contracts that protocol developers can extend, reducing the risk of custom accounting errors.

Adoption Across the Ecosystem

Since its finalization, ERC-4626 adoption has been rapid and broad. Major protocols including Morpho, Yearn v3, Balancer, and Euler have adopted the standard for their vault products. DeFi protocols that aggregate yield across multiple sources particularly benefit from ERC-4626, as they can compose vaults of vaults without custom plumbing for each underlying source.

Wallet interfaces like MetaMask and portfolio trackers like DeBank can display ERC-4626 vault positions with accurate real-time valuations using the standard's preview functions, eliminating the need for protocol-specific integrations that previously fragmented the user experience.

Why ERC-4626 Matters

ERC-4626 represents a maturation point for DeFi infrastructure. By establishing a universal language for yield-bearing tokens, it reduces integration costs, improves security through standardization, and unlocks composability that was previously impractical. For users, it means a more consistent experience across protocols. For builders, it means faster development cycles and broader interoperability. As DeFi continues to evolve, ERC-4626 vaults are becoming the foundational building blocks for the next generation of on-chain financial products.

Related Terms