Devnet

Last updated: April 23, 2026 (v0.11.5)

Program IDs

Program
Address

Keystone Alpha Fund

2JTb5UiM6mAYDUmnSiTgZXTTEJAJs98YRDcKLU6AGeZN

Keystone Neutral Fund

BxKFa6GRKYgNKxRzJ4kXCHiDo2PodpNtKVWhJTZMtAXR

Keystone Defense Fund

FKtpFEd4B5jGRkgLf5AN2eZMikmkEJYf59XzR6YbTxPA

Keystone Core

rDd3hjjEdH2xJWH9RnQupX7ZTPxrzmBZhL76eS8dW8c

Architecture

Core is a router, not a vault. User USDC flows through Core in a single transaction — Core splits and routes it to the three sub-funds (Alpha, Neutral, Defense) according to each portfolio's target allocations. Core holds no assets between transactions.

Each Core portfolio has its own dedicated fund instances — one per program, per risk profile. fund_id == portfolio_id within each sub-program.

Portfolio
Risk Profile
Alpha fund_id
Neutral fund_id
Defense fund_id

1

Conservative

1

1

1

2

Balanced

2

2

2

3

Growth

3

3

3

CoreGate: All 9 fund instances are gated. Direct deposits and withdrawals to Alpha, Neutral, or Defense are blocked at the contract level — only the matching Core portfolio's core_authority PDA can call them. This is enforced at the sub-fund level, not Core, because Core is the authorized router for each fund.

Test Tokens

Token
Devnet Mint

Test USDC

3wtMD9NVz4QvmtGw3ZvYva1BvWQzRAavC1r1tBYJJXvc

wSOL (jitoSOL/JupSOL substitute)

So11111111111111111111111111111111111111112

wSOL stands in for jitoSOL (Alpha, Neutral) and JupSOL (Defense) on devnet. Test USDC has unlimited supply.


Build

Devnet builds add -- --features devnet to skip Pyth ownership validation and use a mock $100 SOL price. Do not add that flag for mainnet.

Deploy

Parallel deploys work fine; only one buffer is allocated per program.


Fresh Deploy (from Zero)

Run this sequence whenever you want to wipe state and start clean.

Step 1 — Close existing fund states

Step 2 — Initialize everything

Both scripts are idempotent — already-initialized accounts are skipped, already-closed accounts are skipped.

Step 3 — (Optional) Test deposit


Partial Operations


Notes

anchor build does not work on this repo — use cargo-build-sbf directly with rustup's cargo on PATH.

Compute Budget (Deposits): Core deposits fan out to three fund CPIs and require more than the default 200K compute units. deposit.ts adds a ComputeBudgetProgram.setComputeUnitLimit({ units: 600_000 }) instruction automatically.

IDL sync: After building, copy IDLs to the frontend: cp target/idl/keystone_*.json idl/


Explorer

Last updated