PricingDocs

Platform Documentation

Technical reference for the Trading Cards algorithmic trading platform · ZK proofs · Sui NFTs · Backtesting

Trading Cards is an algorithmic trading platform designed to enhance and simplify the trading space. Users can easily create, backtest, and mint strategies as verifiable financial NFT assets backed with ZK proofs on the blockchain. Investors can also view and verify top-performing NFT strategies and their backtest and live results — Win Rate, Sharpe Ratio, Total Trades, and PnL.

Users have a wide variety of parameters to select from while backtesting — including exchange, symbols, timeframe, patterns, date range, position size, leverage, and more — making this a powerful and dynamic feature.

Trading Cards combines algorithmic backtesting, zero-knowledge cryptography, and blockchain primitives into a single unified platform for verified strategy trading.

Algorithmic trading has a trust problem.

Anyone can claim their strategy returns 200% annually. Anyone can publish a backtest screenshot. There is currently no trustless, verifiable way for a strategy creator to prove their results are genuine without revealing the strategy itself — and no way for an investor to verify a claim without simply trusting the person making it.

This creates three compounding issues:

1
No verifiable track record
Strategy performance claims are unauditable. A backtest result shown to a potential investor is indistinguishable from a fabricated one. There is no cryptographic link between the claim and the underlying computation.
2
The transparency dilemma
A strategy creator who reveals their methodology in order to prove results loses their competitive edge. The strategy parameters — RSI thresholds, take profit levels, signal logic — are the product. Sharing them to gain credibility destroys the value of sharing them.
3
No on-chain representation
Algorithmic strategies have no native financial primitive on the blockchain. There is no standard way to represent a strategy as a tradeable, transferable, or investable asset — which means there is no market infrastructure for strategy discovery, investment, or monetisation.

Trading Cards solves all three problems simultaneously using zero-knowledge proofs and the Sui blockchain.

Prove without revealing
Using the RISC0 zkVM, the platform generates a cryptographic proof that a backtest ran on real market data and produced the claimed results — without revealing any of the strategy parameters. The proof is mathematically verifiable by anyone in the world. The config stays private.
Mint as a financial NFT
Once a proof is generated, the strategy and its verified results are minted as a non-fungible object on Sui. The NFT contains only the public outputs from the ZK circuit — candle data hash, trade count, win rate, PnL, Sharpe ratio — not the strategy config. The NFT is transferable, tradeable, and permanently on-chain.
A marketplace for verified performance
Investors can browse Strategy NFTs, verify their proof on-chain, and assess performance — all without the strategy creator needing to disclose anything beyond what the proof already guarantees.
Strategy Builder
Create algorithmic trading strategies by composing pattern detectors, technical indicators, and entry/exit conditions. Supported pattern types include bullish and bearish divergence, engulfing candles, Bollinger Band breakouts, oversold RSI, and more. Each strategy is parametric — the same strategy type with different thresholds produces a different strategy with a different proof.
Backtester
A high-performance backtesting engine that simulates strategy execution against historical market data from Bybit. The backtester streams real-time progress to the frontend via Server-Sent Events, giving users visibility into each phase of execution — data fetching, pattern scanning, trade simulation, and P&L calculation.
ZK Proof Generation
After a backtest completes, users can generate a RISC0 zero-knowledge proof of their results. The proof is computed server-side by the RISC0 zkVM. The proof receipt is stored in MongoDB as BSON binary and optionally on Walrus decentralised storage.
Strategy NFTs
Verified backtest proofs can be minted as NFT objects on the Sui blockchain. Each NFT stores the public outputs from the ZK circuit and a reference to the full proof receipt on Walrus. The NFT is owned by the user's Sui wallet and is freely transferable.
Verification Portal
A public verification page allows anyone — investors, auditors, other traders — to look up a proof by ID and verify its authenticity. The page displays public outputs, the candle data hash, and step-by-step instructions for running the RISC0 verifier locally.
Saved Configurations
Users can save and reload backtest configurations tied to their Sui wallet address. Each saved config can be updated in-place or forked as a new entry.

