Back to terminal
Brute logoBrute Architecture

System overview

Simple flow from wallet to settlement

Brute is a devnet perps terminal backed by an Anchor program, Pyth prices, a small API layer, and a Postgres indexer.

01

Wallet

User connects a Solana devnet wallet and signs deposits, opens, closes, and withdrawals.

02

Trading App

Next.js terminal shows real-time Pyth prices, candles, positions, TP/SL orders, and account state.

03

Backend APIs

API routes handle faucet minting, AI signals, indexed trade history, candles, and trigger-order storage.

04

Pyth Oracles

Hermes streams display prices. On-chain Pyth accounts verify execution and settlement prices.

05

Brute Program

Anchor program manages BRUTE collateral, positions, liquidations, risk checks, fees, and settlement.

06

AI + Keeper

AI gives read-only signals. The keeper watches DB trigger orders and closes positions on devnet.

Trade lifecycle

1Connect wallet
2Mint or deposit BRUTE collateral
3Select market
4Stream display price from Hermes
5Confirm order with price age and confidence
6Program verifies Pyth push account on-chain

What runs where

Frontend Terminal

  • Wallet connection
  • Pyth Hermes live prices
  • Pyth Benchmarks candles

Backend API

  • /api/candles for historical OHLC
  • /api/trades for devnet program activity
  • /api/health for RPC status

Solana Program

  • BRUTE collateral vault
  • User collateral accounts
  • Market PDAs

Oracle Layer

  • Pyth push oracle accounts for execution
  • Pyth Hermes SSE for real-time display
  • Pyth Benchmarks for chart history