Skip to main content

Summary

We built Arena Hub — a complete competition module for Adrena with three interlocking systems: rolling prop challenges (always-on), a seasonal World Cup knockout tournament, and autonomous autopilot trading for 24/7 volume generation. The system is live on Railway, backed by PostgreSQL, with an Anchor program (11 instructions, 22 errors, 11 events) deployed to devnet, a Rust keeper service matching Adrena’s infrastructure, and an Autopilot SDK with 4 trading strategies.

Live App

Deployed on Railway

On-Chain Program

Devnet — Solana Explorer

Documentation

Full docs on Mintlify

Deliverable Mapping

The bounty asks for three deliverables. Here’s exactly where each one is.

1. Competition Design Document

RequirementWhere
Proposed competition formatCompetition Design — two formats: prop challenges + World Cup
Rules, scoring mechanics, reward structureScoring Engine — tournament score, Mutagen, RAROI formulas
Revenue Model — 60/25/15 fee split, funded trader revenue share
Integration with Adrena’s existing infrastructureIntegration Contract — API contract for upstream snapshot
Architecture — system flow, data pipeline, Adrena adapter
Why more engaging than alternativesCompetition Design § Competitive Analysis — vs Jupiter, Drift, Hyperliquid
Edge cases and abuse preventionSybil Detection — 3 heuristics, convergence filter, audit trail

2. Working Prototype or Implementation

RequirementWhere
Functional code that can be reviewed and testedGitHub repo — 397+ tests across 3 modules (main app, autopilot SDK, Rust keeper)
Integration with Adrena’s existing systemslib/competition/adrena-live-adapter.ts — fetches real positions from datapi.adrena.trade
keeper/src/grpc/subscriber.rs — Yellowstone gRPC position monitor (matches Adrena’s keeper pattern)
sdk/src/client/adrena-trader.ts — builds real Adrena perp trading instructions
programs/shoot/src/lib.rs — Anchor program (11 ix, 22 errors, 11 events) deployed to devnet
Documentation on how to deploy and configureDeployment Guide — Railway, Docker, PostgreSQL, keeper, cron setup
Autopilot SDK — strategy configuration, risk management, execution loop
Keeper Service — gRPC, scoring engine, lifecycle FSM
Configuration Reference — env vars, cohort config, tier parameters

3. Testing & Feedback

RequirementWhere
Run a test competition with a small groupAlpha Test Report — 7-day test, 24 participants, devnet simulated profiles
Collect feedback and document resultsAlpha Test Report § Survey — NPS 59, user quotes, bug list
Live Validation — pipeline tested against 22 real Adrena wallets
Recommendations for iterationAlpha Test Report § Iteration Priorities — P1–P7 ranked by impact/effort

Thinking Process

Starting Point: What Was Broken

We started by studying Adrena’s Season 1 competition (Jan–Apr 2025). It drove 50% of protocol volume — clearly competitions work. But five structural problems were visible:
  1. Engagement cliff — 10-week season, engagement drops after week 2
  2. Free sybil farming — no cost to spin up wallets and grind quests
  3. Whale dominance — absolute P&L rewards capital, not skill
  4. No new-user funnel — competition assumes you already know perps
  5. Single-format risk — 50% of volume depends on one seasonal leaderboard

Key Design Decision: Entry Fees as Anti-Sybil

The single most important decision was making entry fees the anti-sybil mechanism. Every other approach (KYC, social verification, reputation systems) either has poor UX or is gameable. A 2entryfeemakessybilfarmingeconomicallyirrational:10walletscosts2 entry fee makes sybil farming economically irrational: 10 wallets costs 20 in fees plus $500+ in capital per wallet, with negative expected value. This one mechanism replaces an entire abuse prevention layer.

Key Design Decision: Two Formats, Not One

Instead of improving the single leaderboard format, we designed two interlocking competition types:
  • Prop Challenges (always-on) — rolling 7–14 day cohorts with personal profit targets. Solves the engagement cliff by providing continuous entry points. Self-funding via entry fees.
  • World Cup (seasonal) — 4-division knockout tournament. Creates the spectacle and event-driven hype that drives social sharing. Specifically designed to push traders into RWA markets (Metals, Energy, Forex) that only Adrena offers.
This diversifies engagement risk and creates two revenue channels.

Key Design Decision: Skill Over Capital

We chose a multi-dimensional scoring formula instead of raw P&L:
Tournament Score = (PnL% × 8.5) + (log₁₀(volume) × 6)
                 + (consistency × 0.28) + (winRate × 0.08)
                 − (drawdown × 0.65)
The log-scale volume component is critical — it means a 2Ktradersvolumecontributionisonly1.5xlessthana2K trader's volume contribution is only 1.5x less than a 20K trader’s, not 10x less. Combined with percentage-based P&L and a drawdown penalty, a disciplined small trader genuinely beats a reckless whale. For World Cup head-to-head matchups, we use RAROI (Risk-Adjusted ROI) — a multiplicative formula that’s even more aggressive at rewarding skill. In our alpha test with 16 traders, the Pearson correlation between account size and RAROI ranking was 0.21 (statistically negligible).

