Case study 06
AITAX
Engineering for a client's Cloudflare-native prediction arcade on Robinhood Chain, built to be safe before it is live.
Problem
A token community wanted an Up-or-Down prediction game with real stakes. Real value demands correct accounting, honest public statistics and a release process that cannot be skipped.
Product direction
Build the whole system properly, but ship it with live staking hard-disabled until the oracle, address confirmation, testnet validation and independent review gates are cleared.
My role
Engineer for the client: full-stack application, Worker architecture, event indexer, contract accounting core and tests, and release documentation. Brand, mascot, token and visual system belong to the client.
Engineering approach
- Cloudflare Worker + D1 + private R2, with one Durable Object coordinating each market.
- A reorg-aware event indexer stores every EVM
uint256as decimal text. Homepage totals come only from verified events, and practice data never enters public statistics. - Wallet-signature sessions with origin- and chain-bound single-use nonces and CSRF protection. Wallet-authenticated meme uploads are validated server-side and stripped of metadata.
- A Solidity accounting core with adversarial local-EVM tests (concurrent rounds, shared boundaries, refunds, reserve behaviour, payouts, reentrancy), plus an immutable Chainlink V3 report adapter for exact BTC/USD boundaries.
Stack and constraints
- Edge
- Cloudflare WorkersD1R2Durable ObjectsOpenNext
- Onchain
- SolidityRobinhood ChainChainlink Data StreamsReown AppKitwagmi / viem
- App
- Next.jsTypeScriptDrizzle
- No real value until every release gate is cleared, and that must be enforced in code.
- Exact price boundaries, so no approximations are allowed in settlement.
- A preserved client visual system and supplied mascot.
Design decisions
Paused by construction
Deployment starts paused with immutable stake and round caps, and both the server and public flags default live staking to false.
Statistics from events only
Public totals are derived from indexed onchain events, never from practice rounds or client claims.
System
Outcome and status
- Pre-release. In the repository's words: "production-oracle code is implemented but no contract is deployed and live staking is hard-disabled."
- 123 commits between 2026-09-09 and 2026-09-18, handed off with integration, security, readiness and deployment documentation.