Getting Started
This document is for Partners who need to integrate their systems with YGG Redeem Platform. It provides a clear reference for the APIs you'll need to create.
What You Need to Know
User Identification
We use Wallet Addresses on the Abstract Chain (abs.xyz (opens in a new tab)) to identify users across all partner games.
Conversion Rates
A Conversion Rate between your game points and USD will be agreed upon and stored in the YGG database. YGG Redeem calculates redemption amounts based on this rate plus any applicable bonuses.
Dynamic Pricing
$YGG/USD price is refreshed every hour using data from CoinMarketCap (opens in a new tab) to ensure accurate conversions.
Bonus System
YGG Redeem provides bonus mechanisms for large redemptions. The Bonus Rate is a percentage amount applied to qualifying redemptions.
API Base URL
Game partners will provide the final API endpoints to YGG before integration.
YGG Redeem will make API calls to your endpoints. For demonstration purposes, all API endpoints in this documentation use the base URL:
https://partner-api.example.comRequired APIs Overview
You'll need to implement 3 required APIs and 1 optional API:
Required APIs
- Get Points - Check user's current point balance
- Deduct Points - Remove points when user redeems
- Revert Points - Return points if redemption fails
Optional API
- Confirm Redemption - Receive confirmation when redemption completes
Bonus Mechanism Example
Here's how the bonus system works:
Example: User receives 2% bonus $YGG tokens if they redeem 5,000 points or more.
// Formula breakdown:
$YGG = GamePoints × ConversionRate × Price<USD/YGG> × (1 + BonusRate)
// Example values:
GamePoints = 5000 // User redeems 5000 points
ConversionRate = 0.01 // 1 point = 0.01 USD
Price<YGG/USD> = 0.15 // 1 YGG = 0.15 USD
Price<USD/YGG> = 6.67 // Reverse calculation: 1 / 0.15
BonusRate = 0.02 // 2% bonus for large redemptions
// Final calculation:
YGGAmount = (5000 × 0.01 × 6.67) × (1 + 0.02) = 340 YGG tokensNext Steps
- Review Authentication requirements
- Implement the API endpoints
- Test integration with YGG development team
- Go live with production endpoints
Have questions? Contact our team for support during integration.