Account Structure
Fund instructions list the main config account under the Anchor/IDL name fundState (camelCase of Rust fund_state). The serialized account types are still named FundState, BasisFundState, and DefenseFundState, so generated clients typically expose program.account.fundState, program.account.basisFundState, and program.account.defenseFundState for .fetch(...).
Keystone Core
PortfolioState
["core_portfolio", portfolio_id]
Per-portfolio config, fund links, and ksCORE supply
CoreAuthority
["core_authority", portfolio_id]
PDA that signs fund CPI calls
CoreShareMint
["core_share_mint", portfolio_id]
ksCORE token mint
CoreUserPosition
["core_user_position", portfolio_id, user]
Per-user ksCORE balance and deposit tracking
CoreUserRegistry
["core_user_registry", user]
Single-portfolio enforcement — records active portfolio per wallet
Keystone Alpha Fund
FundState
["fund", fund_id]
Main config and state
FundAuthority
["fund_authority", fund_id]
PDA that signs token operations
ShareMint
["share_mint", fund_id]
Share token mint
UserPosition
["user_position", fund_id, user]
Per-user deposit/withdrawal tracking
CoreGate
["core_gate", fund_state]
Access control PDA — when enabled, only the stored core_authority pubkey may deposit/withdraw. Set via set_core_gate(fund_id, core_authority, enabled).
Keystone Neutral Fund
BasisFundState
["basis_fund", fund_id]
Main config and state
FundAuthority
["fund_authority", fund_id]
PDA that signs token operations
ShareMint
["share_mint", fund_id]
Share token mint
UserPosition
["user_position", fund_id, user]
Per-user deposit/withdrawal tracking
PendingWithdrawal
["pending_withdrawal", fund_id, user]
Created on queued withdrawal; closed (rent returned) on claim_withdrawal
CoreGate
["core_gate", fund_state]
Access control PDA — when enabled, only the stored core_authority pubkey may deposit/withdraw. Set via set_core_gate(fund_id, core_authority, enabled).
Keystone Defense Fund
DefenseFundState
["defense_fund", fund_id]
Main config and state
FundAuthority
["fund_authority", fund_id]
PDA that signs token operations
ShareMint
["share_mint", fund_id]
Share token mint
UserPosition
["user_position", fund_id, user]
Per-user deposit/withdrawal tracking
CoreGate
["core_gate", fund_state]
Access control PDA — when enabled, only the stored core_authority pubkey may deposit/withdraw. Set via set_core_gate(fund_id, core_authority, enabled).
Derivation
Keystone Alpha Fund
Keystone Neutral Fund
Keystone Defense Fund
Keystone Core
Last updated