KAGURA 神楽

KAGURA is a continuous-time DeFi primitive on Solana. Two on-chain Anchor programs: a tick-attestation registry, and a USDC funding vault that compounds yield every block instead of every hour.

contact: hello@kagura.network
神楽KAGURA/ docs
v0.1.0 · pre-deployment← back to sitegithub →
concepts·treasury model

treasury model

the showcase vault uses a pre-funded treasury reserve. that's the simplest possible source — admin tops up usdc, ticks drain it. real production replaces this with a live yield source (drift funding capture, sanctum LST, phoenix MM).

two token accounts

kagura-vault holds usdc in two distinct pdas:

accountseedrole
principal_account[b"principal", vault.key()]the “real” vault balance backing all shares. deposits land here, withdraws drain here, ticks fill it.
treasury_account[b"treasury", vault.key()]the funding reserve. admin tops up. ticks transfer accrued amount treasury → principal.

the economic flow

cycletext
1     ┌──────────────┐2     │   admin       │  top_up_treasury(amount)3     └──────┬───────┘4            │  spl-token transfer56     ┌──────────────┐                       ┌─────────────────┐7     │  treasury     │ ── tick_funding ──→ │  principal       │8     │  (reserve)    │   ↑                   │  (backing shares)│9     └──────────────┘    │                   └─────────────────┘10                         │                            │11                         │                            │  withdraw(shares)12                         │                            ▼13                         │                       ┌─────────┐14                         │                       │  user   │15                         └─ accrued =            └─────────┘16                            principal × rate × elapsed_ms / (10000 × ms_year)

treasury runway

At a fixed rate r with constant principal P and treasury balance T, the vault can sustain its target apr for:

runway formulatext
1runway_years  =  T / (P × r)2 3example:4  treasury  = 100,000 USDC5  principal =  10,000 USDC6  rate      =  22%7 8  runway = 100_000 / (10_000 × 0.22)9        ≈ 45.45 years

At more realistic numbers (TVL approaching treasury):

aggressivetext
1treasury  = 100,000 USDC2principal = 100,000 USDC      (TVL = treasury)3rate      =  22%4 5runway = 100_000 / (100_000 × 0.22) ≈ 4.55 years6       = ~1659 days7       = ~ 39,792 hours8       = ~143,251,200 seconds9       = ~95,500,800 ticks at 1.5s cadence

real-yield replacements

kagura-vault is intentionally simple. The interface for swapping in a real yield source is to replace one cpi: the treasury → principal transfer becomes a cpi to the chosen yield primitive.

sourcecpinature
drift fundingdrift::deposit / withdrawvault holds a delta-neutral perp position; funding accrues continuously and is captured by the vault.
sanctum LSTsanctum::deposit_solvault holds an LST that compounds staking rewards into share price automatically.
phoenix mmphoenix::place_limit_ordersvault provides liquidity on phoenix clob; spread + maker rebate captured.
treasury reservespl-token transferwhat the showcase uses. admin pre-funds, ticks drain.

v1 of kagura-vault keeps the synthetic reserve so the math is observable from the on-chain accounts alone. v1.5 swaps it for drift funding capture. See changelog.