FanCrypto
Provably Fair Fantasy Sports on Avalanche
Whitepaper v1.0 · March 2026
Abstract
FanCrypto is a daily fantasy sports platform where every contest is governed by smart contracts on the Avalanche C-Chain. Entry fees are held in on-chain escrow, lineups are cryptographically committed at entry time, and payouts are distributed directly to winner wallets by the contract — no intermediary, no trust required. Avalanche’s sub-second finality and low gas fees make micro-contests with small entry fees economically viable for the first time.
The Problem
Traditional Fantasy Platforms Require Blind Trust
Opaque Payouts
Users have no way to independently verify that prize pools were distributed correctly. You trust the platform, or you don't play.
Lineup Integrity
Nothing prevents a platform from retroactively modifying entries after games start. Users have zero proof their lineup was locked.
Withdrawal Friction
Winnings sit in a platform-controlled account. Withdrawals take days, require identity re-verification, and can be frozen at will.
The Solution
Enforced by Code, Not Policy
FanCrypto replaces platform promises with smart contract guarantees. These aren’t terms of service — they are rules enforced by immutable code on the Avalanche C-Chain, verifiable by anyone.
Immutable Lineup Commitment
A keccak256 hash of your lineup is recorded on-chain at entry. No one — not even us — can alter it after submission.
On-Chain Escrow
Entry fees are held by the smart contract, not a company bank account. Funds are only released to winners or refunded on cancellation.
Transparent Settlement
Every payout is an on-chain transaction. Anyone can verify winner addresses and amounts on Snowtrace.
Instant Payouts
Winners receive funds directly to their wallet the moment the contest settles. No withdrawal requests, no delays.
How It Works
Contest Lifecycle
Create Contest
PlatformThe platform calls createContest() on the ContestManager smart contract, specifying the entry fee, token (AVAX, USDC, FCC, etc.), max entrants, and contest window. The contract assigns a unique contestId and emits a ContestCreated event.
createContest(name, token, entryFee, maxEntrants, startTime, endTime)Enter Contest
UserThe user drafts a fantasy lineup in the UI, which computes a keccak256 hash of the sorted player IDs. The user's wallet signs an enterContest() transaction, sending the entry fee to the contract. The contract validates contest state and fee amount — then records the entry on-chain.
enterContest(contestId, lineupHash) payableGames Play Out
OracleReal-time scoring data flows from sports feeds through Chainlink oracles on Avalanche. Player stats update throughout the contest window. All data sources are public and verifiable.
Settle & Pay
PlatformAfter games complete, the backend computes final rankings from oracle data and calls settleContest() with winner addresses and payout amounts. The contract enforces that total payouts never exceed the prize pool minus the platform fee, then pushes funds directly to each winner's wallet.
settleContest(contestId, winners[], amounts[])Smart Contracts
On-Chain Architecture
Two Solidity contracts deployed to Avalanche C-Chain handle all on-chain logic. All contracts are open-source and verified on Snowtrace.
ContestManager.sol
0x4Be9E29313F9bf695aB1265A0f31Ca9bfCc6360EThe central contract that governs the full contest lifecycle. Creates contests, collects entry fees into escrow, records lineup hashes, settles payouts to winners, and handles cancellation refunds. Supports both native AVAX and ERC-20 tokens (USDC, FCC, BTC.b, WETH.e).
FanCrypto Coin — the platform’s native ERC-20 token. 100 million initial supply, 18 decimals. Used as an alternative entry fee token for contests. Owner-mintable for future distribution events and rewards.
Economics
Prize Pool & Payout Structure
Prize Pool Calculation
prizePool = entryFee × entryCount100% of entry fees go into the prize pool. The platform takes a flat 5% fee (enforced on-chain, max 10%). The remaining 95% is distributed to the top ~20% of finishers.
Multi-Token Entry Fees
Example Payout — 25-Player Contest (0.15 AVAX Entry)
Prize Pool
3.75 AVAX
Platform Fee (5%)
0.1875 AVAX
Paid to Winners
3.5625 AVAX
Why Avalanche
Built for Avalanche C-Chain
Contest entries confirm in under one second. Users get instant feedback — no waiting for block confirmations like on Ethereum L1.
Low transaction fees make micro-contests viable. A $5 entry fee isn't eaten by gas. Fantasy sports needs cheap, fast transactions.
Standard Solidity contracts, standard tooling (Foundry, wagmi, viem). No custom VM, no proprietary language. Battle-tested EVM security.
Full-featured testnet with free AVAX for development. Identical to mainnet (Chain 43114) for seamless production deployment.
Architecture
System Design
┌─────────────────────────────────────────────────────┐
│ FRONTEND │
│ Next.js + wagmi v2 + viem │
│ MetaMask / Core / Coinbase / WalletConnect │
│ │
│ Signs transactions locally, sends to C-Chain │
└───────────────┬─────────────────────┬───────────────┘
│ │
▼ ▼
┌───────────────────────┐ ┌──────────────────────────┐
│ BACKEND (Go) │ │ AVALANCHE C-CHAIN │
│ │ │ │
│ REST API (Gin) │ │ ContestManager.sol │
│ Contest management │ │ createContest() │
│ Lineup storage (DB) │ │ enterContest() │
│ Oracle data feeds │ │ settleContest() │
│ Settlement trigger ──┼─▶│ cancelContest() │
│ │ │ │
│ go-ethereum bindings │ │ FCC.sol (ERC-20) │
│ ABI-generated calls │ │ │
└───────────────────────┘ └──────────────────────────┘
│
▼
┌──────────────────────┐
│ SNOWTRACE │
│ Block Explorer │
│ │
│ Verify entries, │
│ payouts, events │
└──────────────────────┘Frontend Layer
Next.js App Router with wagmi v2 and viem for all chain interactions. No ethers.js. Supports MetaMask, Core, Coinbase Wallet, and WalletConnect. Connects directly to Fuji RPC.
Backend Layer
Go REST API with go-ethereum ABI bindings. Manages contest CRUD, stores lineups off-chain, ingests oracle scoring data via concurrent goroutines, and triggers on-chain settlement.
Blockchain Layer
Two Solidity contracts on Avalanche C-Chain handle escrow, payouts, and token management. Compiled and tested with Foundry. Deployed via forge scripts.
Security & Compliance
Trust Minimized by Design
Cryptographic Lineup Integrity
Lineup hashes are committed via keccak256 and stored immutably on-chain. Post-entry modification is mathematically impossible.
Pull-Pattern Refunds
Cancelled contests use a pull-based refund pattern (claimRefund). Users withdraw their own funds rather than relying on batch pushes, eliminating griefing vectors.
Reentrancy Protection
All state-changing functions that transfer funds use OpenZeppelin's ReentrancyGuard (nonReentrant modifier).
Platform Fee Cap
The platform fee is enforced on-chain with a hard maximum (10%). Any change emits a public PlatformFeeUpdated event visible to all participants.
Games of Skill Classification
FanCrypto operates as a Game of Skill under UIGEA (2006). Salary-cap drafting, player research, and lineup strategy determine outcomes — not chance.
Roadmap
From MVP to Mainnet
MVP
Live on Fuji- •Core smart contracts (ContestManager, FCC)
- •Contest creation, entry, settlement, and refund flows
- •Multi-token support (AVAX + ERC-20s)
- •Wallet connection (MetaMask, Core, Coinbase, WalletConnect)
- •Salary-cap draft UI with real NBA data
- •JWT auth with secure session management
Phase 2
In Progress- •Chainlink oracle integration for automated live scoring
- •Automated settlement (no manual owner trigger)
- •Multi-sport expansion (NFL, MLB, NHL)
- •Mobile-optimized progressive web app
Phase 3
Planned- •Avalanche Mainnet deployment (Chain 43114)
- •Third-party smart contract audit
- •Avalanche Subnet exploration for dedicated throughput
- •Social features (leagues, friends, chat)
- •FCC token utility expansion (staking, governance)
Try It Now
The MVP is live on Avalanche Fuji Testnet. No real funds required.