Account Model
All on-chain state lives in Anchor accounts derived via PDAs (Program Derived Addresses).
Core Accounts
Protocol
Global configuration. One per deployment.
| Field | Description |
|---|---|
authority | Admin who can pause, update config |
protocol_fee_bps | Protocol fee in basis points |
max_management_fee_bps | Cap on curator fees |
keeper_incentive_bps | Keeper reward on deposits |
jupiter_program / titan_program | Allowlisted swap router programs |
points_enabled | Whether loyalty points are active |
paused | Emergency pause flag |
PDA: ["protocol"]
Vault
A portfolio created by a curator. Holds strategy configuration and accounting state.
| Field | Description |
|---|---|
curator | Creator and manager |
allocations[] | Target weights per asset (must sum to 10,000 bps) |
total_shares | Outstanding vault shares (u128) |
total_value_usd | Oracle-priced NAV |
share_mint | SPL token mint for vault shares |
rebalance_cadence | weekly, monthly, or quarterly |
management_fee_bps | Annual fee (linked to cadence tier) |
pending_allocations | Queued allocation update (timelocked) |
swap_in_progress | Rebalance swap lock flag |
PDA: ["vault", vault_id_le_bytes]
GlobalAssetReserve
Protocol-level shared reserve for a specific (mint, reserve_index) pair. Holds pooled assets across all vaults.
| Field | Description |
|---|---|
mint | Token mint (e.g., USDC, SOL) |
reserve_index | Numeric class ID (allows multiple reserves per mint) |
total_shares | Reserve-level share supply |
total_assets_native | Idle treasury + protocol-deployed balance |
protocol_balance | Amount deployed to yield adapter |
protocol_adapter | Allowlisted adapter program |
token_treasury | SPL token account for idle assets |
oracle_primary / oracle_fallback | Oracle accounts for pricing |
paused | Reserve pause flag |
PDA: ["global_asset_reserve", mint, reserve_index_le_bytes]
See Yield Adapter Interface for how protocol_adapter is invoked and how protocol_balance is refreshed.
VaultReservePosition
Per-vault entitlement over a GlobalAssetReserve. Tracks how many reserve shares this vault owns.
| Field | Description |
|---|---|
vault | Parent vault |
reserve | Parent reserve |
shares | Reserve shares owned by this vault |
PDA: ["vault_reserve_position", vault, reserve]
DepositorPosition
Per-depositor position within a specific vault.
| Field | Description |
|---|---|
vault | Vault this position is in |
owner | Depositor wallet |
shares | Vault shares held (u128) |
loyalty_points | Accrued loyalty points |
last_points_accrual_ts | Last time points were calculated |
PDA: ["position", vault, owner]
Depositor
Global account per depositor wallet. Aggregates points across all vault positions.
| Field | Description |
|---|---|
owner | Wallet address |
total_loyalty_points | Sum of points across all vaults |
PDA: ["depositor", owner]
DcaSchedule
A recurring deposit schedule for a depositor into a vault.
| Field | Description |
|---|---|
vault | Target vault |
owner | Schedule creator |
schedule_id | Unique ID per owner per vault |
amount_per_period | Amount deposited each execution |
interval | Seconds between executions (min 86,400 = 1 day) |
next_execution | Timestamp of next eligible execution |
max_executions | Total allowed executions |
executions_count | Completed executions |
active | Whether schedule is still running |
PDA: ["dca", vault, owner, schedule_id_le_bytes]
DepositAuthority
PDA that controls the depositor's USDC escrow account for a specific vault. Used by keepers to pull funds during deposit processing and DCA execution.
PDA: ["deposit_authority", vault, owner]