How to Play CodePrix
Master the strategic blockchain racing game with dynamic pricing and tactical gameplay 🏎️
🚀 Get Started with CodePrix
Download the template and test your racing strategy locally!
5 Players
Per Race
15,000 Coins
Starting Budget
1000 Meters
Finish Line
Turn-Based
Strategic Racing
Available Actions
Acceleration
- • Permanently increases your speed
- • Each purchase adds to your velocity
- • Essential for forward movement
- • Base price: ~10 coins per unit
Shell Attack
- • Hits the car directly in front
- • Reduces target's speed to 1
- • Bypassed if target has shield
- • Base price: ~200 coins per shell
Shield Protection
- • Protects from shell attacks
- • Lasts for multiple turns
- • Maximum 5 shields active
- • Base price: ~150 coins per shield
Turn Execution
Turn Order:
- 1.Action Phase: Each car's smart contract executes its strategy
- 2.Shell Resolution: Shell attacks hit targets (if unshielded)
- 3.Movement: Cars move forward based on their speed
- 4.Shield Decay: Active shields decrease by 1 turn
- 5.Win Check: First car to 1000 units wins!
📊 Key Stats to Track:
- • Your position (y-coordinate)
- • Current speed
- • Remaining balance
- • Shield count
- • Distance to leader
Gradual Dutch Auction System
The Revolutionary Pricing Mechanism of CodePrix
🎯 What is a Gradual Dutch Auction?
A Gradual Dutch Auction (GDA) is a dynamic pricing mechanism where prices automatically adjust based on time and demand. Unlike traditional auctions, prices start high and decrease over time, but increase with each purchase.
Want to dive deeper? Check out the detailed GDA research by Paradigm: paradigm.xyz/2022/04/gda
📉 Price Decreases When:
- • More turns pass (time factor)
- • Items remain unsold
- • Late in the race
📈 Price Increases When:
- • More items are purchased
- • High demand from players
- • Early in the race
🧮 The computeActionPrice Formula
Price = targetPrice × e^(ln(1 - perTurnDecrease) × (turnsSinceStart - 1 - (sold + 1) / sellPerTurn))
📊 Parameters Explained:
- targetPrice:The base price for the item (e.g., 10 for acceleration)
- perTurnDecrease:How much price drops per turn (e.g., 0.33% per turn)
- turnsSinceStart:Current turn number in the race
- sold:Total units sold so far
- sellPerTurn:Expected sales per turn (affects price scaling)
⚙️ How It Works:
- 1.Time Factor: As turns progress, base price naturally decreases
- 2.Demand Factor: Each purchase increases the price for the next buyer
- 3.Exponential Scaling: Uses natural logarithm for smooth transitions
- 4.Balance Mechanism: Prevents any single strategy from dominating
💡 Practical Pricing Examples
⚡ Acceleration
- Turn 1: ~15-20 coins
- Turn 10: ~12-15 coins
- Turn 50: ~8-10 coins
- After 10 purchases: +25% price
🔥 Shell
- Turn 1: ~300-400 coins
- Turn 10: ~250-300 coins
- Turn 50: ~150-200 coins
- After 5 purchases: +30% price
🛡️ Shield
- Turn 1: ~225-300 coins
- Turn 10: ~180-225 coins
- Turn 50: ~120-150 coins
- After 5 purchases: +20% price
Strategic Insight: The GDA system creates a natural balance - early buyers pay premium prices but gain first-mover advantage, while patient players get better prices but risk falling behind!
🎮 Strategic Implications
🏃 Rush Strategy
- Get speed advantage early
- Force opponents to react
- Pay premium prices
- Limited late-game budget
⏳ Patient Strategy
- Get better prices over time
- More budget for late game
- Risk falling behind
- May need expensive catch-up
Advanced Strategy Guide
Early Game (Turns 1-20)
- • Acceleration is expensive but crucial
- • Build speed foundation
- • Watch opponent spending
- • Consider 1-2 shields if threatened
Mid Game (Turns 20-50)
- • Prices are more reasonable
- • Shell attacks become viable
- • Position battles intensify
- • Balance offense and defense
End Game (Turns 50+)
- • Prices at lowest point
- • Final sprint opportunities
- • Use remaining budget
- • Block or overtake for victory
Common Mistakes
- • Overspending on turn 1 items
- • Ignoring the GDA pricing dynamics
- • Not tracking total market purchases
- • Poor shield timing
Pro Tips
- • Calculate price per turn advantage
- • Track cumulative purchases
- • Time your moves with price dips
- • Keep emergency shell budget
Race Interface
Play/Pause
Space key
Previous Turn
Left arrow
Next Turn
Right arrow
Speed Control
1x - 10x
Ready to Master the Track? 🏁
Now you understand the Gradual Dutch Auction system - time to race!
