A curated guide to onchain vaults, from your first ERC-4626 contract to production curator systems, async accounting, structured products, and the security work that keeps depositor funds safe.
A vault is a smart contract that takes a deposit, issues shares that represent a claim on a growing pool of assets, and puts that capital to work. The pattern now sits under a large share of DeFi: yield aggregators, curated lending, liquid staking and restaking wrappers, structured products, and institutional asset management all run on it. There are awesome lists for Solidity, for Diamonds, and for DeFi in general, but there was no single map for vaults. This is that map.
Every entry links to a primary source, an EIP page, an official doc, a protocol's own repository, or the author's own writing. Each has a one line description of what you learn and a level tag so you can read in order. A few historical protocols are included where their design still teaches something builders reinvent today, and they are labeled as such.
Levels: (beginner) first exposure to the idea, (intermediate) you can already read Solidity and want the mechanism, (advanced) protocol-grade architecture, accounting internals, and security.
- Standards and EIPs
- Foundations: What Is a Vault
- Reference Implementations and Libraries
- Security: Attacks and Defenses
- Testing and Formal Verification
- Yield Aggregator Vaults
- Curated Lending Vaults
- Curators and Curation
- Institutional and Generalized Vault Frameworks
- Structured Products and Tranched Vaults
- Structured Credit Foundations (TradFi)
- Options and Structured-Note Vaults
- Restaking and LRT Vaults
- Credit and RWA Vaults
- Stablecoin and Synthetic-Dollar Vaults
- Liquidity Management Vaults
- Asynchronous and Multi-Strategy Architecture
- Deep-Dive Articles and Research
- Videos, Talks, and Courses
- Live Data, Dashboards, and Risk
The specifications that define what a vault is and how it must behave.
- ERC-4626: Tokenized Vaults - The core specification defining the tokenized vault interface, the deposit, mint, withdraw, and redeem methods, the share-to-asset conversion functions, and the required rounding directions. (intermediate)
- ERC-7540: Asynchronous ERC-4626 Tokenized Vaults - Extends ERC-4626 with request-based asynchronous deposit and redemption flows and a pending, claimable, claimed request lifecycle for vaults that cannot settle in a single transaction. (advanced)
- ERC-7575: Multi-Asset ERC-4626 Vaults - Separates the share token from the vault entry points so a single share can be backed by multiple assets, and externalizes the ERC-20 share accounting. (advanced)
- ERC-7535: Native Asset ERC-4626 Tokenized Vault - Adapts ERC-4626 to use native ETH as the underlying asset through the 0xEee address convention and payable deposit paths. (intermediate)
- ERC-6909: Minimal Multi-Token Interface - A minimal multi-token standard that drops callbacks and batching from ERC-1155 and uses a combined allowance and operator permission model, increasingly used for vault share accounting. (intermediate)
- ERC-5115: SY Token, Standardized Yield - Defines the Standardized Yield interface that wraps yield-bearing assets behind uniform deposit, redeem, and exchange-rate methods, covering AMM LP and reward-token mechanisms that ERC-4626 alone cannot represent. (advanced)
- EIP-4626 Discussion Thread - The original Ethereum Magicians thread where the standard was debated, covering fee handling, rounding, fee-on-transfer tokens, and the rationale for keeping both withdraw and redeem. (advanced)
- EIP-7540 Discussion Thread - The thread behind the async vault standard, documenting the design debate over request lifecycle states, operator permissions, and backward compatibility with ERC-4626. (advanced)
Start here if vaults are new to you. These explain the share and asset model before you touch production code.
- ERC-4626 Tokenized Vault Standard - A plain-language introduction from ethereum.org explaining what a tokenized vault is and how shares represent proportional ownership of a single underlying ERC-20 asset. (beginner)
- ERC-4626 Interface Explained - A function-by-function walkthrough from RareSkills showing how share and asset accounting works and how deposits, redemptions, and yield accrual move the share price. (intermediate)
- How to Use ERC-4626 with Your Smart Contract - A hands-on QuickNode guide that builds a vault by inheriting an ERC-4626 base contract, deploys it to a testnet, and deposits an underlying token to mint shares. (intermediate)
- ERC4626 Vaults: Secure Design, Risks, and Best Practices - A build-oriented Speedrun Ethereum guide pairing the core vault functions with the first-depositor inflation attack, reentrancy, rounding, and fuzz-testing practice. (intermediate)
- ERC-4626: Tokenized Vaults (L2IV Research) - An overview covering deposit and withdraw mechanics, share conversion, fee handling, EIP-2612 permits, and security lessons drawn from the Rari and Cream incidents. (intermediate)
Battle-tested code to read, inherit, or fork. Reading these side by side is one of the fastest ways to learn the standard.
- OpenZeppelin ERC4626.sol - The production ERC-4626 base contract showing how the rounding rules and the virtual assets and shares inflation-attack mitigation are implemented in Solidity. (intermediate)
- OpenZeppelin ERC-4626 Documentation - Explains the inflation attack against empty vaults and the virtual-shares-with-decimals-offset defense, with a worked example of adding entry and exit fees while keeping preview functions accurate. (intermediate)
- Solmate ERC4626.sol - A minimal implementation using fixed-point math with beforeWithdraw and afterDeposit hooks, useful for reading the standard's accounting stripped to essentials. (advanced)
- Solady ERC4626.sol - A gas-optimized ERC-4626 implementation that exposes virtual shares and a decimals offset through overridable functions. (advanced)
- snekmate ERC-4626 (Vyper) - Pcaversaccio's audited, security-focused Vyper library, including a modern gas-efficient ERC-4626 vault with unit, property-based, and invariant tests, the canonical Vyper counterpart to the Solidity implementations. (intermediate)
- yield-daddy - ERC-4626 wrapper contracts and factories that adapt Aave V2 and V3, Compound, Euler, and Lido stETH positions into the vault interface. (intermediate)
- PoolTogether V5 PrizeVault - A well-audited, spec-strict ERC-4626 wrapper that routes deposits into an underlying yield source and contributes the accrued yield to a shared prize pool instead of paying it out pro rata. (intermediate)
- ERC-7540 Reference Implementations - Four minimal async vaults, controlled async deposit, controlled async redeem, fully async, and timelocked redeem, that show how the request lifecycle is coded over ERC-4626. (intermediate)
The failure modes that have drained real vaults, and the patterns that prevent them. Read this section before you ship.
- A Novel Defense Against ERC4626 Inflation Attacks - Walks through how the inflation attack works and compares router, internal-balance, and dead-shares mitigations before deriving the virtual-offset defense used in the reference implementation. (advanced)
- Overview of the Inflation Attack - A step-by-step derivation from MixBytes of how share-price manipulation through direct token donation lets an attacker capture a later depositor's funds, with the arithmetic worked out. (intermediate)
- Exchange Rate Manipulation in ERC4626 Vaults - Catalogs first-deposit frontrunning along with direct, stealth, flash-loan, and debt-repayment donation variants, then weighs mitigations such as dead shares, virtual deposits, and internal balance tracking. (advanced)
- Exploring ERC-4626: A Security Primer - Walks through recurring pitfalls including rounding direction, fee-on-transfer tokens, decimal mismatches, and preview-versus-convert misuse, using the Rari and Cream failures as examples. (intermediate)
- ERC-4626 Tokens in DeFi: Exchange Rate Manipulation Risks - Focuses on the integrator side and shows how a protocol that prices ERC-4626 shares off the vault's internal assets-per-share can be exploited even when the vault itself is compliant. (intermediate)
- Solodit Checklist Explained: Donation Attacks - An auditor checklist entry from Cyfrin showing with code how direct token transfers manipulate balance-based accounting and which patterns prevent it. (intermediate)
- So You Want to Use a Price Oracle - samczsun's landmark writeup on oracle manipulation, dissecting the bZx, Harvest, and Synthetix exploits and the defenses, the foundational reference for why reading a spot price mid-transaction is dangerous. (advanced)
- ResupplyFi Hack Analysis - Post-mortem from Ackee of the 2025 Resupply exploit, tracing how a donation into a nearly empty ERC-4626 vault drove the exchange rate to zero through floor division and bypassed the solvency check. (advanced)
- StakedUSDeV2 Breaks the ERC-4626 Standard - A Code4rena finding on Ethena's staking vault showing how a cooldown-gated withdraw path can make a live vault non-compliant with ERC-4626, a concrete example of standard-conformance risk. (advanced)
- ERC4626 Inflation Attack Mitigation (PR #3979) - The pull request that added virtual shares to OpenZeppelin's ERC4626, with review discussion covering the math and trade-offs of the decimals offset. (advanced)
- Auditing Vault-Based Protocols in DeFi - A security firm's field guide to reviewing vault protocols, covering share-price manipulation, accounting drift, access control on strategy routing, and the invariants worth testing. (advanced)
Prove your vault meets the spec rather than hoping it does.
- a16z erc4626-tests - A Foundry property-test suite that checks any ERC-4626 vault for round-trip behavior, balance and allowance updates, non-reverting view functions, and preview accuracy, meant to be inherited by your own test contract. (advanced)
- crytic/properties ERC-4626 Suite - Reusable Echidna and Medusa invariants from Trail of Bits grouped into accounting, rounding, and security property sets that a vault can fuzz against for conformance and inflation resistance. (advanced)
- Reusable Properties for Ethereum Contracts - The Trail of Bits writeup explaining the reasoning behind the reusable ERC-4626 and ERC-20 invariants and how to wire them into a fuzzing harness. (intermediate)
- How to Fuzz ERC-4626 Vaults - A hands-on Recon guide to building an invariant-fuzzing harness for a synchronous vault, covering the properties to assert and the setup that catches accounting and rounding bugs. (intermediate)
- How to Fuzz ERC-7540 Async Vaults - The async counterpart from Recon, showing how to model the request lifecycle and settlement so a fuzzer can reach the states where async vaults break. (advanced)
- erc7540-reusable-properties - A set of reusable ERC-7540 invariants (properties 7540-1 through 7540-7) from Recon, built with Centrifuge and validated against production deployments, with Foundry and Medusa configs, ready to inherit into an async vault's test suite. (advanced)
- The Recon Book - A free handbook on invariant testing and fuzzing for Solidity, useful as the broader method behind the vault-specific fuzzing guides. (intermediate)
- Is My ERC-4626 Vault Token Up to the Standard? - Runtime Verification compares the a16z property suite and the ERCx service and covers round-trip properties and functional correctness for both deployed and undeployed contracts, the formal-methods complement to fuzzing. (advanced)
Vaults that route deposits into strategies and compound the returns. The original vault use case.
- Yearn V3 Vaults Overview - Describes how Yearn V3 separates the system into allocator vaults, standalone ERC-4626 tokenized strategies, and optional periphery contracts such as accountants and debt allocators. (intermediate)
- Yearn V3 Tokenized Strategy Specification - Documents the immutable-proxy delegatecall pattern that routes ERC-4626 and accounting logic to a shared implementation, leaving each strategy to hold only yield-source-specific code. (advanced)
- yearn/tokenized-strategy - Source for the Yearn V3 TokenizedStrategy base and BaseStrategy that single-strategy ERC-4626 vaults delegate their standardized vault logic to. (advanced)
- yearn-vaults-v3 Technical Specification - Details the Vyper multi-strategy allocator vault, its factory deployment, debt management across strategies, and the profit-reporting and loss-accounting flows. (advanced)
- Yearn V2 Vaults Overview - Describes the earlier model where up to twenty per-vault strategies with capital limits are ordered in a withdrawal queue and harvested by keeper bots. (intermediate)
- yearn-vaults-v2 Specification - Specifies V2 vault accounting, strategy debt ratios, harvest and report mechanics, and the governance, guardian, and strategist role model. (advanced)
- Beefy Vault Contract - Walks through the BeefyVaultV7 contract that mints mooToken shares and routes deposited tokens into a separate, upgradeable strategy contract to isolate strategy risk. (intermediate)
- Beefy Strategy Contract - Explains the Beefy strategy contract and its harvest flow that claims farm rewards, swaps them to the underlying asset, and redeposits to auto-compound. (intermediate)
- beefyfinance/beefy-contracts - Public repository of Beefy vault and strategy contracts with the deployment and testing scripts used for community-submitted auto-compounding strategies. (advanced)
- Tokemak Autopilot - Documents how Tokemak Autopilot deploys an ERC-4626 Autopool across a fixed set of liquidity destinations and continuously rebalances deposits toward the best risk-adjusted return. (advanced)
- Summer.fi Lazy Summer Protocol Documentation - Documents the Fleet vaults that deploy deposits across yield-generating Arks with keeper-driven rebalancing inside FleetCommander constraints and externally set risk parameters. (advanced)
- OasisDEX/lazy-summer-protocol - Solidity source for the Lazy Summer Protocol, including the FleetCommander, Ark strategy adapters, reward auctions, and the constrained rebalancer that keepers call. (advanced)
- Idle Best Yield Architecture - Covers how the Best Yield IdleToken vault allocates a single asset across lending protocols using off-chain-computed allocations that trigger on-chain rebalances. (intermediate)
- Idle Yield Tranches Architecture - Describes the IdleCDO contract that pools deposits, mints senior AA and junior BB tranche tokens, and routes funds through a strategy proxy to a downstream yield source. (advanced)
- Sommelier Protocol V2 Contract Architecture - Explains the Cellar V2 system of ERC-4626 vaults together with the Registry and PriceRouter contracts that price multi-token positions and constrain permitted adaptors. (intermediate)
- Sommelier Building Adaptors - Details how adaptor contracts let a strategist call external DeFi protocols while the registry limits which positions are allowed. (advanced)
- Harvest Finance Vaults - Introduces the model where deposits mint fToken shares whose price rises as the attached strategy harvests and reinvests rewards. (beginner)
- Harvest Coding Strategies Guide - Explains the vault-callable strategy interface and the doHardWork method that invests underlying tokens, liquidates reward crops, and reinvests the proceeds. (advanced)
The curator model, where a permissioned role allocates pooled deposits across isolated lending markets under caps. One of the fastest-growing vault categories.
- Introducing MetaMorpho: Permissionless Lending Vaults on Morpho Blue - Explains how a MetaMorpho ERC-4626 vault pools depositor liquidity and allocates it across isolated Morpho Blue markets under supply caps set by a curator. (beginner)
- Curator (Morpho Docs) - Defines what the curator role controls in a Morpho vault, which markets are enabled, exposure caps, appointing allocators, and the timelocks that gate those changes. (beginner)
- Morpho Vault V2 (Morpho Docs) - Documents the second-generation vault, covering its adapter system for routing to multiple protocols, the abstract id-and-cap risk model, and the owner, curator, allocator, sentinel role separation. (intermediate)
- Security Considerations for Vault Curators - Catalogues the attack surface a curator must guard against, including faulty and reverting oracles, ERC-4626 donation and inflation manipulation, and adapter-removal frontrunning. (advanced)
- Gates in Morpho Vaults - Describes the gate contracts that let a curator restrict who can deposit, receive, send, or withdraw shares to build permissioned or compliance-constrained vaults. (intermediate)
- morpho-org/metamorpho - Source for the original MetaMorpho ERC-4626 vault, showing the supply and withdraw queue logic, per-market caps, timelocked cap changes, and the role-based access modifiers. (advanced)
- morpho-org/metamorpho-v1.1 - The V1.1 fork, useful for diffing its bad-debt handling, mutable name and symbol, and deployment changes against the original implementation. (advanced)
- Euler Vault Kit Whitepaper - Describes how the Euler Vault Kit builds ERC-4626 credit vaults with borrowing and how the Ethereum Vault Connector links vaults together as collateral and liabilities. (advanced)
- Euler Vault Kit Developer Overview - Developer entry point covering the EVault contract structure, its module system, and the difference between governed and ungoverned vaults. (intermediate)
- Introducing Euler Earn - Introduces an ERC-4626 meta-vault that lets a curator allocate one deposited asset across selected Euler markets or other approved ERC-4626 vaults. (intermediate)
- euler-xyz/euler-earn - Source for Euler Earn, a MetaMorpho-v1.1 fork, showing how the supply queue, withdraw queue, and per-strategy caps adapt to allocate over generic ERC-4626 strategy vaults. (advanced)
- Gearbox: One Pool, Many Markets - Documents the model where a single passive ERC-4626 liquidity pool funds multiple isolated credit markets, each capped by its own debt ceiling. (intermediate)
- Silo Finance V2 - Source for a lending protocol that builds isolated markets as paired ERC-4626 vaults, isolating each collateral asset's risk while a bridge asset connects markets for shared liquidity. (advanced)
- Sturdy V2 Documentation - Documents a two-tier design where siloed lending pairs isolate collateral risk and a Yearn V3 aggregator vault allocates a single deposited asset across whitelisted silos. (advanced)
Vaults are only as good as the people allocating them. This section covers how professional curators reason about risk, and the writeups that dissect the model's incentives and failures.
- Gauntlet VaultBook - A live methodology hub from one of the largest curators, explaining its curation approach, risk factors, and the per-vault optimization and risk parameters it sets. (intermediate)
- Steakhouse Financial: Risk Management Framework - Documents Steakhouse's multilayered risk rating framework that grades collateral across asset, platform, and market layers on a letter scale. (advanced)
- Introducing the Re7 Risk Index - A curator's own methodology for scoring protocols across smart-contract, governance, economic, and third-party risk to size vault positions. (intermediate)
- Curve Market Health Scores Methodology - LlamaRisk explains how it computes quantitative market health scores for lending markets, including the inputs and thresholds that flag conditions needing action. (advanced)
- Gauging Slashing Risks of Symbiotic Networks - MEV Capital details a weighted, multi-category scoring method for evaluating the slashing risk a restaking vault takes on when it backs a network. (advanced)
- The Physics of On-Chain Lending (II) - A deep analyst treatment of the curator role model, the fee economics, and the game theory of vault runs. (advanced)
- DeFi's Black Box: How Risk and Yield Are Repackaged - A risk-analyst critique of curator incentive misalignment and the structural weaknesses of the curator model. (intermediate)
- Collapse of the DeFi Jenga: The Stream Finance Breakdown - An analyst post-mortem of a real curation failure and how the losses propagated through curator-managed vaults. (intermediate)
Generalized vault stacks built for professional asset managers, where a strategist executes whitelisted actions and an off-chain valuer prices the shares.
- Veda-Labs/boring-vault - Source for BoringVault, whose minimal core contract holds assets while the Teller handles deposits and withdrawals, the Accountant prices shares, and ManagerWithMerkleVerification plus DecoderAndSanitizer restrict strategist calls to merkle-whitelisted actions. (advanced)
- Veda Architecture and Flow of Funds - Traces how deposits, share issuance, oracle-based pricing, strategy execution, and queued withdrawals move between the BoringVault, Teller, Accountant, Manager, and DecoderAndSanitizer modules. (advanced)
- How DeFi Vaults Work: The Infrastructure Abstracting Onchain Yield - An introductory explanation of the BoringVault module split and merkle-tree whitelisting for readers new to how institutional vaults restrict strategist actions. (beginner)
- Aera BaseVault and Core Interactions - Aera V3 documentation on the BaseVault contract, covering guardian-submitted operations verified by merkle proofs, mandatory whitelisting, operation chaining, and configurable pre and post-operation hooks. (advanced)
- aera-finance/aera-contracts-public - Versioned contract snapshots of Aera's SingleDepositorVault and MultiDepositorVault implementations and their guardian-based execution layer. (advanced)
- Lagoon Vault Architecture Overview - Documentation on Lagoon's ERC-7540 request-and-settle flow, where a valuation provider posts NAV and a curator settles pending deposits and redemptions at a defined valuation point. (intermediate)
- superform-xyz/v2-periphery - Source for Superform v2 SuperVaults, an ERC-7540 vault with synchronous deposits and asynchronous redemptions that executes merkle-verified hook bundles through its strategy, aggregator, and escrow contracts. (advanced)
- Fluid (Instadapp) contracts - Public source for Fluid, whose liquidity layer underpins smart lending and smart vaults that share a single collateral and debt accounting system across products. (advanced)
- YelayLiteVault - Source for a diamond-style ERC-1155 single-asset vault that routes deposits through configurable strategy queues managed by role-based operators. (advanced)
- Index Coop index-protocol (Set Protocol V2) - A modular framework for tokenized, manager-curated asset baskets where a manager enables modules for issuance, trading, and strategy, maintained as a Set Protocol V2 fork. (advanced)
- IPOR Fusion Documentation - Documents a vault framework where a PlasmaVault holds assets and modular Fuse connector contracts route them to external protocols, while a curator role (Atomist) authorizes actions and an allocator agent (Alpha) rebalances across strategies. (intermediate)
- IPOR-Labs/ipor-fusion - Solidity source for IPOR Fusion, including the PlasmaVault, the Fuse connectors that whitelist protocol interactions, and the access-managed roles that gate allocation and rebalancing. (advanced)
- Enzyme (Onyx) Architecture Overview - Architecture docs for the oldest onchain asset-management vault protocol, whose modular shares-plus-components design deliberately extends beyond ERC-4626 for custom fees, multi-asset strategies, and granular permissions. (intermediate)
- VaultCraft V2 Safe Smart Vaults - Documents a vault framework built as Safe modules, letting a manager run strategies from a Safe multisig while depositors hold tokenized shares. (intermediate)
- Concrete Vault Documentation - Introduces a vault framework with bounded off-chain value updates and modular strategy routing for building managed earn products. (intermediate)
- Upshift Documentation - Documentation for an institutional structured-yield vault platform that packages curated strategies into permissioned deposit products. (intermediate)
- Matador by Steer - A policy-enforcement layer for smart accounts that compiles readable rules into onchain bytecode, letting a vault bound a manager to specific callers, targets, functions, values, and state-dependent conditions instead of a blanket key. (advanced)
Vaults that split risk and return into distinct layers: principal and yield, or senior and junior tranches.
- Strata Protocol Overview - Documents how Strata splits yield from a base asset into ERC-4626 Senior and Junior tranches, with a CDO orchestrator routing user actions and a gain-split that targets a benchmark Senior APR while Junior TVL absorbs first losses. (intermediate)
- Strata-Markets/contracts - Solidity source for Strata's tranching vaults, where the CDO orchestrator forwards deposits and withdrawals to two ERC-4626 meta vaults for the Junior and Senior tranches alongside separate Accounting, Strategy, and APR Feed contracts. (advanced)
- Royco Dawn Documentation - Docs for Royco's tranching product, which splits a yield source into Senior, Junior, and Senior Liquidity Provider tranches so depositors choose a risk and liquidity profile. (intermediate)
- roycoprotocol/royco-dawn - Source for Royco Dawn, splitting a yield source into junior and senior tranches with a Kernel and Accountant enforcing coverage ratios and a Yield Distribution Model routing senior yield to junior. (advanced)
- Pendle Documentation: Introduction - Explains how Pendle wraps yield-bearing tokens into SY and splits them into Principal Tokens and Yield Tokens so fixed principal and variable yield can be traded separately. (beginner)
- Pendle AMM Mechanics - Describes how the V2 AMM concentrates liquidity in a yield range that tightens toward maturity and serves both PT and YT trades from one PT/SY pool through flash swaps. (intermediate)
- Pendle V2 AMM Whitepaper - Derives the time-dependent AMM invariant, Principal Token pricing, and fee model that Pendle V2 uses to price and trade yield. (advanced)
- Yield Tokenization Protocols, How They Are Made: Pendle - An auditor's walkthrough from MixBytes of Pendle's SY standard, PT and YT minting, market and router contracts, AMM curve, and the oracle and ratchet protections against manipulation. (advanced)
- Tranchess Whitepaper - Documents how a single asset-tracking fund (QUEEN) splits into a low-volatility yield tranche (BISHOP) and a leveraged tranche (ROOK) that lend to and borrow from each other, with automatic rebalancing when leverage crosses thresholds. (intermediate)
- tranchess/contract-core - Solidity source for the Tranchess fund, implementing primary-market creation of QUEEN shares and their split into BISHOP and ROOK tranche tokens. (advanced)
- Buttonwood Tranche - Contracts that deposit a collateral token into a bond and mint a series of tranche tokens redeemed in a maturity waterfall, where senior tranches are repaid first and junior tranches absorb losses and capture upside. (advanced)
- Notional V3: What Is fCash - Documents fCash, a zero-coupon-bond token defined by currency and maturity whose positive and negative balances represent fixed-rate lending and borrowing claims. (intermediate)
- notional-finance/contracts-v3 - Source for Notional V3, showing how fCash markets, fixed-to-variable settlement, and leveraged vault strategies are implemented. (advanced)
- Napier: PT and YT, Tokenized Yield - Introduces stripping an ERC-5115 target asset into a Principal Token that redeems 1:1 at maturity and a Yield Token that captures accrued yield, deployed in permissionless isolated markets. (beginner)
- Spectra: Principal and Yield Token - Explains how Spectra splits an interest-bearing token into a discounted Principal Token redeemable 1:1 at maturity and a Yield Token that accrues future yield. (intermediate)
- perspectivefi/spectra-core - Implementation of Spectra's yield tokenization, including its EIP-5095 Principal Token, Yield Token, router, and factory contracts built with Foundry. (advanced)
- Sense Finance: Core Concepts - Explains the Divider and Adapter design that strips a target asset into fixed-term Principal and Yield Tokens traded on the YieldSpace-based Sense Space AMM. (intermediate)
- IPOR Protocol: Interest Rate Derivative - Documents IPOR's on-chain interest-rate swap in which payer and receiver exchange fixed and floating cash-flow streams against a liquidity-pool counterparty. (intermediate)
- Term Finance Documentation - Describes a non-custodial fixed-rate lending protocol modeled on tri-party repo where recurring sealed-bid auctions clear borrowers and lenders at a single market rate. (intermediate)
- BarnBridge Litepaper - Outlines SMART Yield fixed-rate tranching of variable lending yield and SMART Alpha volatility tranching, both structured as senior and junior risk layers. (intermediate)
- BarnBridge Docs: Junior Tranches - Specifies junior-token accounting in SMART Yield, including how juniors absorb yield shortfalls below the senior guarantee and exit through maturing jBOND NFTs. (advanced)
- SOFA.org Protocols - Documents an onchain structured-products system that locks deposits in ERC-1155 vaults minting position tokens for capital-protected and leveraged payoffs settled at a fixed strike and expiry. (intermediate)
- Alchemix v2 Transmuter - Explains the self-repaying-loan design, where collateral is deposited into yield strategies and a synthetic debt token is issued against it while the generated yield routes through a transmuter to repay the loan over time. (intermediate)
- Saffron Finance (saffron-finance/saffron) - A historical but instructive monorepo whose senior and junior tranche pools route a fixed lower yield to senior providers and a variable residual to junior providers layered over Compound lending. (advanced)
- Element Finance (delvtech/elf-contracts) - A historical principal-and-yield-token design that splits a yield-bearing position into a principal token redeemable 1:1 at maturity and a separate yield token, a clean study of the zero-coupon split that predates much of the current PT/YT ecosystem. (advanced)
- 88mph (88mphapp/88mph-contracts) - A historical fixed-rate design where the DInterest contract pools variable-yield deposits and pays each depositor a locked fixed rate, funded by selling the corresponding floating-rate bond to a counterparty. (advanced)
- Yield Protocol v2 (yieldprotocol/vault-v2) - A historical but rigorous fyToken design, ERC-20 zero-coupon tokens redeemable 1:1 after maturity that trade at a discount to give collateralized fixed-rate borrowing and lending. (advanced)
The traditional structured-credit machinery that onchain tranching is slowly rebuilding: waterfalls, coverage tests, and the CLO track record that came from them.
- Hastructure - An open-source structured-finance cashflow engine that models waterfalls, coverage triggers, and interest and principal priorities as data, a rare look at how a mature system structures the logic onchain tranching reimplements. (advanced)
- absbox - A Python analytics library over the Hastructure engine for cashflow projection and structured-credit analysis, usable as an offchain reference or differential-test oracle for an onchain waterfall. (advanced)
- CLO Coverage Tests - Explains the overcollateralization and interest-coverage tests, their trigger levels, the impaired-asset haircuts, and the cash-diversion cure that reroutes junior cash to pay down senior notes, the covenant machinery onchain vaults mostly lack. (intermediate)
- Understanding Collateralized Loan Obligations - A clear primer on CLO structure, the tranche stack from AAA down to equity, subordination, and the manager's role, useful context for anyone bringing the model onchain. (beginner)
- CLO Equity Performance (Cordell, Roberts, Schwert) - An empirical study of realized CLO equity returns across hundreds of deals, the clearest data on what the first-loss tranche is actually paid to hold the risk. (advanced)
Vaults that sell options or shape a payoff to generate premium, hedge, or underwrite risk.
- Building Decentralized Option Vaults - A vendor-neutral engineering walkthrough from Paradigm of decentralized option vault design, covering covered-call and protective-put strategies and the auction and settlement flow that turns deposits into option premium. (intermediate)
- Ribbon Finance: Theta Vault Architecture - The canonical description of the DeFi options vault pattern most later option-selling vaults copied, where a vault mints short options against collateral each week, auctions them for premium, and rolls at expiry. (intermediate)
- ribbon-finance/ribbon-v2 - A historical but production-grade reference for how a weekly-roll option-selling vault is implemented, covering vault accounting, auction settlement, and Opyn otoken minting. (advanced)
- Opyn Squeeth Monorepo - Contracts for the Crab Strategy vault, a rare onchain example of an automated short-volatility vault that pairs long ETH collateral with short Squeeth power-perpetual debt and rebalances to stay delta-neutral. (advanced)
- Squeeth Primer - Explains the Squeeth power perpetual and how the Crab vault earns funding by selling volatility while staying delta-neutral to ETH, the conceptual bridge to the contracts. (intermediate)
- Cega Documentation - Documents exotic structured notes built as EVM vaults, including fixed coupon notes that sell out-of-the-money puts for a fixed coupon while a knock-in barrier governs principal loss on large drawdowns. (intermediate)
- Thetanuts: Basic Vaults - Describes Basic Vaults that sell out-of-the-money European cash-settled options to market makers and tokenize the resulting call and put positions into transferable LP tokens. (intermediate)
- Y2K Finance: Earthquake - Source for a historical two-sided depeg-insurance vault built on an ERC-4626 variant with ERC-1155 epoch receipts, where a risk side underwrites stablecoin depeg coverage and a hedge side buys it, with collateral moving to the winning side at settlement. (advanced)
- An Explanation of DeFi Options Vaults (DOVs) - QCP's primer on the DeFi option vault model, how vaults systematically sell out-of-the-money options for premium and the risk and return profile depositors take on. (beginner)
Vaults built for restaking and liquid restaking, where deposits back external networks and take on slashing risk.
- Symbiotic Vault (Core Concepts) - Documents how a Symbiotic vault holds and delegates restaked collateral to networks, and how deposit, withdraw, and slashing accounting work across epochs. (intermediate)
- symbioticfi/core - Source for Symbiotic's core restaking contracts, including the vault, delegator, and slasher modules that compose into a restaking market. (advanced)
- Mellow Vault Architecture - Explains Mellow's modular LRT vault design, how a vault composes deposit, strategy, and validator-management modules to build a liquid restaking token. (intermediate)
- mellow-finance/flexible-vaults - Source for Mellow's flexible vault framework, a modular system for assembling restaking and yield vaults from swappable components. (advanced)
- Mellow Flexible Vaults: Architecture, Workflows, and Security Model - A detailed third-party walkthrough of the Flexible Vaults architecture, the deposit and withdrawal workflows, and the security model. (advanced)
- Byzantine-Finance/byzantine-contracts - Source for a restaking aggregation layer that deploys strategy vaults routing deposits across EigenLayer, Symbiotic, and native staking. (advanced)
Vaults that fund undercollateralized credit or tokenized real-world assets, usually with a senior and junior structure.
- Maple Smart Contract Architecture - Documents how Maple structures lending pools, pool delegates, loan managers, and withdrawal queues for institutional undercollateralized lending. (intermediate)
- maple-labs/pool-v2 - Source for Maple's V2 pools, showing the ERC-4626 pool, pool manager, loan manager, and withdrawal-manager contracts that run a managed credit book. (advanced)
- Huma Tranche Deposit Mechanics - Explains how Huma splits a receivables-financing pool into a senior tranche with capped fixed yield and a junior tranche that takes first loss for the residual. (intermediate)
- 00labs/huma-contracts-v2 - Source for Huma Protocol V2, implementing tranched pools, credit lines, and the receivable-backed lending flow. (advanced)
- OpenTrade Blockchain Protocol - Documents a vault-based protocol for tokenized fixed-income and treasury products, covering the deposit, settlement, and redemption flow for institutional RWA yield. (intermediate)
- Goldfinch Protocol - Structures each borrower pool into a junior first-loss tranche funded by backers and a senior second-loss tranche funded by a pooled senior vault, applying repayments to the senior tranche first. (intermediate)
- MetaStreet v2 - Pools lender capital into per-collection NFT lending vaults where depositors set their own price ticks, composing those ticks into senior and junior tranche exposure without an external oracle. (advanced)
- Tinlake (Centrifuge legacy) - Centrifuge's historical V1 securitization contracts that pool NFT-collateralized real-world assets and issue a senior DROP tranche protected against defaults and a junior TIN tranche that takes first loss for higher yield. (advanced)
Yield-bearing stablecoins and synthetic dollars implemented as vaults.
- Sky sUSDS (SUsds.sol) - Source for the sUSDS savings token, an ERC-4626 vault that accrues the Sky Savings Rate to USDS depositors through an internal rate-per-second accumulator. (advanced)
- Ethena StakedUSDe.sol - Source for sUSDe, an ERC-4626 staking vault that distributes protocol yield to USDe stakers with a vesting mechanism and a cooldown-gated withdrawal path. (advanced)
- Origin ARM (Automated Redemption Manager) - Source for Origin's ARM, a vault that provides instant redemption liquidity for a liquid staking token by holding a buffer and arbitraging the redemption queue. (advanced)
- Resolv: Staking stUSR and wstUSR - Documents how the USR synthetic dollar is staked into the yield-bearing stUSR and its wrapped ERC-4626 form wstUSR, and how insurance-pool yield is distributed. (intermediate)
- Aave Stable Vault - Source for a cross-chain fixed-rate savings vault where deposits into per-asset SubVaults earn a fixed per-second rate, funds are deployed into yield strategies such as Aave lending across chains, and a two-step request-and-execute withdrawal returns principal ahead of accrued interest when yield falls short. (advanced)
Vaults that manage concentrated liquidity positions and rebalance their price ranges.
- Gamma Strategies Hypervisor - A widely forked fungible-share vault that manages a concentrated Uniswap V3 liquidity position and rebalances its price ranges through a supervisor contract. (intermediate)
- Arrakis V2 Core - Source for Arrakis V2 vaults, which manage concentrated liquidity across multiple price ranges and expose the position as a fungible token with programmable rebalancing. (advanced)
- Steer Protocol Documentation - Documents a framework for automated concentrated-liquidity management vaults where off-chain strategy executors rebalance ranges within on-chain guardrails. (intermediate)
Vaults that cannot settle atomically, where deposits and redemptions become requests fulfilled in a later epoch, and vaults that allocate across many strategies at once.
- OpenZeppelin ERC-7540: Asynchronous Tokenized Vaults - Documents a modular ERC-7540 base with admin-controlled and time-delayed fulfillment strategies, covering the request lifecycle, controller and operator authorization, and preview-function security. (advanced)
- Centrifuge Protocol Vaults Architecture - Explains how Centrifuge structures BaseVault, async and sync-deposit vault variants, request managers, and transfer hooks within its hub-and-spoke multi-chain design. (advanced)
- centrifuge/protocol - The onchain asset-management protocol combining an immutable core with modular extensions for vaults, cross-chain adapters, valuation, and balance-sheet accounting. (advanced)
- Centrifuge V3.2: The Onchain Portfolio Manager - Describes the strategy-execution layer that authorizes whole multi-step workflows rather than single actions through an onchain VM, letting one vault rebalance tokenized treasuries, credit, and DeFi positions across chains under unified NAV accounting. (advanced)
- Securing Lagoon's Asynchronous ERC-7540 Vaults from V1 to V5 - An auditor's account from Nethermind of the failure modes specific to async vaults, including pending-to-settled state transition errors, races between synchronous and asynchronous paths, and share-price manipulation. (advanced)
- Manage Adapters (Morpho Vaults V2) - Walks through registering adapters via the timelocked flow, setting caps on adapter, collateral, and market ids, and safely delisting adapters by zeroing caps first. (advanced)
Long-form analysis of vault design and the economy that has grown around it.
- The Steakhouse View on Vaults - Argues that a vault should meet three properties: trustless onchain NAV accounting, a strategy that is transparent and announced in advance, and strict noncustodiality that keeps depositors in control of their withdrawals. (intermediate)
- Curators Explained - Introduces the curator role, how curators set strategy and earn management and performance fees, and four dimensions for evaluating one: track record, transparency, communication, and conflicts of interest. (beginner)
- Morpho Vaults V2: The Latest DeFi Breakthrough - Describes Vaults V2, the owner, curator, allocator, sentinel role split, the adapter layer that routes a single vault to multiple protocols, and the exposure caps and access controls. (intermediate)
- DeFi Curators in 2025: Navigating Chaos, Building Resilience - Traces curator TVL growth and analyzes how the 2025 Balancer exploit and Stream Finance collapse propagated through curator-managed vaults. (intermediate)
- The Vault Economy - Surveys vault types from single-protocol earn vaults to multi-strategy cross-chain deployments and presents a risk taxonomy that treats collateral selection as the central curation decision. (intermediate)
- Institutionalizing Risk Curation in Decentralized Credit - An academic study modeling DeFi lending as a two-layer system of ERC-4626 vaults and third-party curators, measuring curator concentration and correlated tail risk across Aave, Morpho, and Euler, and proposing standardized onchain disclosures. (advanced)
- YieldSpace: An Automated Liquidity Provider for Fixed Yield Tokens - The paper deriving the YieldSpace constant-power invariant, an AMM curve whose marginal price tracks a constant interest rate to maturity so a pool can quote fixed yields on discount tokens. (advanced)
- The Road to the Complete Vault - Traces the vault standard from ERC-4626 through 7540, 7575, and 6909 to BoringVault and the curator era, ending in a rubric for what a complete vault needs. (intermediate)
- From Tokenization to Vaults: The Onchain Capital Stack - Centrifuge's thesis that tokenization is only the first layer, and institutional assets need multi-asset, multi-execution-path, multichain, multi-share-class vault infrastructure composable enough to let vaults build on vaults. (intermediate)
- Tranching in DeFi - A survey of onchain tranching that separates tranching-as-a-product from tranching-as-a-service and maps the current senior and junior wave. (intermediate)
- An Overview of Senior-Junior Tranches in DeFi - A running research series tracking current tranching protocols mechanism by mechanism, including how thin junior liquidity forces the split ratio. (intermediate)
- Who Eats the Loss - Argues that DeFi yield needs structured loss protection and walks through why senior and junior tranching is the mechanism, from a protocol building it. (beginner)
- DeFi Risk Transfer: Towards A Fully Decentralized Insurance Protocol - An early formalization showing that DeFi insurance and DeFi tranching are the same mechanism seen from two sides, where the junior tranche is the insurance. (advanced)
Watch someone build and reason through a vault.
- ERC4626 Part 1: Tokenized Vault Explained - Walks through a minimal ERC-4626 vault in Solidity and shows how deposit, mint, withdraw, and redeem convert between assets and shares. (beginner)
- ERC4626 Vault Smart Contract Tutorial - A build-along tutorial that implements a tokenized vault on the standard and adds an entry and exit fee variant with source code. (beginner)
- Solidity Fridays with Joey Santoro: ERC 4626 Discussion - A discussion with ERC-4626 co-author Joey Santoro on the motivation behind the standard and its interface design decisions. (intermediate)
- Unchaining DeFi With ERC-4626: The Tokenized Vault Standard - Explains how ERC-4626 standardizes yield-bearing vault interfaces and what that composability enables for integrators and aggregators. (intermediate)
- Yearn V3: Permissionless Vaults with ERC4626 and Tokenized Strategies - Covers Yearn V3's modular architecture, where ERC-4626 tokenized strategies plug into multi-strategy vaults with optional periphery contracts. (advanced)
- Securing ERC4626 Implementations - Reviews common security pitfalls including the first-depositor inflation attack, rounding direction, and donation manipulation. (advanced)
- Advanced Smart Contract Development With Foundry - A free multi-project Cyfrin course covering DeFi protocol, stablecoin, and cross-chain rebase token development with vault accounting and testing practice. (intermediate)
Study real vaults in production, and the tools that rate their risk. Tie the numbers you see back to the accounting you have read.
- DeFiLlama Yields - Ranks live yield-bearing pools and vaults across chains by TVL and APY, with filters for ERC-4626 vaults and a view of each pool's underlying strategy. (beginner)
- vaults.fyi - Aggregates ERC-4626 and curator-managed vaults across networks into one table of TVL, seven-day yield, and holder counts for side-by-side comparison. (beginner)
- Yearn Vaults Explorer - Lists Yearn v2 and v3 vaults with net APY after fees, TVL, and chain, letting you tie front-end numbers back to on-chain vault accounting. (beginner)
- Morpho App - The production interface for MetaMorpho vaults, where each vault shows its allocation across Morpho Blue markets, supply caps, curator, and live rates. (beginner)
- Morpho Data Dashboards - Morpho's documentation index of its official Dune dashboards, including vault performance and vault curators, pointing to the canonical MetaMorpho analytics. (intermediate)
- Morpho Vaults and Curators Analysis (Dune) - An official Dune dashboard breaking MetaMorpho vaults and their curators down by TVL, allocation, reallocation activity, and yield on Ethereum and Base. (intermediate)
- Veda Dashboard (Dune) - A Dune dashboard tracking TVL and capital flows across Veda's BoringVault deployments. (intermediate)
- Xerberus Documentation - Documents an onchain risk-rating API that exposes per-vault and per-asset scores decomposing a vault into subscores across smart-contract, oracle, custody, and economic risk. (intermediate)
- DD.xyz - A vault data and risk platform from Webacy that assigns live risk scores and listing verdicts to ERC-4626 vaults across Morpho, Aave, Compound, and Yearn, alongside stablecoin peg and RWA monitoring. (intermediate)
- DIA DeFi Vaults and Lending Map - Tracks thousands of vaults across many chains with per-vault audits, TVL, oracle and timelock configuration, and curator track records. (intermediate)
- Dune Curated Vaults Data Catalog - Documents the decoded on-chain event tables Dune exposes for Morpho, Euler v2, Aave v3, Fluid, and other vault protocols, the raw tables for writing custom vault queries. (advanced)
- List All ERC-4626 Vaults On-Chain - A tutorial that programmatically enumerates every ERC-4626 vault across chains from on-chain data, showing how to detect and read deployed vaults directly instead of through a front-end. (advanced)
Contributions are welcome and held to a high bar. Read CONTRIBUTING.md for the format and the quality checklist before opening a pull request. In short: link to the primary source, describe what the reader learns in one neutral sentence, tag the level, and keep hype out.
Released under CC0 1.0.
