Introduction
ERC-4626 is a standardized framework designed to optimize and unify technical parameters for tokenized yield vaults. It provides a consistent API for vaults representing shares of a single underlying ERC-20 token, streamlining deposit, withdrawal, and balance-tracking functionalities. Primarily used in DeFi yield vaults, ERC-4626 enhances interoperability while offering optional ERC-20 extensions for flexibility.
Key Definitions
- Asset: The underlying ERC-20 token managed by the vault.
- Share: The vault’s token, redeemable for assets at a ratio defined by the vault.
- Fee: Charges imposed by the vault (e.g., deposit, withdrawal, or AUM fees).
- Slippage: Discrepancy between advertised and actual asset/share conversion rates (excluding fees).
Core Functions
1. Asset Management
asset()
→ Returns the ERC-20 address used for vault accounting.totalAssets()
→ Returns the total assets held by the vault.
2. Conversion Utilities
convertToShares(assets)
→ Calculates shares for a given asset amount.convertToAssets(shares)
→ Calculates assets for a given share amount.
3. Deposit & Mint
maxDeposit(receiver)
→ Maximum assets receivable in one deposit.previewDeposit(assets)
→ Simulates share allocation for a deposit.deposit(assets, receiver)
→ Deposits assets and mints shares toreceiver
.mint(shares, receiver)
→ Mints exact shares by deducting calculated assets.
4. Withdrawal & Redemption
maxWithdraw(owner)
→ Maximum withdrawable assets.previewWithdraw(assets)
→ Simulates shares burned for a withdrawal.withdraw(assets, receiver, owner)
→ Burns shares to send assets toreceiver
.redeem(shares, receiver, owner)
→ Burns shares for calculated assets.
5. Supply Tracking
totalSupply()
→ Total unredeemed vault shares.balanceOf(owner)
→ Returns an owner’s share balance.
Practical Usage
Deposit vs. Mint
- Deposit: Specify asset quantity → receive calculated shares.
- Mint: Specify share quantity → pay calculated assets.
Withdraw vs. Redeem
- Withdraw: Request assets → burn calculated shares.
- Redeem: Burn shares → receive calculated assets.
👉 Explore advanced vault strategies to maximize yield.
FAQs
1. Why use ERC-4626 over custom vaults?
It standardizes operations, reducing development overhead and improving interoperability across DeFi platforms.
2. How are fees handled in ERC-4626 vaults?
Fees are vault-specific and may apply to deposits, withdrawals, or AUM (e.g., a 0.1% performance fee).
3. Can ERC-4626 vaults support multiple assets?
No. Each vault manages a single ERC-20 token, ensuring clarity in asset/share ratios.
4. How does slippage affect conversions?
Slippage reflects real-time pricing differences between quoted and executed conversions (e.g., due to pool liquidity).
5. Is ERC-4626 compatible with existing ERC-20 wallets?
Yes. Shares are ERC-20 tokens, enabling storage in standard wallets like MetaMask.
👉 Discover top-performing vaults leveraging ERC-4626.
Conclusion
ERC-4626 revolutionizes yield aggregation by standardizing vault interactions, reducing fragmentation, and enhancing user control. Whether you’re a developer or investor, understanding its functions ensures efficient asset management in DeFi ecosystems.
For deeper insights, audit our vault integration guide or join community discussions.