SkillStake is a minimal 1v1 wagering dApp where two players stake native C2FLR on Flare Coston2 and a referee settles the match on-chain.
- Network: Flare Coston2 (Chain ID 114)
- Integrations: Native C2FLR staking on Flare; EIP-712 signed results; Wagmi/Viem/RainbowKit (frontend); Foundry (contracts); off-chain referee uses Tracker Network API
- Demo: TODO (add live demo or walkthrough video link)
- Setup: See Quickstart below
- Track: Use data protocols on Flare blockchain in an innovative and world changing way
This submission targets the Flare track by deploying to Flare Coston2 and using native C2FLR for on-chain staking and settlement, with planned integration of Flare data protocols to bring verifiable off-chain match data on-chain.
- Current: Native C2FLR staking + settlement on Flare Coston2.
- Planned (not integrated yet): FDC (match attestations), FTSO (price feeds), Secure Random (tie-breakers), FAssets/Smart Accounts (XRPL onboarding).
- Create a challenge with an opponent, stake amount, win condition, and expiry.
- Opponent joins or rejects.
- Referee submits results using EIP-712 signed data and pays the winner.
- Install dependencies
npm install
- Install Foundry deps
cd contracts
forge install OpenZeppelin/openzeppelin-contracts forge-std
cd ..
- Deploy contracts (optional for local demo)
# Requires DEPLOYER_PRIVATE_KEY and REFEREE_SIGNER
npm run deploy
- Configure referee
cp referee/.env.example referee/.env
Fill in REFEREE_PRIVATE_KEY, TRN_API_KEY, and (optionally) CONTRACT_ADDRESS.
- Configure frontend
cp frontend/.env.example frontend/.env.local
Set NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID if you want WalletConnect QR.
- Run
npm run dev
- SkillStake (Coston2): 0x69C48b5D1074b8d73A4eB2975F725012576BC3CD
referee/.env.examplefrontend/.env.example
Key Protocols:
- The Flare Data Connector (FDC): Achieves consensus on external blockchain and internet data so it can be securely used by Flare smart contracts.
FDC lets contracts verify that off-chain input data is authentic. Data providers reach consensus on responses, a Merkle root is published on-chain, and the contract verifies a response + Merkle proof before using the data. In practice this allows us to verify user's inputs such as their match status, providing us with accurate and up to date game data.
MIT