YDS: Architecture - Kickstarter but with Yield
Overview
This page gives DeFi‑native engineers who already know Yearn V3 a concise, precise mental model for YDS. We inherit Yearn V3’s ERC‑4626 architecture and swap the profit sink: realized profits are represented as newly minted donation shares sent to a configured donation address (and burned first on loss) rather than being retained to compound to depositors.
Yearn V3 in one paragraph
Yearn V3 is a modular yield framework in which Allocator Vaults (ERC‑4626) accept deposits and allocate debt to one or more Strategies. In V3, a Strategy is itself a standalone ERC‑4626 vault (“Tokenized Strategy”) that deploys a single asset into a single external yield source. Strategies can be attached to multiple vaults and also accept direct deposits. The system is intentionally permissionless: anyone can deploy strategies and operate vaults, and composition happens at the ERC‑4626 boundary.
What YDS changes (and what it doesn’t)
Unchanged.
- The ERC‑4626 surfaces for vaults and strategies.
- Multi‑strategy vault composition and permissionless deployment.
- The periphery‑module model (role management, allocators, keepers, etc.).
- The Strategy author experience: inherit a minimal base, override a small set of hooks, and rely on the shared TokenizedStrategy implementation for standardized logic.
Changed (profit destination & share semantics).
- Vanilla V3: A strategy’s report()realizes profit/loss, may apply fees, and (for compounding flows) retains profit that unlocks to depositors over time, raising PPS.
- YDS: A strategy’s report()still realizes profit/loss, but all net profit is donated by minting strategy shares to the donation address. Losses first burn donation shares to keep user PPS flat; only losses beyond that buffer socialize into a lower PPS. YDS strategies therefore behave as principal‑tracking vaults: users do not accrue yield in PPS; all yield is redirected on‑chain to the donation address.
Why strategies are small (the immutable‑proxy pattern)
All tokenized strategies delegate standardized ERC‑4626 mechanics, accounting, and role gating to a shared audited implementation (e.g., TokenizedStrategy). Your concrete strategy inherits a thin BaseStrategy, stores only strategy‑specific state, and delegates the rest. This keeps strategist code tiny, reuses hardened logic, and enables cheap, permissionless deployment of single‑asset ERC‑4626 strategy vaults—exactly as in Yearn V3.
Components & definitions
- 
Allocator Vault (Vault). An ERC‑4626 contract that holds user deposits, mints vault shares, and allocates debt across attached strategies. In YDS deployments this role is often served by a Solidity port of the Yearn V3 vault (e.g., MultiStrategyVault.sol or vault.vy).
- 
Strategy (Yield Donating Strategy). A single‑asset ERC‑4626 vault that deploys into one external yield source. It can serve multiple vaults and accept direct user deposits. Profits are represented as newly minted donation shares sent to a configured donation address (and burned first on loss) rather than being retained to compound to depositors. 
- 
Asset. The ERC‑20 managed by the vault/strategy (e.g., DAI, WETH). All accounting is in units of this asset. 
- 
Shares. ERC‑20 receipts for vaults/strategies (ERC‑4626). In YDS, user shares are principal‑tracking: PPS is intended to stay flat in profit cycles because yield is diverted to donations. 
- 
Donation address (YDS). The on‑chain recipient of realized profit. YDS mints/burns shares at this address at report()time (mint on profit, burn on loss). Changing the donation address is a two step process that must be proposed and accepted by the vault management.
- 
Roles (strategy‑side). - 
Management: privileged configuration and trusted calls (e.g., report()cadence, keeper assignment).
- 
Keeper: automation address allowed to call report()(andtend()if used).
- 
Emergency admin: can pause intake and help unwind. (Enforced by strategy modifiers such as management/keeper/emergency gates.) 
 
- 
- 
Periphery modules (vault‑side). Optional, plug‑and‑play contracts for role management, debt allocation, accounting checks, keepers, and routers. YDS re‑uses the Yearn‑style periphery; donation replaces fee distribution in the strategy itself. 
System data‑flow (happy path, high level)
- Deposit. A user deposits the asset into a vault (or directly into a strategy) and receives shares.
- Allocation / Deploy. A vault updates debt to attached strategies. Each strategy invests deposits into its single external source via its _deployFundshook.
- Accrual. Rewards/interest accrue at the strategy. In YDS, this accrual is earmarked for donation, not for raising user PPS.
- Report & donate. A keeper/management calls the strategy’s report(). The strategy harvests, converts rewards to the underlying, and returns truthful total assets.- YDS: The base mints donation shares to the donation address on profit and burns donation shares on loss. PPS for users remains flat while the donation buffer exists.
- Compounding (vanilla): Profit is retained and (subject to unlock) increases PPS.
 
- Withdraw. Users redeem shares for underlying. In YDS, because profits were siphoned to donations, PPS is designed to track principal except when losses exceed the donation buffer.
Design invariants to internalize
- Single‑source strategies. Each strategy must deploy to exactly one external source. If you want multiple venues, orchestrate at the vault with multiple strategies.
- ERC‑4626 everywhere. Treat both vaults and strategies as standard ERC‑4626 endpoints: integrate with deposit/redeemand theconvertToAssets/convertToSharesviews; use keeper/management‑gated calls for reporting and maintenance.
- Donation at report. In YDS, donation happens only when report()settles P/L. Automate reporting so donations are realized on cadence, and remember that vault‑levelprocessReport(strategy)reads (it does not harvest) after the strategy has reported.
Yearn‑to‑YDS comparison (at a glance)
- Surface & composition: Identical (ERC‑4626 vaults + tokenized strategies; permissionless).
- Where yield goes: In Yearn strategies, yield is retained and compounds to depositors after the unlock period, while in YDS, yield is converted to donation shares sent to a donation address, keeping user PPS flat during profit cycles.
- Loss handling: In Yearn strategies, when a loss is realized, the price per share (PPS) drops immediately. In YDS, the system first burns donation shares to absorb losses, maintaining user PPS stability. Only when losses exceed the accumulated donation buffer will the PPS drop, socializing the remaining losses among all depositors.
- Reporting cadence: Same operational model (keepers/management). In YDS it is essential for timely donation.
- Periphery usage: Same modules and roles; YDS simply changes the accounting outcome at report time.