What are smart contracts?#

  • Smart contracts are programs (code) that run on the blockchain networks
  • Ethereum started it. Solana scaled it. The rest are racing to own DeFi in 2025.
  • Smart contracts execute logic that moves tokens between wallets
  • The execution is automated. Once the contract is started, there’s no stopping or changing it
  • Anyone can create and deploy smart contracts
  • An easy example would be creating a pool for a fantasy football league

Fantasy League Pool & Payouts via Smart Contracts#

Fantasy League Pool

Pool Creation#

  • Smart contract is deployed with rules: entry fee (e.g., 0.01 ETH), max players, deadline, payout structure (1st: 50%, 2nd: 30%, 3rd: 20%)
  • Contract accepts deposits — each player sends crypto to the contract address (not a person)

Entry & Commitment#

  • Players submit team rosters
  • Contract locks funds until league ends — no refunds after deadline (enforced by code)

Score Tracking (Oracle Integration)#

  • Smart contract pulls real player stats from a trusted Oracle (e.g., Chainlink)
  • Oracle is a third party that provides data to smart contracts

Automatic Payouts#

  • At league end, distributePrizes() triggers: first place → 50% of pool, second → 30%, third → 20%
  • Funds sent directly to winners’ wallets — no manual payout, no trust needed – this is where the automatic execution of a smart contract guarantees contract enforcement