← Back to Home

Documentation

SUR Protocol on Solana — v0.3 devnet

Overview

What is SUR Protocol on Solana?

SUR Protocol is an agent-native perpetual futures DEX ported from Base L2 to Solana. Eleven Anchor programs provide the protocol surface: perp_engine, perp_vault, order_settlement, oracle_router, liquidator, insurance_fund, a2a_darkpool, auto_deleveraging, collateral_manager, sur_timelock, and trading_vault.

Status

  • All 11 programs deployed to Solana devnet
  • Read paths wired (markets, vault balance, positions, engine view)
  • Write paths wired (deposit, withdraw, open position, close position)
  • Init (Phase 9) pending — programs return AccountNotInitialized until then
  • Charts (Phase 6) and dark-pool / agent UI (Phase 7) deferred

Getting Started

1. Connect a Solana Wallet

Click Select Wallet in the top right. SUR supports Phantom, Solflare, and Backpack on Solana devnet.

2. Fund Devnet SOL

Use `solana airdrop 2` on the CLI or any devnet faucet to fund your wallet with SOL for transaction fees.

3. Acquire Devnet USDC

The protocol uses the canonical Solana devnet USDC mint (4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU). Use any devnet USDC faucet to top up the ATA owned by your wallet.

4. Deposit and Trade

Open /trade, switch to the Funds panel, deposit USDC, then place a long or short via the right-side order panel. Writes will revert until Phase 9 init runs.

Architecture

Programs

perp_engine is the core matching + position engine. perp_vault custodies USDC and routes margin locks via CPI. The other programs (oracle_router, liquidator, etc.) ship the full surface but are not exercised by the v0.3 web client.

Frontend

Next.js 15 App Router, Tailwind, wallet-adapter, @tanstack/react-query. Anchor 0.31 program clients wrap the IDLs in clients/web/idls/. All hooks live in clients/web/hooks/.