Sol.College

Full lesson

Arcadia

Arcadia is a Proof-of-Performance Capital Protocol where traders earn capital by proving skill, and investors allocate based on verified results.

What it does

From the project README:

Arcadia is a devnet-stage Solana protocol for allocating investor capital to traders using verifiable performance history, risk scoring, share-based vaults, and profile-owned venue custody.
Original
Molten-Labs/Arcadia
SuperStack fork
Blockchains/Arcadia @ e7117b2
Stars
1
Last push (original)
2026-10-04
Languages
TypeScript, Rust, CSS, PLpgSQL, JavaScript, Dockerfile
Detected stack
@solana/kitAnchorweb3.js
Categories
Other
Licence
MIT

Architecture

343 source files. By extension: .tsx ×130, .ts ×118, .rs ×94, .js ×1.

Top-level directorySource files
app194
server-rs76
arcadia_vault62
docs10
.railway1

On-chain programs: arcadia_vault/programs/arcadia_vault, arcadia_vault/programs/mock_venue

Dapp: devnet deploy pending

⏳ Devnet deploy pending — goes live when the devnet wallet is topped up. This fork's own dapp is not deployed yet, so there is no program address or transaction to show. It is queued in dapp-queue.txt; once devnet SOL is available it is deployed, exercised with real devnet transactions, and this section switches to the live dapp at /dapps/arcadia/. Until then, the lesson and step-by-step guide below are complete, and you can run it locally with the commands below.

Key code, explained

Excerpts chosen automatically where the code uses the most Solana concepts, pinned to the fork's commit.

Molten-Labs/Arcadia · arcadia_vault/programs/arcadia_vault/src/instructions/record_trade.rs L1–24 @ e7117b2 · MIT · original
use anchor_lang::prelude::*; use crate::{    checked_add_u64, checked_sub_u64, drawdown_floor_nav, nav_bearing_assets, nav_per_share,    realized_pnl, token::profile_signer_seeds, token::transfer_checked_accounts,    token::transfer_checked_accounts_with_signer, token::Mint, token::Token, token::TokenAccount,    trade_notional_cap, ArcadiaError, PlatformConfig, TradeClosed, TraderProfile, MAX_NOTIONAL_BPS,    PLATFORM_SEED, PROFILE_SEED, PROFILE_STATUS_ACTIVE,}; #[derive(Accounts)]pub struct RecordTrade<'info> {    pub trader: Signer<'info>,    pub oracle_authority: Signer<'info>,    #[account(seeds = [PLATFORM_SEED], bump = config.bump, has_one = oracle_authority, has_one = treasury_token, has_one = base_mint)]    pub config: Account<'info, PlatformConfig>,    #[account(        mut,        seeds = [PROFILE_SEED, profile.trader.as_ref()],        bump = profile.bump,        has_one = trader,        has_one = base_mint,        has_one = vault_token,        constraint = profile.status == PROFILE_STATUS_ACTIVE @ ArcadiaError::VaultNotActive
  1. Line 4 checked_add_u64, checked_sub_u64, drawdown_floor_nav, nav_bearing_assets, nav_per_share,: Uses checked arithmetic so overflow fails instead of wrapping.
  2. Line 5 realized_pnl, token::profile_signer_seeds, token::transfer_checked_accounts,: A checked token transfer, which also verifies the mint and decimals.
  3. Line 5 realized_pnl, token::profile_signer_seeds, token::transfer_checked_accounts,: An SPL token transfer through the Token Program.
  4. Line 13 pub trader: Signer<'info>,: Requires this account to have signed the transaction.
  5. Line 15 #[account(seeds = [PLATFORM_SEED], bump = config.bump, has_one = oracle_authority, has_one: Declares the PDA seeds. Anchor re-derives the address and rejects the account if it doesn't match.
  6. Line 15 #[account(seeds = [PLATFORM_SEED], bump = config.bump, has_one = oracle_authority, has_one: Uses the bump seed, the extra byte that pushes the derived address off the ed25519 curve.
  7. Line 15 #[account(seeds = [PLATFORM_SEED], bump = config.bump, has_one = oracle_authority, has_one: Checks that a stored pubkey field matches the passed account.
Molten-Labs/Arcadia · arcadia_vault/programs/arcadia_vault/src/instructions/trader_withdraw_profit.rs L1–24 @ e7117b2 · MIT · original
use anchor_lang::prelude::*; use crate::{    checked_sub_u64, nav_bearing_assets,    token::{        profile_signer_seeds, transfer_checked_accounts_with_signer, Mint, Token, TokenAccount,    },    ArcadiaError, ProfitWithdrawn, TraderProfile, PROFILE_SEED, PROFILE_STATUS_ACTIVE,    PROFILE_STATUS_HALTED,}; #[derive(Accounts)]pub struct TraderWithdrawProfit<'info> {    pub trader: Signer<'info>,    #[account(        mut,        seeds = [PROFILE_SEED, profile.trader.as_ref()],        bump = profile.bump,        has_one = trader,        has_one = base_mint,        has_one = vault_token,        constraint = profile.status == PROFILE_STATUS_ACTIVE            || profile.status == PROFILE_STATUS_HALTED @ ArcadiaError::VaultNotActive    )]
  1. Line 4 checked_sub_u64, nav_bearing_assets,: Uses checked arithmetic so overflow fails instead of wrapping.
  2. Line 6 profile_signer_seeds, transfer_checked_accounts_with_signer, Mint, Token, TokenAccount,: A checked token transfer, which also verifies the mint and decimals.
  3. Line 14 pub trader: Signer<'info>,: Requires this account to have signed the transaction.
  4. Line 17 seeds = [PROFILE_SEED, profile.trader.as_ref()],: Declares the PDA seeds. Anchor re-derives the address and rejects the account if it doesn't match.
  5. Line 18 bump = profile.bump,: Uses the bump seed, the extra byte that pushes the derived address off the ed25519 curve.
  6. Line 19 has_one = trader,: Checks that a stored pubkey field matches the passed account.
