Skip to content
  1. Home
  2. ERC Standards
  3. ERC Standards
  4. ERC-4626 Explained: Tokenized Vaults for Yield, Credit Funds and Tokenized Treasuries
ERC Standards

ERC-4626 Explained: Tokenized Vaults for Yield, Credit Funds and Tokenized Treasuries

ERC-4626 standardises deposit, withdraw and share accounting for yield-bearing vaults. Learn how it works, its use in tokenized funds and private credit, and its risks.

NUVZ Tokenization Team Updated 6 min read Technically reviewed

ERC-4626 is the Tokenized Vault Standard: a vault accepts an underlying ERC-20 asset and issues ERC-20 shares that represent a proportional claim on the vault’s assets. It standardises deposit, mint, withdraw and redeem functions plus the conversion maths between assets and shares, so any wallet, aggregator or protocol can integrate any vault the same way. It underpins much of DeFi yield and is increasingly used to wrap tokenized funds and private-credit strategies.

Key takeaways

  • A vault’s share token is an ERC-20; share price rises as the vault earns yield.
  • Four entry/exit paths: deposit (assets in), mint (shares out), withdraw (assets out), redeem (shares in), each with a preview and max view.
  • ERC-4626 assumes synchronous deposits and redemptions. Real-world funds with settlement delays need ERC-7540.
  • Guard against share-price inflation (donation) attacks, rounding errors and oracle manipulation.

How ERC-4626 works

Function Description
asset() The underlying ERC-20 (e.g. a stablecoin)
totalAssets() Assets managed by the vault, including accrued yield
convertToShares(assets) / convertToAssets(shares) Exchange-rate maths
deposit(assets, receiver) Deposit assets, receive shares
mint(shares, receiver) Receive an exact number of shares
withdraw(assets, receiver, owner) Withdraw an exact amount of assets
redeem(shares, receiver, owner) Burn shares for assets
previewX / maxX Simulations and limits for each action

Share price = totalAssets / totalSupply. When a credit strategy earns interest, totalAssets rises and every share is worth more — no rebasing of balances needed.

Where ERC-4626 fits real-world assets

Tokenized treasury and money-market products

On-chain wrappers around tokenized T-bill funds often use ERC-4626 so DeFi protocols can integrate them as standard yield-bearing collateral. See tokenized treasuries.

Private credit pools

Lenders deposit stablecoins into a vault; the vault deploys capital to borrowers and receives repayments; share price reflects interest and losses. Our private credit guide explains how loan-level tokens and pool vaults fit together.

Treasury management

Corporates can hold idle stablecoins in standardised vaults with clear accounting and auditable share prices.

Not sure which token standard fits your asset?Share your asset, investor base and jurisdictions — we will recommend a standard, chain and compliance model in a free 30-minute session.
Chat with an expert

Where it does not fit

Real-world funds rarely settle instantly. Subscriptions need cash to clear and KYC to complete; redemptions may require selling assets with T+1 or longer settlement, or wait for a monthly window. ERC-4626 requires deposits and redemptions to complete in the same transaction, so RWA vaults either hold a liquidity buffer or move to ERC-7540, which adds request/claim flows. Compare them in ERC-4626 vs ERC-7540.

Security considerations

  • Inflation / donation attack: an attacker deposits 1 wei, donates assets directly to the vault and rounds the next depositor’s shares to zero. Mitigate with virtual shares and assets (decimal offset), a seeded initial deposit or minimum deposit sizes.
  • Rounding direction: always round in the vault’s favour (down on shares minted, up on shares burned) as the standard requires.
  • totalAssets integrity: if it depends on an external NAV or oracle, manipulation of that feed changes share price. Use robust oracles and update controls.
  • Compliance: for securities, the share token itself must be restricted — e.g. make the vault share an ERC-3643-style permissioned token or implement ERC-7943.
  • Fees: management and performance fees should be minted as shares or deducted transparently in totalAssets.