The platform is built on Next.js with a TypeScript API layer, MongoDB for persistent storage, Redis for ephemeral caching, and the RISC0 zkVM running as a native binary alongside the server process.

text
Frontend (Next.js)
├── Strategies Page  ──→  Backtester Page  ──→  Results + Proof
│         ↕                     ↕                      ↕
│   MongoDB (cards)       SSE Stream            ProofButton
│
API Routes (Next.js)
├── /backtest/stream   GET  SSE progress stream
├── /backtest/cancel   POST Cancel via Redis flag
├── /backtest/prove    POST Run prover + mint NFT
└── /verify            GET  Public proof lookup
        ↓                         ↓
Redis Cache                 RISC0 zkVM Host
proof:candles:{runId}       proof_receipt.bin
proof:entries:{runId}       proof_output.json
        ↓                         ↓
Storage Layer
├── MongoDB   receipts (BSON Binary), proofs, users/cards
├── Walrus    proof_receipt.bin  (blob ID referenced on-chain)
└── Sui       Strategy NFTs (public outputs)

The backtester is the platform's core computation engine, designed to mirror real trading conditions as closely as possible. Backtests run in three sequential phases:

1
Data Fetching
Historical OHLC candle data is fetched from Bybit for the configured symbol(s), timeframe, and date range. Data is fetched in rolling periods (up to 1,000 candles per request) and deduplicated across periods.
2
Pattern Scanning
The selected strategy runs across all fetched candle data, detecting signals that match the configured parameters. Signals are filtered to the exact date range specified.
3
Trade Simulation
Each signal is executed as a simulated trade using the configured take-profit, stop-loss, expiry candles, entry offset, and leverage. A money simulation runs over the executed trades period-by-period, compounding capital across the full date range.

Performance Metrics

MetricDescription
Total ReturnPercentage gain or loss relative to initial capital
Win RatePercentage of trades that hit take-profit before stop-loss or expiry
Sharpe RatioRisk-adjusted return (annualised excess return / standard deviation)
Max DrawdownLargest peak-to-trough decline in account balance
Avg PnL / TradeMean dollar profit or loss per executed trade
Best / WorstHighest and lowest individual trade by dollar PnL
Per-SymbolTrades, PnL, and win rate segmented by trading pair

Supported Strategies

StrategyDirectionKey Parameters
Bullish / Bearish DivergenceBothRSI difference, RSI threshold, lookback hours
Bullish / Bearish EngulfingBothPrev candle body %, RSI threshold
Overly SoldBullishRSI below threshold, lookback hours
Bollinger Band BreakoutBoth% outside band

Backtest Configuration

ParameterDescription
ExchangeBybit (Derivatives, Spot, Commodity)
Symbol OverrideComma-separated pairs, or all available symbols
Timeframe1m, 3m, 5m, 15m, 30m, 1h, 4h, 1d
Date RangeArbitrary start and end date
Initial CapitalStarting account balance in USD
Position SizeDollar amount allocated per trade
LeverageMultiplier applied to position size
Take ProfitTarget gain percentage per trade
Stop LossMaximum loss percentage per trade
Expiry CandlesNumber of candles before a trade is forcibly closed
Entry OffsetNumber of candles after signal before entry

What is a ZK Proof?

A zero-knowledge proof is a cryptographic protocol that allows one party (the prover) to convince another party (the verifier) that a statement is true, without revealing any information beyond the truth of the statement itself.

In Trading Cards: the statement is "I ran this backtest strategy on these real candles and got these results." The proof convinces any verifier that the statement is true, without revealing what the strategy parameters were.

How RISC0 Works

Trading Cards uses the RISC0 zkVM — a zero-knowledge virtual machine that can prove the correct execution of any Rust program. The backtest logic is compiled to run inside the zkVM. When the program runs:

  1. It takes private inputs — the strategy config, candle data, and trade signals — which are never exposed.
  2. It produces public outputs — the candle data hash, trade statistics — which are committed to the proof receipt.
  3. The STARK proof receipt cryptographically guarantees that the public outputs were produced by the correct program running on the private inputs.

