Anchor program for a cricket prediction market
Last updated Mar 1, 2026
13
Stars
5
Forks
1
Issues
0
Stars/day
Attention Score
5
Language breakdown
No language data available.
▸ Files
click to expand
README
Cricket Prediction Market
The contract allows users to participate in a decentralized prediction market by placing bets on the outcomes of cricket matches.
Market Mechanism (LMSR)
This prediction market uses the Logarithmic Market Scoring Rule (LMSR), a mathematical formula designed specifically for prediction markets. Here's how it works:
Core Formula
The market uses LMSR to determine prices and costs:- Cost Function:
- YES Share Price:
- NO Share Price:
Where:
- b = Liquidity parameter (controls price sensitivity)
- q_yes = Number of YES shares
- q_no = Number of NO shares
Example: "Will India win the 2025 Champions Trophy?"
Let's walk through a trading scenario:
Initial Market State:
b = 1000 # Liquidity parameter qyes = 100000 # Initial YES shares qno = 100000 # Initial NO shares
- Initial Prices:
Both outcomes start at equal probability
- Someone buys 50,000 YES shares:
New q_yes = 150,000
P_yes = e^(150,000/1000) / (e^(150,000/1000) + e^(100,000/1000))
= e^150 / (e^150 + e^100)
≈ 0.73 (73%)
Market now shows 73% chance of India winning
- Another trader buys 75,000 NO shares:
New q_no = 175,000
P_yes = e^150 / (e^150 + e^175)
≈ 0.31 (31%)
Market now shows 31% chance of India winning
How It Works in Practice
- Trading:
- Settlement:
- Example Trade:
🔗 More in this category