Skip to main content

Devnet Deploy

This page documents the working devnet deployment path for this repository. It is the fastest way to reproduce a clean environment where:
  • the Anchor program is deployed
  • the vault is initialized
  • all four strategies are registered
  • a test user makes the first deposit

When to use this path

Use devnet deploy when you want to validate:
  • Anchor program deployment
  • vault bootstrap
  • on-chain state decoding
  • deposit and withdrawal lifecycle
Do not treat this as protocol parity with mainnet. For the MVP, devnet is primarily a vault bring-up environment.

Prerequisites

  • Solana CLI configured to devnet
  • Rust + rustup
  • Anchor CLI 0.31.1
  • pnpm install already executed

1. Create the program keypair

mkdir -p target/deploy
solana-keygen new -o target/deploy/multi_strategy_vault-keypair.json --no-bip39-passphrase
solana address -k target/deploy/multi_strategy_vault-keypair.json
The returned address becomes the program ID.

2. Sync program ID in the repo

Update: For the current validated deploy, the program ID is:
7JyRup4JrhcYwz6jPtspcTbykNWxec4nnEYSoaP8XWKu

3. Create operator keypairs

mkdir -p keys
solana-keygen new -o keys/devnet-authority.json --no-bip39-passphrase
solana-keygen new -o keys/devnet-cobo.json --no-bip39-passphrase
solana-keygen new -o keys/devnet-ranger.json --no-bip39-passphrase
solana-keygen new -o keys/devnet-share-mint.json --no-bip39-passphrase
solana-keygen new -o keys/devnet-treasury.json --no-bip39-passphrase
solana-keygen new -o keys/devnet-user.json --no-bip39-passphrase

4. Fund the authority and helper wallets

The deployer wallet needs materially more SOL than the others. Recommended rule of thumb:
  • authority: 4+ SOL
  • ranger: 0.5+ SOL
  • user: 0.5+ SOL
  • cobo: small amount is enough for now
Example:
solana config set --url devnet
solana config set --keypair /Users/giovanna-britto/Documents/PROJETOS/vault-solana/keys/devnet-authority.json
solana airdrop 2
If devnet airdrop rate-limits you, use manual transfers from the authority to the other wallets.

5. Create a test mint

The vault default codebase uses mainnet USDC, but devnet validation should use a dedicated local test mint.
spl-token create-token --decimals 6
spl-token create-account YOUR_TEST_MINT
spl-token mint YOUR_TEST_MINT 100
For the current validated devnet setup, the deposit mint is:
F5rYanmuetj1YGVkzYzHUqqfwyuRrQsAiZymfqMeh3Jq

6. Create a token account for the test user

spl-token create-account YOUR_TEST_MINT \
  --owner YOUR_DEVNET_USER_PUBKEY \
  --fee-payer /absolute/path/to/keys/devnet-authority.json

spl-token mint YOUR_TEST_MINT 10 YOUR_USER_TOKEN_ACCOUNT \
  --fee-payer /absolute/path/to/keys/devnet-authority.json \
  --mint-authority /absolute/path/to/keys/devnet-authority.json

7. Configure .env for devnet

Set at least:
VAULT_RPC_URL=https://api.devnet.solana.com
RANGER_RPC_URL=https://api.devnet.solana.com
VAULT_PROGRAM_ID=7JyRup4JrhcYwz6jPtspcTbykNWxec4nnEYSoaP8XWKu
VAULT_DEPOSIT_MINT=F5rYanmuetj1YGVkzYzHUqqfwyuRrQsAiZymfqMeh3Jq
VAULT_NAME=Build a Bear Devnet Vault
RANGER_ALLOW_SIMULATED_STEPS=true

COBO_MPC_KEYPAIR_PATH=/Users/giovanna-britto/Documents/PROJETOS/vault-solana/keys/devnet-cobo.json
RANGER_EXECUTOR_KEYPAIR_PATH=/Users/giovanna-britto/Documents/PROJETOS/vault-solana/keys/devnet-ranger.json
VAULT_AUTHORITY_KEYPAIR_PATH=/Users/giovanna-britto/Documents/PROJETOS/vault-solana/keys/devnet-authority.json
VAULT_SHARE_MINT_KEYPAIR_PATH=/Users/giovanna-britto/Documents/PROJETOS/vault-solana/keys/devnet-share-mint.json
VAULT_TREASURY_KEYPAIR_PATH=/Users/giovanna-britto/Documents/PROJETOS/vault-solana/keys/devnet-treasury.json
VAULT_USER_KEYPAIR_PATH=/Users/giovanna-britto/Documents/PROJETOS/vault-solana/keys/devnet-user.json

VAULT_USER_ACTION=deposit
VAULT_DEPOSIT_AMOUNT_USDC=1000000
Important note:
  • in this devnet bring-up, DRIFT_RPC_URL and KAMINO_RPC_URL can remain empty
  • the focus is the vault lifecycle, not live protocol execution

8. Build and deploy the program

anchor build
anchor deploy --provider.cluster devnet --provider.wallet keys/devnet-authority.json
For the validated deploy, the deployment signature was:
2csgZwLPPhKSc8kV4K3vbiqpsAZgXmV9L97oPu2vQ6WRzVwzpyUpoPHfwxQssiS2pZtLwm1qwwKxG8ndQwkkFpWa

9. Validate runtime health

pnpm ranger:doctor
Expected highlights:
  • program account is executable
  • signers load correctly
  • vault account may still be missing before bootstrap

10. Bootstrap the vault

pnpm vault:bootstrap
Expected outcome:
  • vault initialized
  • drift-reserve registered
  • kamino-stable-carry registered
  • marginfi-canary registered
  • perena-exotic registered
For the validated run, the vault PDA was:
A84M3Wp3CV4u8H7jXSXLPpztzgtdXP6xaiyt6qBomYia

11. Inspect on-chain state

pnpm vault:status
Expected fields:
  • vault.authority
  • vault.depositMint
  • vault.shareMint
  • vault.vaultTreasury
  • vault.strategyCount
  • each strategy state and allocation PDA

12. Execute the first deposit

pnpm vault:user
With:
VAULT_USER_ACTION=deposit
VAULT_DEPOSIT_AMOUNT_USDC=1000000
This performs a 1.0 unit deposit for a 6 decimal mint.

Current validated devnet artifacts

The following values were successfully used in the current devnet bring-up on April 17, 2026:
ItemValue
Program ID7JyRup4JrhcYwz6jPtspcTbykNWxec4nnEYSoaP8XWKu
Vault PDAA84M3Wp3CV4u8H7jXSXLPpztzgtdXP6xaiyt6qBomYia
Deposit mintF5rYanmuetj1YGVkzYzHUqqfwyuRrQsAiZymfqMeh3Jq
AuthorityBQ6iPBSkwRnj8AwyHmX5rS9NrYVaE6pPBfvAELgNvbe6
Ranger executorDfNBRTEnTaM1vUaWG1C9cr7sLT84pEiwfhjypNN1xgwZ
COBO signerAiFVVf3Q3xsCcYm6VKviTvVqMPwBFztqHCekzscsKCDy
Test userABkqSyACZsmSndJ8D7Acwz7vZs2hLab8G38bm3DKMHAo
  1. Test request-withdrawal and finalize-withdrawal.
  2. Run solver and Ranger flows against the deployed vault.
  3. Promote protocol integrations from fixture mode to live mode selectively.
  4. Only after that, consider a more realistic staging or mainnet process.