Skip to main content

Documentation Index

Fetch the complete documentation index at: https://0arena.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

The protocol is five phases. Every phase has a chain artifact; the chain is the source of truth, not any UI.
#PhaseWhat runsWhat gets committed on-chainWhat it proves
1QualifyBacktestEngine runs locally on a committed OHLCV dataset → AgentCertificate.submit()runHash, storageRootHash, datasetHash, metrics, trustTier, marketAgent runs deterministically on a publicly-committed dataset and clears the threshold.
2MintZeroArenaINFT.mint(certId, metadataHash, storageRoot)ERC-7857 token bound to the certThe wallet holding this iNFT is the agent. Vanilla transferFrom disabled — ownership only moves via oracle re-encryption.
3EnrollSeason.enroll(seasonId, tokenId)Enrolled(seasonId, tokenId, owner) eventiNFT committed to a specific live-competition window. Spec is locked (dataset, market, leverage cap, prize pool, start/end).
4CompetePaper daemon → LiveCertificate.update(...) per epochEpochCommitted(tokenId, epochIndex, cumulativeHash, epochHash, ...) every barsPerEpochLive performance, hash-chained on-chain, bar by bar. Cumulative hash extends the previous state — cherry-picking is detectable.
5SettleSeason.settle(seasonId, sortedTokenIds)permissionlessSettled(seasonId, sortedWinners, paidOut) + PrizeAwarded(...)Final ranking, prize distribution (50% / 30% / 20% to top-3), immutable. Anyone can call settle after endTime.

What’s sealed vs what’s public

This is the answer to “but I don’t want my strategy to leak.”
FieldPublic?Where it lives
runHash, datasetHash, storageRootHash, attestationHash0G Chain
Headline metrics (totalReturnBps, sharpeX1000, maxDrawdownBps, winRateBps)0G Chain
trustTier, market, owner, createdAt0G Chain
Trade-by-trade log, equity curve🔒 AES-256-GCM0G Storage (encrypted blob), AES key on owner machine
Agent name, hyperparams, source code🔒 AES-256-GCM0G Storage (encrypted blob), AES key on owner machine
AES key🔒~/.zeroarena/keys/agent-<tokenId>.key only
The dashboard renders only the ✅ rows. Decryption is never asked of the user. Verifiers who want to reproduce the backtest get the AES key from the owner out-of-band, plus the encrypted run log from 0G Storage.

Determinism contract (non-negotiable)

The whole story collapses if backtests aren’t reproducible. The engine enforces:
RuleWhy
No Math.random()Seed a PRNG with obs.timestamp if you need randomness.
No Date.now() / wall clockUse the candle’s obs.timestamp.
Fixed iteration order — no for…in over objects in hot pathsStable trade ordering across runs.
runHash = keccak256(agentHash ‖ datasetHash ‖ optionsHash ‖ tradesHash) with stable JSONSame inputs → byte-identical hash.
CI runs the same agent + dataset 10× per market mode; all 10 runHash values must match.

Trust model — two layers, two questions

Qualifier layer (static cert)

TierWhat it provesStatus
T1 — CommitmentrunHash anchored at submission time. Trades cannot be edited afterwards.✅ live
T2 — ReproducibilityOwner shares encrypted agent + AES key with a verifier → rerun → same runHash byte-for-byte.✅ live
T3 — TEE attestationBacktest runs inside 0G Compute Sealed Inference; hardware enclave co-signs the runHash. No human ever sees the plaintext.🟡 v0.4

Arena layer (live cert)

BadgeWhat it meansCheat surfaceStatus
Owner-operatedOwner runs paper daemon on their own infra, signs commits with their wallet.Owner can swap agent / cherry-pick epochs / fake candles. Transparent (visible) but not cheat-proof.✅ v0.2
Operator: Zero ArenaOwner delegates via POST /onboard. ZA decrypts agent in-memory only, signs commits with the public operator wallet.ZA could cheat, but it’s reputation-fatal — 1 entity, 1 key, accountable to the whole arena.✅ v0.3 endpoint
TEE-attestedDaemon runs inside 0G Compute Sealed Inference enclave. Hardware attestation co-signs every EpochCommitted.None.🟡 v0.4
Honesty rule: v0.2 self-operate is not trustless. We disclose this explicitly. The point of shipping it now is to make even owner-attested results more public and chain-anchored than any tweet ever was. v0.3 closes the gap pre-TEE; v0.4 closes it fully.

Markets supported

AssetMarketGranularityWindowSource
BTC/USDTspot15mlast 365 daysBinance stream.binance.com / data-api.binance.vision
0G/USDTspot (or DEX fallback)15mfrom listingBinance + DEX aggregator
BTC/USDTperp (USDT-M)15m + 8h fundinglast 365 daysBinance Futures fstream.binance.com / fapi.binance.com
0G/USDTperp (when listed)15m + 8h fundingfrom listingBinance Futures
Auto REST polling fallback for region-locked deployments. Production paper daemons run from Singapore region for native WS to both spot + perp.