Private vs Public Outputs

DataVisibilityWhy
Strategy parameters (TP, SL, RSI)PrivateUser's intellectual property
Candle dataPrivateNot needed on-chain
Candle data hashPublicVerifiable against Bybit's API
Trade count, win rate, PnL, SharpePublicThe claims being proven
Strategy name hashPublicIdentifies strategy type
Circuit image IDPublicIdentifies the exact circuit version

A Strategy NFT is a Sui object that represents a verified algorithmic trading strategy. It is minted after a ZK proof is successfully generated and contains only the public outputs from the proof circuit.

NFT Data Model

move
struct BacktestProof has key, store {
    id:             UID
    image_id:       String    // RISC0 circuit version
    journal_digest: String    // Hash of all public outputs
    candle_hash:    String    // SHA-256 of candle data
    strategy_id:    String    // Hash of strategy name
    total_trades:   u64
    win_rate_bps:   u64       // 6500 = 65.00%
    total_pnl_bps:  u64       // 2341 = +23.41%
    sharpe_x1000:   u64       // 1840 = Sharpe 1.840
    timestamp:      u64       // Unix ms
    version:        String    // "pattern:proof:v1"
}

Minting Flow

  1. User completes a backtest and views results
  2. User clicks "Generate Proof" — the platform calls POST /api/backtest/prove
  3. The API reads cached candle data from Redis and runs the RISC0 prover
  4. The receipt is uploaded to Walrus; the blob ID is stored in the NFT
  5. The API calls mint_proof on the deployed Move contract
  6. The NFT is transferred to the user's Sui wallet address
  7. A transaction digest and Sui Explorer link are returned to the user

Any third party can verify a strategy proof independently, without trusting the Trading Cards platform.

1
Look up the proof
bash
GET https://tradingcards.app/api/backtest/prove?proofId=<id>
Returns public outputs, image ID, journal digest, and Walrus blob ID. No private data included.
2
Download the receipt
bash
curl "https://tradingcards.app/api/backtest/prove/receipt?proofId=<id>" \
  -o proof_receipt.bin
3
Verify the STARK proof
bash
# Install RISC0
curl -L https://risczero.com/install | bash

# Verify
rzup verify \
  --receipt proof_receipt.bin \
  --image-id <IMAGE_ID>
If this passes, the proof is mathematically valid.
4
Verify the candle data
The candle_hash in the public outputs is a SHA-256 of the exact candles fed to the circuit. Fetch the same candles from Bybit's public REST API, hash them, and compare. A matching hash proves the proof used real, unmanipulated market data.
What verification does not prove: That the strategy will perform the same way in live trading, that the parameters are optimal for any investor, or future performance of any kind.
This section will be expanded as the platform's token model is finalised.

Strategy NFTs represent the base layer of the platform's economic model. Key properties:

Scarcity by proof
Only strategies with a valid ZK proof can be minted. This creates a natural quality filter — strategies with no real backtest history cannot produce NFTs.
Performance on-chain
Win rate, PnL, and Sharpe ratio are permanently recorded at mint time. Historical performance is immutable and publicly verifiable.
Transferability
Strategy NFTs are standard Sui objects and can be listed, sold, or transferred freely. A marketplace layer will allow investors to discover and acquire high-performing strategies.
Live performance tracking
Future versions will link a Strategy NFT to a live trading instance, updating on-chain performance metrics as the strategy executes in real time.

Strategy Config Privacy

The strategy configuration is the user's intellectual property. It never leaves the Trading Cards server:

  • The config is passed to the RISC0 prover as a private input and deleted from disk after proof generation
  • It is stored in MongoDB as _privateConfig for internal audit, but never returned by any API endpoint and never put on-chain
  • The ZK proof mathematically guarantees the results without requiring the config to be disclosed