Molten-Labs/Arcadia · arcadia_vault/programs/arcadia_vault/src/instructions/velocity_custody.rs L193–216 @ e7117b2 · MIT · original
    let custody = &mut ctx.accounts.custody;    custody.profile = profile_key;    custody.velocity_user = ctx.accounts.velocity_user.key();    custody.velocity_user_stats = ctx.accounts.velocity_user_stats.key();    custody.orchestrator = orchestrator;    custody.deployed_collateral = 0;    custody.bump = ctx.bumps.custody;     emit!(VelocityCustodyInitialized {        profile: profile_key,        velocity_user: custody.velocity_user,        velocity_user_stats: custody.velocity_user_stats,        orchestrator,        ts: Clock::get()?.unix_timestamp,    });     Ok(())} #[derive(Accounts)]pub struct UpdateVelocityOrchestrator<'info> {    pub admin: Signer<'info>,    #[account(seeds = [PLATFORM_SEED], bump = config.bump, has_one = admin)]    pub config: Account<'info, PlatformConfig>,
  1. Line 199 custody.bump = ctx.bumps.custody;: Uses the bump seed, the extra byte that pushes the derived address off the ed25519 curve.
  2. Line 201 emit!(VelocityCustodyInitialized {: Emits an Anchor event that clients can parse from the logs.
  3. Line 206 ts: Clock::get()?.unix_timestamp,: Reads on-chain time from the Clock sysvar.
  4. Line 214 pub admin: Signer<'info>,: Requires this account to have signed the transaction.
  5. Line 215 #[account(seeds = [PLATFORM_SEED], bump = config.bump, has_one = admin)]: Declares the PDA seeds. Anchor re-derives the address and rejects the account if it doesn't match.
  6. Line 215 #[account(seeds = [PLATFORM_SEED], bump = config.bump, has_one = admin)]: Checks that a stored pubkey field matches the passed account.
Molten-Labs/Arcadia · arcadia_vault/programs/arcadia_vault/src/instructions/settle.rs L1–24 @ e7117b2 · MIT · original
use anchor_lang::prelude::*; use crate::{    checked_add_u64, checked_sub_u64, fee_from_bps, nav_per_share, profit_assets,    token::{        profile_signer_seeds, transfer_checked_accounts_with_signer, Mint, Token, TokenAccount,    },    ArcadiaError, PlatformConfig, Settled, TraderProfile, PLATFORM_SEED, PROFILE_SEED,    PROFILE_STATUS_ACTIVE, PROFILE_STATUS_HALTED,}; #[derive(Accounts)]pub struct Settle<'info> {    pub caller: Signer<'info>,    #[account(seeds = [PLATFORM_SEED], bump = config.bump, has_one = base_mint, has_one = treasury_token)]    pub config: Account<'info, PlatformConfig>,    #[account(        mut,        seeds = [PROFILE_SEED, profile.trader.as_ref()],        bump = profile.bump,        has_one = base_mint,        has_one = vault_token,        constraint = profile.status == PROFILE_STATUS_ACTIVE            || profile.status == PROFILE_STATUS_HALTED @ ArcadiaError::VaultNotActive
  1. Line 4 checked_add_u64, checked_sub_u64, fee_from_bps, nav_per_share, profit_assets,: Uses checked arithmetic so overflow fails instead of wrapping.
  2. Line 6 profile_signer_seeds, transfer_checked_accounts_with_signer, Mint, Token, TokenAccount,: A checked token transfer, which also verifies the mint and decimals.
  3. Line 14 pub caller: Signer<'info>,: Requires this account to have signed the transaction.
  4. Line 15 #[account(seeds = [PLATFORM_SEED], bump = config.bump, has_one = base_mint, has_one = trea: Declares the PDA seeds. Anchor re-derives the address and rejects the account if it doesn't match.
  5. Line 15 #[account(seeds = [PLATFORM_SEED], bump = config.bump, has_one = base_mint, has_one = trea: Uses the bump seed, the extra byte that pushes the derived address off the ed25519 curve.
  6. Line 15 #[account(seeds = [PLATFORM_SEED], bump = config.bump, has_one = base_mint, has_one = trea: Checks that a stored pubkey field matches the passed account.

How to run, build and test

These commands come from the repo's own manifests (package.json scripts, Anchor.toml, Cargo, go.mod, Makefile). Check the README for prerequisites and environment variables.

DirectoryCommandRuns
server-rs/execution-workernpm run devtsx watch src/index.ts
server-rs/execution-workernpm run starttsx src/index.ts
server-rs/execution-workernpm run testtsx --test src/*.test.ts
appnpm run devvite
appnpm run startvite preview
appnpm run buildvite build
appnpm run testNODE_ENV=test vitest run
appnpm run linteslint .
arcadia_vaultnpm run lintprettier */*.js "*/**/*{.js,.ts}" --check
arcadia_vaultanchor buildcompile programs and generate IDLs
arcadia_vaultanchor testlocal validator + test suite
arcadia_vaultanchor run testcargo test -- --test-threads=1 --nocapture

What you could build from it

Used in lessons