← Back to home

RaceFi

Bringing running on chain - one runner, one stake, one competition at a time

Problem Statement

RaceFi is a running platform that focuses on the social and competitive nature of runners - we allow users to create "challenges" by staking crypto currency, allowing others to compete in the challenge by staking the same amount of crypto. We're bringing running on-chain!Any user can create a challenge for others to compete in, by creating a route on our route maker. Then, we use your location data, average speed, and acceleration to determine the validity of your run and compare it to others who competed in the challenge. The fastest runner takes the entire pool. We allow users to create a challenge in multiple ways: drawing the route themselves, running the route themselves, or importing a run through existing running software. Afterwards, the winner of the challenge will then receive an newly minted 3D NFT of the track that they ran.We combined CoinBase's CDP, Walrus's decentralized storage, Hardhat, and deployed it on various services. We used smart contracts to create an escrow that lets all competitors "stake", and then pay out to the fastest runner.

Solution

There are 3 distinct parts to our project.Frontend Stack:React Native 0.79.5 + Expo SDK 53: Cross-platform development with native GPS capabilitiesExpo Router: File-based routing for intuitive navigationReact Native Maps: High-performance map rendering for route visualizationContext API: Lightweight state management without external dependenciesBackend InfrastructureFastAPI: Async Python framework for high-performance API endpointsSupabase: PostgreSQL database with real-time subscriptions and built-in authContracts: Code written for on-chain contracts using SolidityToken-Service: Logic to handle staking verification, Coinbase api authentication.Web3 & BlockchainCoinbase CDP: Onramp and offramp capabilities for users and stakingSolidity 0.8.20: Smart contract development with OpenZeppelin securitySepolia Testnet: Ethereum testnet for development and testingIPFS via Walrus: Decentralized file storage for NFT assets and challenge metadataKey Features:Running Data Tracking & Verification GPS Tracking SystemReal-time Location: Uses expo-location for continuous GPS tracking during runsCoordinate Collection: Stores latitude, longitude, and timestamp for each pointPolyline Encoding: Converts GPS coordinates to efficient polyline stringsCoinbase Onboarding/OffboardingAllows users to stake fiat currencyUsers would also be able to receive fiat currency directly from appUsers can also check their balances directly on the app instead of their walletStakingAvoid cumbersome manual invoicing and complicated ledgeringChecks on chain to validate the stakeInstantly get paid out after winning a challengeMinimizes transactions in way that maximizes trustMinting NFTsAutomatically mint 3D visualizations of the route as a NFTStore media and metadata on Walrus through IFPS and to cache files beforehandUsed OpenZeppelin as a foundation layer for the NFT contracts

Hackathon

ETHGlobal New York 2025

2025

Contributors