Wallet-Scoped Storage

Saved backtest configurations are stored scoped to the user's Sui wallet address. No authentication system beyond wallet ownership is required.

Candle Data Caching

During backtesting, candle data and trade signals are cached in Redis under the runId with a 2-hour TTL. This data is consumed by the prover and deleted from Redis immediately after proof generation. It is never exposed to the browser.

Proof Receipt Integrity

The proof receipt is stored as immutable BSON Binary in MongoDB and uploaded to Walrus with a 1-year epoch commitment. The receipt is content-addressed — any modification to the bytes would invalidate the STARK proof.

1Core Platform
Current
  • Backtester with SSE streaming and real-time progress
  • ZK proof generation via RISC0
  • Proof storage in MongoDB and Walrus
  • Public verification portal
  • Saved configurations tied to Sui wallet
2On-Chain
Upcoming
  • Strategy NFT minting on Sui mainnet
  • NFT marketplace for strategy discovery and trading
  • On-chain proof verification via Sui Move contract
  • Walrus integration for decentralised receipt storage
3Live Trading
Future
  • Live strategy execution linked to NFT identity
  • Real-time performance metrics updated on-chain
  • Investor subscription model — mirror a strategy's trades
  • Performance-based fee distribution to strategy creators
4Ecosystem
Future
  • Third-party strategy import (Pine Script, Python)
  • Multi-exchange support beyond Bybit
  • Social layer — followers, comments, leaderboards
  • API access for programmatic strategy submission
Backtest
A simulation of a trading strategy against historical market data to evaluate how it would have performed.
BSON Binary
MongoDB's native binary data type, used to store proof receipt bytes without base64 encoding overhead.
Candle Hash
A SHA-256 hash of the OHLC candle data used in a backtest. Included as a public output in every ZK proof, allowing verifiers to confirm the data came from real market sources.
Circuit
The Rust program compiled to run inside the RISC0 zkVM. The circuit implements the backtest logic and defines what is private (config) and what is public (results).
Image ID
A unique identifier for a specific compiled version of the RISC0 circuit. Verifiers can confirm a proof was generated by the correct, audited circuit by checking the image ID.
Journal
The RISC0 term for the public outputs committed to a proof. The journal digest is a hash of all public outputs and is included in the proof receipt.
Move
The smart contract programming language used on the Sui blockchain. Trading Cards' NFT contract is written in Move.
NFT (Strategy)
A non-fungible Sui object representing a verified backtest proof. Contains public performance metrics and a reference to the full proof receipt on Walrus.
Private Input
Data fed to the RISC0 circuit that is never revealed. In Trading Cards: the strategy config (TP, SL, RSI thresholds) and the raw candle data.
Proof Receipt
The binary STARK proof file produced by the RISC0 prover. Cryptographically proves the circuit ran correctly and produced the claimed public outputs.
Public Output
Data committed to the ZK proof that anyone can see and verify. In Trading Cards: candle hash, trade count, win rate, PnL, Sharpe ratio.
RSI
Relative Strength Index. A momentum oscillator measuring price change speed and magnitude. Used by several Trading Cards strategy types to filter entry signals.
Sharpe Ratio
A measure of risk-adjusted return. Mean return divided by standard deviation of returns, annualised. Higher is better.
STARK
Scalable Transparent ARgument of Knowledge. The cryptographic proof system used by RISC0. Does not require a trusted setup, making it suitable for public verifiability.
Sui
A layer-1 blockchain with an object-centric data model and Move smart contracts. Trading Cards uses Sui for NFT minting and on-chain proof verification.
Walrus
Sui's decentralised storage network. Used by Trading Cards to store proof receipts permanently off-chain, referenced by blob ID from the Strategy NFT.
zkVM
Zero-Knowledge Virtual Machine. A VM that can prove the correct execution of arbitrary programs. RISC0's zkVM produces STARK proofs of RISC-V program execution.