
REKT FLY
Learn DeFi risk in a 3D fly-brain survival game, then protect a real Sepolia testnet loan.
Demo
About
REKT FLY turns liquidation risk into something you can see, play, and explain. It is a 3D DeFi survival lab for beginners who find collateral ratios and lending dashboards intimidating. A player starts with a virtual loan backed by ETH and must survive a falling market while using limited reserves. Adding collateral preserves the loan but commits more capital; repaying debt improves safety while reducing the loan. An interactive price lesson, readable activity graph, pause controls, and an observation log make each tradeoff visible. The distinctive controller uses a reduced fly escape circuit: 316 real neuron identities and 10,711 recorded connections. Two threat-sensor populations feed an escape alarm. Simulated activity drives a deliberately simple, public protection rule. Players can block sensor outputs and replay the same seed to test the circuit’s causal contribution. Scientific names are optional details, so no neuroscience background is required. The browser experience works without a wallet. A separate MetaMask panel bridges the lesson to the official Ethereum Sepolia lending challenge: registration, live position reads, a health-factor calculator, exact token approvals, collateral deposits, and debt repayment. A successful onchain registration has been verified. The practice pilot never signs wallet transactions. Use cases include beginner DeFi education, classroom demonstrations of risk and feedback, and reproducible experiments for builders exploring interpretable controllers. The anatomical fly and inspectable circuit make the lesson memorable without presenting simulated results as investment advice. Current scope: kinematic 3D body animation, reduced neural simulation, local practice, and explicit Sepolia wallet actions. Full closed-loop MuJoCo locomotion and confidential CRE automation are not deployed. A live Uniswap V3 exit-liquidity lesson connects the practice to real Ethereum mainnet markets. Compare WETH-to-USDC quotes across two fee tiers and see how slippage affects minimum received and hypothetical debt coverage. It is read-only, requires no wallet, and clearly separates live USDC quotes from practice dollars and Sepolia tokens.
How it's made
The frontend uses Next.js, React, TypeScript, and direct Three.js, deployed on Vercel. React updates controls independently of the 3D render loop. We kept the stack small: no database, paid LLM dependency, agent framework, or custom token contract. The fly asset is derived from Apache-2.0 NeuroMechFly/FlyGym meshes and rigging, converted to a browser GLB with an original preparation pipeline. FlyWire-derived annotations/connectivity provide 104 LC4, 210 LPLC2, and two DNp01 cells; the background points are anatomical context only. Data provenance, pinned sources, transformation steps, and required notices are included. FlyWire data remains CC BY-NC 4.0; original application code is MIT. An original reduced leaky-integrate-and-fire implementation uses published model parameters, signed delayed connections, a seeded input generator, and an explicit market-danger encoder. The browser advances 20 milliseconds of neural time per 100 milliseconds of game time. The anatomical body uses a designed kinematic gait; it is not driven by inferred biological leg torques. Viem handles Sepolia reads, contract configuration checks, two-decimal token accounting, transaction simulation, exact-amount approvals, receipt verification, and account/network changes. The official challenge registration was verified onchain. A separate bounded Modal CPU experiment loaded and stepped the articulated MuJoCo fly with finite state and no numerical warnings; it is not a live cloud game backend. Twelve tests cover circuit integrity, deterministic replay, ablation, accounting, lifecycle, activity history, and protection math. In the seed-42 automated practice comparison, the intact pilot survives 180 seconds with six interventions, while both visual outputs blocked causes liquidation at 64.5 seconds. This is evidence about the game model, not biological validation or financial returns. OpenAI Codex assisted implementation in web/src, scripts, simulation, tests, configuration, and documentation. The participant supplied the idea, product direction, platform constraints, reuse requirements, and feedback, and performed the MetaMask registration. Existing libraries/assets and newly developed behavior are distinguished in the README. Confidential CRE execution is unfinished and no confidential-workflow prize qualification is claimed. Uniswap V3 powers the exit lesson through the official Factory and QuoterV2 contracts. A Next.js server route uses viem simulateContract to quote 0.05% and 0.3% WETH/USDC pools at one block, with bounded RPC fallback and explicit errors instead of mock data. Integer base-unit arithmetic rounds minimum output down. The UI exposes verified pool links, block/time, fees, slippage and remaining hypothetical debt. FEEDBACK.md records developer feedback. No swap is sent, and the two-pool comparison is not a best-route aggregator.