Quick Start

Installation

git clone <repo-url>
cd keystone-contracts
npm install
bash build-programs.sh

Devnet

solana config set --url devnet
# Fund wallet: https://faucet.solana.com

# Initialize funds (one-time per fresh deployment)
SOLANA_NETWORK=devnet npx tsx scripts/devnet/init.alpha.ts
SOLANA_NETWORK=devnet npx tsx scripts/devnet/init.neutral.ts
SOLANA_NETWORK=devnet npx tsx scripts/devnet/init.defense.ts

# Initialize all three Core portfolios (Conservative, Balanced, Growth)
bash scripts/devnet/setup-all-profiles.sh

# Deposit via risk profile — the main user entry point
npx tsx scripts/deposit.ts conservative 1000
npx tsx scripts/deposit.ts balanced 5000
npx tsx scripts/deposit.ts growth 500

# Check status
npx tsx scripts/status.ts

# Trigger operations (permissionless)
npm run devnet:deploy-capital       # Keystone Neutral: deploy idle USDC
npm run devnet:rebalance            # Keystone Alpha: rebalance allocation
npm run devnet:settle-funding       # Keystone Neutral: settle Jupiter Perps carry

Mainnet

After deployment: Verify program IDs on Solana Explorer, transfer authority to multisig, configure keeper bot, enable monitoring and alerts.


Program IDs

Program
Devnet
Mainnet

Keystone Core

rDd3hjjEdH2xJWH9RnQupX7ZTPxrzmBZhL76eS8dW8c

Pending audit

Keystone Alpha Fund

2JTb5UiM6mAYDUmnSiTgZXTTEJAJs98YRDcKLU6AGeZN

Pending audit

Keystone Neutral Fund

BxKFa6GRKYgNKxRzJ4kXCHiDo2PodpNtKVWhJTZMtAXR

Pending audit

Keystone Defense Fund

FKtpFEd4B5jGRkgLf5AN2eZMikmkEJYf59XzR6YbTxPA

Pending audit

Token Addresses

Devnet

Test tokens are created during initialization. Addresses are stored in scripts/.devnet-config.json.

Token
Notes

Test USDC

Custom SPL token with unlimited supply

wSOL

Native wrapped SOL (substitutes for jitoSOL in devnet testing)

Mainnet

Token
Address

USDC

EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v

jitoSOL

J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn

JupSOL

jupSoLaHXQiZZTSfEWMTRRgpnyFm8f6sZdosWBjx93v

wSOL

So11111111111111111111111111111111111111112


Programmatic Usage

Depositing via Keystone Core

Deployed devnet portfolio IDs: 1 = Conservative, 2 = Balanced, 3 = Growth.

Reading Individual Fund State


Next: Instructions Reference · Account Structure · Mainnet Checklist

Last updated