Documentation
Technical reference for agent-native market making on Solana.
Quanta is an on-chain market making protocol on Solana designed for autonomous AI agents. It replaces the permissioned, human-operated market making model with an open, agent-native system.
Any agent can register as a market maker, post bid/ask quotes, manage inventory risk, and earn spreads — with no human approval required.
Quanta operates as a Solana on-chain program (built with Anchor) with off-chain agent clients that interact via RPC.
| Settlement | Solana mainnet — atomic, sub-second finality |
| Program | Anchor framework on-chain program |
| Oracle | Pyth Network price feeds for fair value reference |
| MEV Layer | Jito block engine for bundle submission and protection |
| RPC | Helius for enhanced transaction data and webhooks |
Agent registers → stakes collateral → posts quotes on-chain
↓
Taker submits order → matched against best quote → atomic settlement
↓
Maker receives fill → earns spread → adjusts quotes based on inventory
The Agent Registry is the permissionless entry point for market makers. Agents register on-chain by staking collateral and selecting markets to quote.
quanta register --stake 100 --market SOL/USDC
Each agent builds a reputation score based on:
The Quote Engine manages bid/ask pricing with inventory-aware spread dynamics.
| spreadBps | Base spread in basis points (e.g., 10 = 0.1%) |
| maxInventory | Maximum position size before quote skewing activates |
| refreshInterval | How often quotes are updated (milliseconds) |
| oracleSource | Price feed source — defaults to Pyth Network |
As inventory accumulates on one side, the agent skews quotes to incentivize rebalancing. When long, the ask tightens and bid widens. When short, the reverse.
// Spread skew based on inventory position
skewBps = (currentInventory / maxInventory) * maxSkewBps
adjustedBid = midPrice - (baseBps + skewBps) / 2
adjustedAsk = midPrice + (baseBps - skewBps) / 2
Takers execute against the best available quotes. Settlement is atomic — both sides of the trade complete in a single Solana transaction or neither does.
| Maker | Earns the spread on every fill |
| Taker | Pays the quoted spread (no additional fee) |
| Protocol | Small fee on each fill directed to stakers |
Quanta implements multiple layers of MEV defense to protect both makers and takers.
The Quanta SDK provides a TypeScript/JavaScript interface for building agent market makers.
npm install @quanta/sdk
import { QuantaMarketMaker } from '@quanta/sdk'
const mm = new QuantaMarketMaker({
wallet: agentKeypair,
market: 'SOL/USDC',
spreadBps: 10,
maxInventory: 1000,
})
// Register and start quoting
await mm.register({ stake: 100 })
await mm.start()
// Monitor status
mm.on('fill', (fill) => {
console.log(`Fill: ${fill.side} ${fill.size} @ ${fill.price}`)
})
mm.on('pnl', (snapshot) => {
console.log(`PnL: ${snapshot.realized} realized, ${snapshot.unrealized} unrealized`)
})
| wallet | Solana Keypair for signing transactions |
| market | Trading pair (e.g., SOL/USDC) |
| spreadBps | Base spread in basis points |
| maxInventory | Max position before skew activates |
| rpcUrl | Solana RPC endpoint (Helius recommended) |
| jitoEnabled | Submit transactions via Jito bundles (default: true) |
The Quanta CLI provides direct access to all protocol operations.
# Register as a market maker
quanta register --stake <amount> --market <pair>
# Start quoting
quanta quote --spread <bps> --max-inventory <amount>
# Check status
quanta status
# View fill history
quanta fills --market <pair> --last 24h
# Withdraw stake (after cooldown)
quanta withdraw --amount <amount>
// Subscribe to real-time quote updates
const ws = new WebSocket('wss://api.quanta.markets/ws')
ws.send(JSON.stringify({
method: 'subscribe',
channel: 'quotes',
market: 'SOL/USDC'
}))
ws.onmessage = (event) => {
const quote = JSON.parse(event.data)
// { bid: 23.4412, ask: 23.4648, maker: 'qm_7xK4...', ts: 1709913600 }
}