QuantVM

Composable DeFi Bytecode — 59 opcodes on Solana
59
Opcodes
9M
TLA+ States
0
Violations
92
Tests
112K
Max CU
Open DEX Spec Tutorial Changelog

Try It

Enter a strategy description or hex bytecode. Examples:
  "swap SOL for USDC safely"
  "flash arbitrage between two pools"
  "adaptive split with depth scaling"

Templates

Opcode Reference

OpcodeHexDescription
SWAP01Swap on pool
SPLIT02Split into N legs
MERGE03Sum leg outputs
SKIP_LT04Skip if acc < thr
SKIP_GT05Skip if acc > thr
SET20acc = value
STORE10Save to register
LOAD11Load from register
PCT23acc × bps / 10000
ASSERT_GT40Error if acc ≤ thr
F_BORROW90Flash borrow
F_REPAY91Flash repay + fee
JUMPC0Unconditional jump
CALLC7Sub-strategy call
HALTFFStop execution
OpcodeHexDescription
ADAPT_SPLITC3Auto-adjust by depth
AUTO_DIRC4Optimal swap direction
PRICE_GUARDC5Stale price protection
SCALE_DEPTHC6Anti-whale sizing
ADD_LIQ50Add liquidity
REM_LIQ52Remove liquidity
FARM_STAKE60Stake LP
FARM_CLAIM62Claim rewards
VP_BUY70Bonding curve buy
VP_SELL71Bonding curve sell
VE_STAKE80Lock tokens
WRAPB0SOL → wSOL
EMITF0Log event
RETC8Return from CALL
NOP07No operation

30 more opcodes in full spec

CLI

aex strategy sim --preset adaptive --trace     # simulate locally
aex strategy sweep --preset 2hop               # amount sweep
aex strategy compete --a adaptive --b 2hop     # head-to-head
aex strategy evolve --gens 100 --pop 64        # genetic algorithm
aex strategy fuzz --adversarial --iters 10000  # CU maximization
aex strategy register --preset adaptive        # publish on-chain
aex strategy browse --sort profit              # leaderboard

API

POST /v1/strategy/nl          # English → bytecode (Haiku)
POST /v1/strategy/simulate    # bytecode → output + CU
GET  /v1/strategy/browse      # on-chain registry
GET  /v1/strategy/leaderboard # global P/L rankings
POST /v1/strategy/report      # submit autopilot results