Fast 3D arcade: live crypto becomes hazards & collectibles—learn to spot scams, bad approvals, MEV
DeFi Current teaches blockchain security by making invisible risks—MEV, scam tokens, risky approvals—playable in real time. The game streams live activity to spawn targets, while our FishtankGameState contract on Katana records verifiable scores and events. Micro-tips via Coinbase CDP x402 power instant, $0.01 health refills; the HUD shows Base USDC balances and offers a built-in Onramp for new players. It’s a safe, sticky way to build real onchain intuition, with auditable progress and sponsor-ready telemetry.
Frontend game: A React + Vite app using React Three Fiber (Three.js) renders the 3D “swim & dodge” scene. The HUD shows hearts, score, and the player’s wallet info.
Live data to gameplay: A small risk engine (client or server) watches Katana testnet activity every few seconds, classifies events (e.g., scammy tokens, high slippage, MEV patterns), and turns them into cube spawns (red = danger, purple = high-value, etc.).
On-chain state (Katana): A lightweight Solidity contract, FishtankGameState, records results and analytics. It stores each player’s best/last score and emits events like RiskEvent and HealthRefill. It’s locked down with roles, nonces, unique run IDs, and a pause switch.
Trusted score submissions: When a run ends, the client posts the result to a tiny Express server. The server signs a score approval with a dedicated Signer key, then a Reporter account submits it to the contract
Payments & UX (Coinbase CDP): Micro-refill of health uses x402 ($0.01 USDC on Base). If a player is low on funds, Onramp lets them buy USDC. A balances endpoint shows their USDC in the HUD. (Payments are off the game chain; we just mirror a HealthRefill event on Katana for transparency.)