Protocol Integrations
v1 hedges on Phoenix Perps (Ellipsis Labs) via on-chain CPI, USDC margin through Ember. The Phoenix/Ember CPI surface below is finalized with the integration.
The vault works with other Solana protocols by calling them directly from its own program, a pattern called CPI. Every one of those calls is signed by the vault itself, so no private key is involved.
For Phoenix, Keystone uses the Rise SDK (github.com/Ellipsis-Labs/rise-public) and reads Phoenix's account layouts from it. The other integrations build their instructions and account lists by hand.
Venues
Perp venue (mainnet)
Phoenix Perps (Ellipsis Labs)
EtrnLzgbS7nMMy5fbD42kXiUzGg8XQzJ972Xtk1cjWih
Margin (USDC → Phoenix)
Ember
EMBERpYNE6ehWmXymZZS2skiFmCa9V5dp14e1iduM5qy
Spot leg
jitoSOL (LST, held for staking — not posted as margin)
J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn
Lending / parked
Kamino USDC reserve
D6q6wuQSrifJKZYpR1M8R4YawnLDtDsMmWM1NbBmgJ59
Quote / settlement
USDC
EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
Dependencies
Phoenix Perps (Ellipsis Labs)
SOL-PERP short; USDC margin (posted via Ember); real two-sided funding
open_position, close_position, settle, emergency_close, enable_phoenix
Ember
Routes USDC → Phoenix perp margin
open_position, close_position (margin post/withdraw)
Kamino KLend
USDC lending for buffer + parked + reserve capital
enable_lending, lend_idle_usdc, unlend_usdc, lend_reserve, unlend_reserve
Jupiter V6
All token swaps (USDC ↔ jitoSOL); off-chain quote, on-chain execution
Every open/close path that crosses tokens
Pyth (pull oracles)
SOL/USD + jitoSOL/USD for NAV math, drawdown guard, depeg check
settle, open_*, close_*, set_oracles
Jito (jitoSOL)
Liquid staking; held unlevered as the spot leg (not posted as margin)
Implicit — staking yield is embedded in the jitoSOL/SOL exchange rate
Marginfi
Reserved as a second USDC lending venue (v1.1)
Vault fields pinned at init; not yet CPI-wired
Verified mainnet addresses
Phoenix Perps Program
EtrnLzgbS7nMMy5fbD42kXiUzGg8XQzJ972Xtk1cjWih
Ember Program (USDC → Phoenix margin)
EMBERpYNE6ehWmXymZZS2skiFmCa9V5dp14e1iduM5qy
Phoenix SOL-PERP market
resolved via PerpAssetMap (Rise SDK)
Kamino KLend Program
KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD
Kamino Main Market
7u3HeHxYDLhnCoErrtycNokbQYbWGzLs6JSDqGAv5PfF
Kamino USDC Reserve
D6q6wuQSrifJKZYpR1M8R4YawnLDtDsMmWM1NbBmgJ59
Kamino USDT Reserve
H3t6qZ1JkguCNTi9uzVKqQ7dvt2cum4XiXWom6Gn5e5S
Jupiter V6 Program
JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4
jitoSOL mint
J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn
USDC mint
EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
CPI surface (Rust)
utils::phoenix_cpi (target)
Onboard trader (Rise builder path), post/withdraw USDC margin via Ember, place_perp_order, cancel_orders, settle funding, read_phoenix_funding_rate — built on the phoenix-rise account views (TraderHeader, TraderPositions, PerpAssetMap, GlobalConfig, PermissionAccount)
utils::kamino
deposit_reserve_liquidity, redeem_reserve_collateral, refresh_reserve
utils::jupiter_swap
route_swap, require_min_received
utils::oracle
Pyth pull-oracle staleness + confidence wrappers, jitoSOL/SOL depeg check
Every helper passes the vault's signer seeds (
[b"vault", &[bump]]), which is how the vault authorizes the call.Phoenix account layouts come from the
phoenix-risecrate, read in place without copying. Kamino's return data is checked with minimal Borsh decoding.Kamino's byte offsets are hard-coded against a layout verified on-chain. Phoenix uses the Rise definitions instead of hand-written offsets.
Off-chain account assembly
Strategy instructions expect 3–5 groups of accounts in remaining_accounts, plus a count for each group. The keeper assembles those off-chain:
Phoenix — the Rise SDK (
github.com/Ellipsis-Labs/rise-public) provides the correct account ordering for trader onboarding, margin in and out through Ember,place_perp_order, and funding settlement.Kamino — the same idea. The
refresh_obligationand collateral instructions follow a fixed pattern documented in the Kamino IDL.Jupiter — Jupiter's
/swap-instructionsendpoint returns both the swap data (passed asjupiter_swap_data) and the account list that goes with it (passed as the matching account group).
See Keeper bot for the off-chain orchestration pattern.
Related
Whitepaper — single-page overview of the system
Instructions reference — per-instruction account-context groups
Last updated