This guide takes a fresh machine from zero to a deployed RoundFi instance on Solana Devnet. Follow it in order.
Platform note. Anchor on native Windows is brittle. If you are on Windows, run everything below under WSL2 (Ubuntu 22.04+). The repo itself can live on the Windows filesystem; only the toolchain needs Linux.
| Tool | Version | Install |
|---|---|---|
| Rust | 1.79.0 (pinned in rust-toolchain.toml) |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh |
| Solana CLI | 1.18.17 | sh -c "$(curl -sSfL https://release.anza.xyz/v1.18.17/install)" |
| Anchor | 0.30.1 | cargo install --git https://github.com/coral-xyz/anchor avm --locked --force && avm install 0.30.1 && avm use 0.30.1 |
| Node.js | 20.x (see .nvmrc) |
nvm install (inside the repo) |
| pnpm | 9.x | npm i -g pnpm@9 |
Verify:
rustc --version # 1.79.0
solana --version # 1.18.17
anchor --version # 0.30.1
node --version # v20.x
pnpm --version # 9.xgit clone https://github.com/alrimarleskovar/RoundFinancial.git
cd RoundFinancial
pnpm install
cp .env.example .envPoint the Solana CLI at Devnet and create a deployer wallet:
solana config set --url https://api.devnet.solana.com
mkdir -p keypairs
solana-keygen new --no-bip39-passphrase -o keypairs/deployer.json
export ANCHOR_WALLET=$(pwd)/keypairs/deployer.jsonEdit .env:
ANCHOR_WALLET=./keypairs/deployer.jsonDevnet faucet caps at ~2 SOL per request. You need ~10 SOL to deploy all four programs comfortably.
pnpm run devnet:airdrop -- ./keypairs/deployer.json 2
# repeat 4-5 times, or use https://faucet.solana.comCheck:
solana balanceOne command does it all:
pnpm run devnet:deployUnder the hood it runs:
anchor build— compiles the four programs, generates keypairs intarget/deploy/*.jsonanchor keys sync— rewrites everydeclare_id!()macro andAnchor.tomlwith the fresh IDsanchor build— rebuild so the embedded IDs match the keypairsanchor deploy --provider.cluster devnet— uploads all four programs- Writes
config/program-ids.devnet.jsonwith the deployed IDs
At the end it prints the lines to copy into .env:
ROUNDFI_CORE_PROGRAM_ID=<...>
ROUNDFI_REPUTATION_PROGRAM_ID=<...>
ROUNDFI_YIELD_MOCK_PROGRAM_ID=<...>
ROUNDFI_YIELD_KAMINO_PROGRAM_ID=<...>Paste those into .env before running anything else.
The singleton ProtocolConfig account must be created once per cluster:
pnpm run devnet:initThis script is a stub until Step 4 wires the
initialize_protocolinstruction intoroundfi-core.
pnpm run devnet:seedStub until the
create_poolandjoin_poolinstructions exist.
"Transaction simulation failed: Program failed to complete"
→ You probably skipped anchor keys sync. Run pnpm run devnet:deploy cleanly.
"Airdrop request failed" → Devnet faucet is rate-limited. Use https://faucet.solana.com or wait a few minutes.
"Account does not exist or has no data"
→ .env is missing a program ID. Re-check config/program-ids.devnet.json.
Windows path-separator errors → Run under WSL2. See the platform note at the top.
"Program authority mismatch" → The deployed program was built under a different keypair. Run:
anchor clean
pnpm run devnet:deployWhen Step 11 arrives:
- Swap
SOLANA_CLUSTER=mainnet-betaandSOLANA_RPC_URL=<paid RPC>. - Fund a fresh deployer keypair (never reuse the Devnet one).
- Run
scripts/mainnet/deploy.ts— it refuses to run without an explicit confirmation prompt. - Redeploy
roundfi-yield-kaminowith the real Kamino CPI implementation. - Hand program-upgrade authority over to the Squads V4 multisig with
scripts/mainnet/handoff-multisig.ts.
Full checklist lives in docs/mainnet-migration.md
once Step 11 ships.
- Architecture:
docs/architecture.md - Program layout:
programs/roundfi-*/src/lib.rs - SDK:
sdk/src— PDA seeds, fee schedule, generated clients - Scripts:
scripts/devnet/ - Config loader:
config/clusters.ts