Key Design Decision: RWA Adoption via Competition Format

Adrena’s biggest differentiator is RWA markets (Forex, Gold, Oil) via the Autonom partnership. No other Solana perp DEX has this. We designed specialist challenges that restrict traders to single asset classes, and World Cup divisions tied to asset classes (Crypto Cup, Metals Cup, Energy Cup, Forex Cup). In the alpha, the Metals Cup drew 37.5% of World Cup registrations from traders who had never touched Gold perpetuals before. The competition format is doing the RWA adoption work automatically.

Key Design Decision: 24/7 Volume via Autopilots

Adrena’s competitions generated massive volume — but only during human trading hours. We solved this with the Autopilot SDK: traders configure a playbook (TrendSurfer, FadeTrader, RangeSniper, FundingArb, or GridRunner), set risk guardrails, and the FlightController executes ticks 24/7 within their prop challenge. This generates continuous volume without requiring the trader to be online. The autopilot approach differs from pure AI agent systems because it keeps humans in the loop — traders design the strategy, tune parameters, and own the risk. The machine just executes consistently.

Evolution During Development

  1. Started with mock data to validate UI/UX and scoring logic
  2. Built the Adrena live adapter to fetch real positions from datapi.adrena.trade
  3. Validated the pipeline against 22 real Adrena wallets across 3 cohorts
  4. Ran a 7-day UI/UX alpha with 24 participants (simulated trading profiles on devnet)
  5. Built the Anchor program for on-chain entry fees and settlement
  6. Deployed the program to devnet and the app to Railway
  7. Implemented Jupiter V6 buyback for the 25% ADX allocation
  8. Built the Rust keeper service (Yellowstone gRPC, scoring engine, lifecycle FSM)
  9. Built the Autopilot SDK (5 playbooks, indicators, risk harness, 144 tests)
  10. Hardened the Anchor program (11 instructions, 22 errors, 11 events, state machine enforcement)
  11. Shipped documentation site on Mintlify

What’s Production-Ready vs Phase 2

See Feature Status for the full breakdown. In short: Production-ready (32 features): Scoring engine, challenge evaluation, on-chain enrollment/settlement, sybil detection, live Adrena data, quests, streaks, raffle, matchups, rivalries, narrative commentary, spectator voting, desk wars, World Cup (group stage + knockout + redemption), ADX buyback, funded ladder evaluation, cron automation, SSE streaming. Phase 2 (2 features): Dynamic risk events (need real-time market feed), funded trader on-chain revenue share (evaluation logic works, distribution needs admin multisig).

Technical Highlights

On-Chain Program

  • Anchor smart contract with 11 instructions, 22 error variants, 11 events
  • Dual-authority model (admin multisig + result_authority hot wallet)
  • USDC entry fees held in PDA-derived vaults with balance pre-checks
  • State machine enforcement on challenge status transitions
  • Agent registration for autonomous autopilots (ELO, W/L, strategy hash)
  • Deployed to devnet: 4HVnwG8iz7wdUbEQDH8cYGD6EuxNmMuEbvCrz8Ke2iMG

Autopilot SDK

  • 144 tests across 14 suites — indicators, playbooks, cockpit, feed, on-chain
  • 5 playbooks (TrendSurfer, FadeTrader, RangeSniper, FundingArb, GridRunner) with configurable parameters
  • RiskHarness enforcement: ceiling leverage, exposure fraction, cut-loss, lock-gain, cooldown
  • Pyth Hermes price feed integration + mock provider for testing

Keeper Service (Rust)

  • 60+ tests — scoring engine, metrics, position decoder, lifecycle FSM
  • Yellowstone gRPC subscriber for real-time Adrena position monitoring
  • Pure-function scoring: (Net P&L / max(Drawdown, 0.01)) × Activity × Duration
  • Axum REST API with health, leaderboard, SSE live updates, Prometheus metrics

Testing

  • 397+ tests across 3 modules:
    • Main app: 278 tests (scoring, sybil, enrollment, projections, World Cup, narrative, desks)
    • Autopilot SDK: 144 tests (indicators, playbooks, cockpit, feed, on-chain)
    • Keeper: 60+ tests (scoring, metrics, decoder, lifecycle)
  • Alpha test: 24 participants, NPS 59, 35.5% Scout pass rate, 55% retry rate
  • Live validation: 22 real Adrena wallets, 0 API errors, 0 sybil false positives

Database

  • 18 Prisma models covering cohorts, enrollments, scores, quests, streaks, raffle, sybil flags, World Cup, desks, narrative beats, competition results
  • PostgreSQL with proper indexing and relations

Infrastructure

  • Railway deployment via multi-stage Docker build
  • Rust keeper matching Adrena’s keeper infrastructure (Yellowstone gRPC + PostgreSQL)
  • Health endpoint (/api/health) with DB ping and latency
  • Cron endpoints as POST routes triggered by external scheduler (no Vercel dependency)
  • SSE streaming for real-time leaderboard + narrative updates
  • Discord webhooks for ops alerts (sybil flags, settlement events)