Design checklist for an RWA vault

  1. Synchronous (ERC-4626) or asynchronous (ERC-7540)?
  2. NAV source: on-chain accounting, administrator feed or oracle?
  3. Eligibility: who can deposit, hold and redeem shares?
  4. Liquidity buffer and redemption gates.
  5. Fee model and accrual timing.
  6. Loss recognition for defaults and write-downs.
  7. Audit scope including economic attack scenarios.

Share-price maths in practice

ERC-4626 vaults price shares as total assets divided by total shares. Consider a private-credit vault:

Event Total assets Total shares Price per share
Launch: investor A deposits 1,000,000 USDC 1,000,000 1,000,000 1.0000
Month 1 interest accrues (+8,000) 1,008,000 1,000,000 1.0080
Investor B deposits 504,000 USDC 1,512,000 1,500,000 1.0080
Month 2 interest (+12,000) 1,524,000 1,500,000 1.0160
Borrower default write-down (−30,000) 1,494,000 1,500,000 0.9960

Every holder shares gains and losses pro-rata, and no balances need rebasing. The critical question is what drives totalAssets: on-chain balances, an administrator’s NAV or an oracle. That choice drives most of the security and governance design.

Mitigating the inflation (donation) attack

The classic attack on empty vaults:

  1. Attacker deposits 1 wei and receives 1 share.
  2. Attacker transfers a large amount of the asset directly to the vault (a “donation”), inflating price per share.
  3. The next depositor’s deposit rounds down to zero shares; the attacker redeems and captures it.

Mitigations, ideally combined:

  • Virtual shares and assets (a decimals offset) so rounding losses become negligible.
  • Seed the vault with an initial deposit from the issuer that is never withdrawn.
  • Minimum deposit sizes and slippage checks (minShares) on deposits.

Fees inside a vault

Fee Common implementation
Management fee Accrue over time by minting shares to the fee recipient
Performance fee Mint shares on gains above a high-water mark
Entry / exit fee Adjust previewDeposit / previewRedeem and document clearly

The standard requires previews to include fees, so integrators see accurate numbers.

Integrating RWA vault shares with DeFi

Vault shares can serve as collateral in lending markets or liquidity in AMMs. For RWA vaults, check:

  • Whether shares are permissioned — DeFi contracts may need verified identities.
  • Oracle pricing — lenders must price shares from a reliable NAV source.
  • Redemption liquidity — liquidators need a way to exit positions.

Frequently asked questions

Yes. Vault shares are ERC-20 tokens, so they can be transferred, used as collateral or listed — subject to any restrictions you add.

Indirectly. The vault holds an on-chain asset (a stablecoin or tokenized fund unit) and its strategy may finance real-world loans or securities, with value reported back into totalAssets.

ERC-7540 extends ERC-4626 with asynchronous request and claim steps for deposits and/or redemptions, which suits funds with settlement delays.

Yes. Add transfer restrictions to the share token or issue shares through a permissioned standard so only eligible investors can hold them.

The standard defines a single underlying asset. Multi-asset entry points sharing one share token are covered by ERC-7575.

Track price per share over time; returns are the change in price per share since deposit, net of fees already reflected in NAV.

Written by the NUVZ Tokenization Team

NUVZ is the RWA and Web3 engineering brand of ESS ENN Associates (est. 1993). Our team has designed and shipped tokenization platforms for real estate, education loans, solar PPAs, energy, carbon credits, bank deposits and trade documents. About us · Case studies

This article is for general information only and is not legal, tax or investment advice. Token standards evolve — always confirm the current status of an ERC at eips.ethereum.org and take advice from qualified counsel in each jurisdiction before issuing tokens.

Keep reading

Related guides

All insights →

Get Expert Advice on Your Token Design

Questions about this standard or your own tokenization use case? Send us a note. A NUVZ engineer will reply within one business day.

Prefer a call? Pick a 30-minute slot with our team.

Book a 30-min expert call
  • Mutual NDA available before you share details
  • Reply within one business day
  • Your data is used only to answer your enquiry

Protected against spam. We never sell or share your data with third parties for marketing.

Chat with our experts