Vaults
DEPRECATED for product scope (2026-07-11). DAY is a yield router, not vault tech. Keep only as historical notes. See
38-technical-architecture.md.
DAY — Vaults (product + architecture)
Section titled “DAY — Vaults (product + architecture)”Date: 2026-07-11
Status: DEPRECATED — yield router only; vault product out of scope
Brand: DAY · Site: https://dayprotocol.com
Authority: docs/00-product-constitution.md (no custody, fee on yield only, owner sovereign)
Peers: Superform Forms (superform-core / src/forms)
1. What “vaults” means for DAY (three layers)
Section titled “1. What “vaults” means for DAY (three layers)”| Layer | Who holds assets | What DAY builds | Superform analog |
|---|---|---|---|
| L0 — Venue vaults | Suilend / NAVI / Scallop / Kamino / … | Adapters only (read_apy, deposit, withdraw) | Underlying ERC-4626 vault |
| L1 — DAY Form (wrapper) | Still venue + DAY position object | Form that wraps one venue market under DAY policy | ERC4626Form / Form instance |
| L2 — DAY Vault (product) | DAY vault object (shared) + user/agent shares | Curated / strategy vault users & agents deposit into | SuperVault / multi-source product |
Historical note only — we do NOT build L2 vault product. L0 stays external; we never reimplement Suilend.
Agent / Owner │ deposit / withdraw / harvest (x402-callable) ▼┌──────────────────────────────┐│ DAY Vault (L2) │ strategy, share accounting, fee skim on yield│ · policy: venues, caps ││ · Auto Yield OFF by default │└──────────────┬───────────────┘ │ via Forms ▼┌──────────────────────────────┐│ DAY Form (L1) │ one venue market adapter binding└──────────────┬───────────────┘ ▼ Venue vault (L0)2. Constitution constraints on vaults (non-negotiable)
Section titled “2. Constitution constraints on vaults (non-negotiable)”| Rule | Vault implication |
|---|---|
| No team custody | Vault is an on-chain object; ops keys never own principal |
| Always withdraw | Share redeem → assets to owner (or position), not team |
| Fee only on yield | Performance skim at harvest/compound inside vault waterfall; 0% on deposit/withdraw |
| Stake/deploy OFF default | Vault may hold liquid until owner enables Auto Yield / strategy arm |
| Agent cannot withdraw principal | Agent can deposit (if allowed) + harvest path; redeem principal = owner |
| Honest numbers | Vault APY from adapter read_apy / NAV math; null → N/A |
| Permissionless harvest | Keeper can harvest vault yield (bounty); cannot invent amounts |
3. Vault types we ship (phased)
Section titled “3. Vault types we ship (phased)”V1 — Single-venue DAY Form Vault (MVP)
Section titled “V1 — Single-venue DAY Form Vault (MVP)”- One vault → one venue market (e.g. Suilend USDC)
- Share token / position object = claim on that market under DAY fee policy
- Superform: one Form ↔ one vault
Use cases: simplest agent deposit, cleanest audit surface.
V2 — Strategy Vault (allocation)
Section titled “V2 — Strategy Vault (allocation)”- One vault → N Forms (e.g. 70% Suilend, 30% NAVI)
- Rebalance under owner/policy caps (not free-for-all agent)
- Superform SuperVault energy without EVM multi-chain day-1
V3 — Owner- or agent-linked Vault
Section titled “V3 — Owner- or agent-linked Vault”- Vault shares sit in owner position / vault policy
- Auto Pay residual from vault yield after survival
- This is the “autonomous capital” product
Not day-1
Section titled “Not day-1”- Permissionless anyone-lists-any-vault (Superform factory) — allowlist first
- Cross-chain vault share bridging as product core
- Fee-on-deposit vaults
4. Core objects (Sui-first sketch)
Section titled “4. Core objects (Sui-first sketch)”4.1 VaultConfig (shared)
Section titled “4.1 VaultConfig (shared)”VaultConfig { id, name, asset, // e.g. USDC type fee_skim_bps, // default 500; yield only auto_deploy_default_off, // true allowed_forms[], // Form ids / venue bindings max_tvl_micros?, paused: bool,}4.2 Vault (shared) — accounting
Section titled “4.2 Vault (shared) — accounting”Vault { id, config_id, total_assets_micros, // liquid + deployed (NAV) total_shares, liquid_micros, // not yet in venue deployed_by_form, // form_id → amount}4.3 VaultShare / position (owned by owner or agent)
Section titled “4.3 VaultShare / position (owned by owner or agent)”// Option A: fungible share coin (if we mint a share type)// Option B: Position object { vault_id, shares, owner }MVP recommendation: Position object (clearer agent policy + clawback rules); fungible shares later if needed.
4.4 Form (shared binding)
Section titled “4.4 Form (shared binding)”Form { id, vault_id?, // or registry global venue_id, // suilend | navi | … market_id, // venue-specific adapter_version, ready: bool,}Maps 1:1 to Superform “vault added to a Form.”
5. User / agent flows
Section titled “5. User / agent flows”Deposit
Section titled “Deposit”- Owner/agent calls
deposit(vault, amount)with asset - Shares minted by NAV (
amount / price_per_share) - Assets enter
Vault.liquid - If Auto Yield / strategy enabled by owner → Form.deploy(liquid→venue)
- Else stay liquid until owner arms strategy
Withdraw
Section titled “Withdraw”- Owner only (or account owner) burns shares
- If needed: Form.withdraw from venue (min amount)
- Asset out to owner (or position)
- No fee on withdraw
Harvest (permissionless keeper)
Section titled “Harvest (permissionless keeper)”- Form.claim venue yield → vault
- Skim fee_bps of yield only → fee sink
- Net yield compounds to vault NAV (or Auto Pay residual policy)
- Event:
VaultHarvested { gross, skim, net }
Rescue (steal Superform)
Section titled “Rescue (steal Superform)”- Bridge-funded deposit below
minOut→ no share mint / reverse; funds to owner path - Never leave principal in ops wallet
6. API / product surface (dayprotocol.com)
Section titled “6. API / product surface (dayprotocol.com)”| Route | Role |
|---|---|
/markets | Browse L0 venues + L1/L2 DAY vaults (yield MTD first) |
/vaults | DAY vault list (product) |
/vaults/:id | NAV, yield, allocation, Deposit, withdraw (owner), strategy toggle |
/providers/:id | Group Forms/vaults by venue protocol |
| Agent | POST /v1/vaults/:id/deposit · previewDeposit · x402 pay path for fees/gas only — not principal custody |
Schemas (versioned):
day-vault.v1.jsonday-vault-plan.v1.json(deposit | withdraw | harvest | rebalance)- Keep existing
day-*-v1for routing/enablement
7. Superform → DAY vault steal list (vault-specific)
Section titled “7. Superform → DAY vault steal list (vault-specific)”| Steal | Superform | DAY vault |
|---|---|---|
| Form = adapter to one vault | Forms | Form per venue market |
| Single router entry | SuperformRouter | VaultRouter / plan executor |
| StateRequest | typed action | day-vault-plan.v1 |
| Shares after success | SuperPositions | mint shares only after assets in vault |
| actual vs quote | updateDepositPayload | bridge reconcile before mint |
| rescueFailedDeposit | yes | vault deposit rescue |
| Core immutable | non-upgradeable core | freeze fee/withdraw/share math package |
| Permissionless list | createSuperform | later; allowlist Forms at launch |
Don’t steal for vault MVP: multi-AMB stack, SuperPositions as UX requirement, EVM-only 4626 assumptions (Sui objects first).
8. Fee model inside vaults
Section titled “8. Fee model inside vaults”gross_yield (from venue claim) → protocol_skim = gross * fee_skim_bps / 10000 // default 500 → net_yield to vault NAV / compounddeposit amount → 0 feewithdraw amount → 0 feeOptional later: strategist fee as slice of skim, not extra deposit fee — still yield-only.
9. Implementation order
Section titled “9. Implementation order”| Wave | Deliverable | Done when |
|---|---|---|
| W0 | Spec + schemas day-vault.v1 | This doc + JSON schema |
| W1 | Move: VaultConfig + Vault + share/position + deposit/withdraw (liquid only) | Unit tests; no venue yet |
| W2 | Form + Suilend Form deploy/withdraw | Live prepare-only mainnet evidence |
| W3 | Harvest skim + events + keeper | Permissionless harvest path |
| W4 | FE /vaults + /vaults/:id Deposit | dayprotocol.com |
| W5 | Multi-form allocation vault | V2 strategy |
| W6 | Position binding + Auto Pay from vault residual | consumer integration |
10. Repo layout (versioned)
Section titled “10. Repo layout (versioned)”contracts/sui/ sources/ day.move # protocol fee primitives (existing) vault.move # Vault + shares (new) form.move # Form registry (new)schemas/ day-vault.v1.json day-vault-plan.v1.jsonruntime/ vaults/ # offchain planner / NAV helpers adapters/ # L0 venue adapters (existing)Package versioning: vault money math freezes with core major; new Forms = minor/adapters (see docs/22-versioning-strategy.md).
Copyright: Limitless Labs (see docs/23-copyright-and-licensing.md).
11. Success criteria
Section titled “11. Success criteria”- User/agent can Deposit into a DAY vault and see shares/NAV
- Owner can fully exit without team
- Yield harvest takes ≤5% of yield, never principal
- Strategy arm is opt-in
- Vault listed on markets with honest yield (or N/A)
- Contracts open-sourceable as a versioned immutable core when audit+UpgradeCap gate pass
12. Bottom line
Section titled “12. Bottom line”Yes — DAY builds vaults, not only “route to someone else’s market.”
- Forms wrap venues (Superform lesson)
- Vaults are the product agents deposit into
- Constitution still wins: no custody, fee-on-yield, owner exit, default-off deploy
- Version vault core like Superform core; evolve Forms fast
Next concrete step: schemas/day-vault.v1.json + Move vault.move skeleton (W0–W1).