YGG Staking API Documentation
Version 1.0 | Target Launch: Jan, 2026
Overview
The YGG Staking APIs enable partner games to access user staking data from the YGG Play ecosystem. These APIs support game token launches and help partners reward players based on their staking activity.
Launch Token: $CHAD on Abstract via YGG Play
What is Staking?
Staking allows users to lock game tokens (e.g., $CHAD) to earn in-game rewards and benefits:
- For Users: Earn rewards like premium in-game items, boosts, and exclusive perks
- For Partners: Increase player engagement and retention through reward mechanisms
How It Works
The staking integration follows this flow:
- Users stake tokens on the YGG Play platform (e.g., $CHAD tokens)
- YGG calculates 7-day average staked amounts daily
- Partners query staking data when players log in
- Partners distribute in-game rewards based on staking tiers
- Players receive benefits and enhanced gameplay
Key Features
- 🔐 Secure Authentication with API keys
- 📊 7-Day Average Calculation for fair reward distribution
- ⏰ Daily Snapshots at 00:00 UTC
- 🎮 Staking Tiers for progressive rewards
- 🔓 No Lock-in Period - stake and unstake anytime
- 📈 Historical Data access for past staking activity
Staking Calculation
The 7-day average staked amount is calculated to ensure fair reward distribution:
Formula
7-Day Average = SUM(Minimum daily staked amount for past 7 days) / 7How Daily Amounts are Determined
- Snapshot Time: 00:00 UTC daily
- Value Used: Minimum staked balance during each 24-hour period
- Period: Rolling 7-day window
Example Calculation
// User staking activity over 7 days
Day 1: Minimum balance = 0 $CHAD
Day 2: Minimum balance = 100 $CHAD
Day 3: Minimum balance = 300 $CHAD
Day 4: Minimum balance = 150 $CHAD
Day 5: Minimum balance = 150 $CHAD
Day 6: Minimum balance = 650 $CHAD
Day 7: Minimum balance = 650 $CHAD
// Calculate 7-day average
Average = (0 + 100 + 300 + 150 + 150 + 650 + 650) / 7
Average = 285.71 $CHADQuick Start
Ready to integrate? Start with our Getting Started guide.
Integration Checklist
- Review the Authentication requirements
- Understand the API endpoints
- Implement staking tier logic in your game
- Test with YGG development team
- Configure production endpoints
- Go live! 🎉
Use Cases
Real-time Tier Display
Query user staking data when players log in to display their current staking tier and rewards.
Daily Reward Distribution
Fetch staking snapshots to distribute daily, weekly, or monthly rewards based on staking activity.
Limited-Time Events
Use staking tiers to unlock special advantages during in-game events.
Progressive Rewards
Implement tiered reward systems where higher staking amounts provide enhanced benefits.