{"id":"ERC-4626","name":"Tokenized Vaults","status":"Final","chain":"both","category":{"id":"defi","name":"DeFi Patterns","description":"Vaults, bonds, and financial primitives"},"journeyStages":[{"id":"management","name":"Asset Management","description":"Managing assets over time"}],"uxImpact":"Users deposit assets into yield-generating vaults and receive shares representing their proportional ownership — standardized DeFi yield. Design implications: show both share balance AND underlying asset value side-by-side, display real-time APY/yield earned, use previewDeposit/previewRedeem to show exact conversion rates before transactions, indicate deposit/withdrawal limits via maxDeposit/maxWithdraw, show fees transparently (entry/exit/management). Design decisions: whether to default UI to 'assets' or 'shares' view, how to represent slippage between preview and actual execution, whether to show historical yield vs projected yield, handling vaults with transfer restrictions.","hasDetailedContent":true,"content":{"id":"ERC-4626","summary":"ERC-4626 standardizes yield-bearing vaults. Deposit tokens, receive shares that grow in value. Whether it's Aave, Yearn, or Compound — same interface: deposit(), withdraw(), shares, assets. Users learn one pattern and can use any vault. Wallets can show all vault positions uniformly.","applicability":{"whenToUse":["Users deposit into yield vaults and need share-to-asset value clarity.","Your product lists vault positions from multiple protocols with one pattern.","Deposit and withdraw previews must show expected assets after fees."],"whenToAvoid":["Yield is informational only with no deposit or withdraw actions.","Each vault uses a bespoke API you cannot normalize to ERC-4626.","Users never see share balances or underlying asset equivalence."]},"designerTakeaways":["You can show vault value in assets users understand, not opaque share units.","You can reuse one deposit and withdraw flow across Aave, Yearn, and similar vaults.","You can label fees and post-deposit value so yield feels earned, not magical."],"designDecisions":[{"question":"Do you show shares, assets, or both?","recommendation":"Lead with asset value (USDC); expose share count in advanced details.","rationale":"Users think in deposits and dollar value, not internal share units."},{"question":"How is APY presented?","recommendation":"Label as estimated APY with source and update time.","rationale":"Vault yields change; over-precise APY feels guaranteed."},{"question":"What does withdraw preview include?","recommendation":"Show assets out, shares burned, and any delay or fee.","rationale":"Withdrawals can be async or penalized; surprises cause support load."},{"question":"How do you handle insolvency or pause?","recommendation":"Block deposit/withdraw with protocol-specific reason, not generic errors.","rationale":"Vault pauses are common; users need to know funds are safe but gated."}],"statesToDesign":[{"state":"Deposit preview","trigger":"User enters deposit amount.","userNeed":"Know expected shares and post-deposit balance.","designResponse":"Show assets in, estimated shares, and current exchange rate."},{"state":"Withdraw preview","trigger":"User enters withdraw amount.","userNeed":"Know assets received and timing.","designResponse":"Assets out, shares burned, cooldown if applicable."},{"state":"Position accruing","trigger":"Share price increases over time.","userNeed":"See earnings without manual refresh.","designResponse":"Live asset value; optional earned since deposit metric."},{"state":"Insufficient liquidity","trigger":"Vault cannot fulfill full withdraw instantly.","userNeed":"Queue or partial withdraw path.","designResponse":"Explain delay, queue position, or max instant amount."},{"state":"Vault paused","trigger":"Protocol pauses deposits or withdrawals.","userNeed":"Understand funds are locked temporarily.","designResponse":"Banner with reason link; disable actions with explanation."}],"problemsSolved":[{"problem":"Every DeFi protocol has different vault interface","oldWay":"Aave: deposit(), Yearn: stake(), Compound: mint() — all different","newWay":"Standard deposit/withdraw interface everywhere","impact":"critical"},{"problem":"Hard to calculate actual value of vault shares","oldWay":"Each vault has custom math for share→asset conversion","newWay":"convertToAssets(shares) and convertToShares(assets) standard","impact":"high"},{"problem":"Can't aggregate vault positions across protocols","oldWay":"Custom integration for each vault type","newWay":"One interface queries any ERC-4626 vault","impact":"high"}],"uxPatterns":[{"name":"Vault Deposit","description":"Standard deposit flow with share preview","mockup":"generic/vault-deposit","userFlow":["User enters deposit amount","App calls convertToShares(assets)","Shows expected share amount","Displays current exchange rate","User confirms deposit"]},{"name":"Vault Position","description":"Show current position with earnings","mockup":"generic/vault-position","userFlow":["User views positions","App queries share balances","Calls convertToAssets for value","Calculates earnings vs deposit","Shows profit/loss"]},{"name":"Withdraw Flow","description":"Redeem shares for underlying assets","mockup":"generic/vault-position","userFlow":["User chooses withdraw mode","Enter shares OR assets amount","App calculates other side","Shows shares to burn","User confirms withdrawal"]}],"uiComponents":[{"name":"VaultCard","description":"Summary of a vault position","states":["no-position","deposited","earning","losing"],"props":["vault","shares","assets","apy"]},{"name":"ShareAssetConverter","description":"Input that converts between shares and assets","states":["shares-mode","assets-mode"],"props":["shares","assets","exchangeRate","onChange"]},{"name":"APYIndicator","description":"Shows vault annual percentage yield","states":["positive","negative","loading"],"props":["apy","timeframe"]},{"name":"EarningsDisplay","description":"Shows profit/loss vs deposited amount","states":["profit","loss","break-even"],"props":["deposited","currentValue","earned"]}],"antiPatterns":[{"pattern":"Only showing share balance","why":"\"952.38 yvUSDC\" means nothing without conversion","instead":"Always show asset value: \"952.38 yvUSDC (~$1,050)\"","severity":"critical"},{"pattern":"Not explaining share price changes","why":"Users confused when share count doesn't match deposits","instead":"Explain: \"You deposited $1000, now worth $1050\"","severity":"high"},{"pattern":"Hiding withdrawal fees/slippage","why":"User expects $1000, gets $950","instead":"Show expected output AFTER fees clearly","severity":"critical"},{"pattern":"Not showing historical earnings","why":"Users can't see if vault is performing well","instead":"Track and display total earned over time","severity":"medium"}],"onMonad":[{"aspect":"Deposit Confirmation","ethereum":"Deposit takes 12+ seconds","monad":"Sub-second deposit confirmation","designImplication":"Position updates instantly"},{"aspect":"Yield Updates","ethereum":"Yield accrues per block (12s)","monad":"More frequent yield updates","designImplication":"Can show real-time yield accumulation"},{"aspect":"Reserve Consideration","ethereum":"Can deposit entire balance","monad":"10 MON reserve required for async execution safety","designImplication":"MAX deposit should subtract reserve"}],"keyTakeaways":["ERC-4626 = standard vault interface","ALWAYS show asset value, not just share balance","Provide both deposit-by-assets and withdraw-by-assets","Show earnings vs deposited amount clearly","Display fees/slippage before withdrawal"],"technicalNotes":"ERC-4626 extends ERC-20 (shares are tokens). Key functions: deposit(assets, receiver), mint(shares, receiver), withdraw(assets, receiver, owner), redeem(shares, receiver, owner). View functions: convertToShares, convertToAssets, previewDeposit, previewMint, previewWithdraw, previewRedeem, maxDeposit, maxMint, maxWithdraw, maxRedeem."},"sources":[{"label":"Official specification","url":"https://eips.ethereum.org/EIPS/eip-4626","type":"official-spec"},{"label":"Discussion","url":"https://ethereum-magicians.org/search?q=ERC-4626","type":"discussion"}],"urls":{"canonical":"https://www.eipsfordesigners.com/standards/ERC-4626","markdown":"https://www.eipsfordesigners.com/standards/ERC-4626/content.md","agent":"https://www.eipsfordesigners.com/standards/ERC-4626/agent.md","api":"https://www.eipsfordesigners.com/api/standards/ERC-4626","official":"https://eips.ethereum.org/EIPS/eip-4626","discussion":"https://ethereum-magicians.org/search?q=ERC-4626"},"freshness":{"lastReviewed":"2026-04-05","lastUpdated":"2026-04-05"}}