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 apreviewandmaxview. - 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.
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.
totalAssetsintegrity: 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
- Synchronous (ERC-4626) or asynchronous (ERC-7540)?
- NAV source: on-chain accounting, administrator feed or oracle?
- Eligibility: who can deposit, hold and redeem shares?
- Liquidity buffer and redemption gates.
- Fee model and accrual timing.
- Loss recognition for defaults and write-downs.
- 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:
- Attacker deposits 1 wei and receives 1 share.
- Attacker transfers a large amount of the asset directly to the vault (a “donation”), inflating price per share.
- 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.
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.


