web3-DREAM11
Fantasy-cricket marketplace on Base Sepolia: teams bid for players in on-chain auctions, Chainlink Automation runs the auction clock and Chainlink Functions fetches the rankings.
- Period: 2023 to 2025
- Languages: Solidity, JavaScript
- Built with: Foundry, Chainlink Automation, Chainlink Functions, Next.js
- Repository: yogesh0509/web3-DREAM11
- Live demo: https://web3-dream-11.vercel.app
What it does
A fantasy-cricket marketplace where the rules are in contracts, not on a server. It runs on Base Sepolia, a testnet.
- The factory owner creates a game with a list of players. This deploys a contract that holds the player list and starts the game.
- Each team registers by paying 0.001 ETH and receives 100 "Dream Tokens". The tokens are a plain balance in the contract, not an ERC-20.
- Chainlink Automation calls the contract on a timer. The calls alternate between opening an auction for the next player and closing it. Closing gives the player to the highest bidder.
- While an auction is open, teams bid. The price is set by the contract and rises in steps (1, 3, 5, 7, 9, 11, 16, 21 and so on). Outbid tokens come back through a withdrawal.
- After the last player, the contract sends a Chainlink Functions request. A short script stored in the contract fetches each player's T20 batting rank from a cricket API.
- The callback scores each team, picks the winner, and unlocks the prize: 70% to the winner and 30% to the treasury.
History
It began in January 2023, using Chainlink Any API and an external adapter written in Node. In December 2024 the contracts moved from Hardhat to Foundry. In May 2025 the oracle moved from Any API to Chainlink Functions.
Where to look
- The live demo is linked above. It is a Next.js app that reads the deployed factory and its games directly.
- The excerpts in this folder are pinned to the last commit that compiles, whose interface matches the deployed contract: the Automation upkeep, the Functions request and callback, and the auction ledger.
Testnet only. It has not been used with real money.
Deployed contracts
Testnets only. Each address opens on its block explorer.
| Network | Contract | Address | Read-only calls |
|---|---|---|---|
| Base Sepolia | GameFactory | 0x2058…9524 | owner(), getAllGames() |
| Base Sepolia | Game | 0xC7BA…d4Aa | REGISTRATION_FEE(), s_auctionTime(), s_totalplayerCount(), s_subscriptionId(), donId(), s_auctionState(), getBuyers() |
- GameFactory (Base Sepolia): The factory the live demo reads. It deploys one Game per contest.
- Game (Base Sepolia): One contest, created by the factory.
In the terminal, cast call --list lists every function that can be called live against these contracts.