4️⃣ SKOR AI Agent Staking Project
Stake your $SKORAI tokens, earn rewards, and grow in-game and on-chain. Tiered staking, fixed durations, no early withdrawals. Solana-powered, with a 5M token monthly reward cap.
1. Overview
We're also bringing DeFi into the gaming world with Solana-based staking. Users can stake their $SKOR tokens to earn rewards through a structured tier and duration model — directly integrated into our platform. This creates a self-sustaining ecosystem where gamers grow both in skill and value.
2. Staking Model & Tokenomics
Total Supply: 1,000,000,000 tokens Initial Token Value: $0.015
Staking Reward Pool
Total: 300,000,000 tokens distributed over 60 months
Monthly Cap: Maximum of 5,000,000 tokens distributed per month
Staking Structure
Tiers:
Bronze: 1,000 – 19,999 tokens
Silver: 20,000 – 49,999 tokens
Gold: 100,000+ tokens
Staking Durations:
Options: 60, 90, 180, 365 days
Note: Early withdrawals are not allowed.
Rewards:
Flat rewards paid at the end of the lock period
Annualized APYs, pro-rated for shorter durations
APY Table (Annualized Rates, Pro-Rated for Duration)
Bronze
6.5%
8%
10%
12%
Silver
8.5%
8%
13%
16%
Gold
10%
13%
16%
20%
Example Calculation:
For a Silver-tier user staking 20,000 tokens for 90 days:
Duration: 90 days (¼ year)
APY: 11% annualized → Pro-rated APY = 11% / 4 = 2.75%
Reward: 20,000 × 2.75% = 550 tokens
Maturity Amount: 20,000 + 550 = 20,550 tokens
3. Backend Architecture & Components
A. Blockchain Integration (Solana)
Smart Contracts: Written in Rust using the Solana program library.
On-Chain Storage: State is maintained on Solana, holding staking records and token balances.
Communication: Okto Smart Wallet integration and Paymaster for front-end interactions.
B. Off-Chain Services
Calculation Engine: Handles reward computations and staking simulations.
APIs: Expose endpoints for staking, checking rewards, and user account management.
4. Reward Calculation Logic
Reward calculations are based on the annualized APY, the staking tier, and the chosen lock duration. The reward is prorated for shorter terms.
Calculation Formula:
For a given stake:
Reward = Staked Tokens × (APY ÷ (365 / Duration in Days))
For example, using the Silver-tier for 90 days:
Reward = 20,000 tokens × (11% / 4) = 550 tokens
Code Example (Rust)
Below is a simplified Rust function that performs the calculation. This code would be part of your on-chain program or a simulation module.
Explanation:
Function:
calculate_reward
computes rewards based on the input parameters.Testing: Unit tests (using Rust’s built-in framework) verify that the reward calculations meet expected values.
TDD Note: By writing tests first, then developing logic to pass these tests, you ensure that your calculation engine meets the business rules.
5. Test Driven Development (TDD) Strategy
TDD will be our guiding development methodology. The process is as follows:
Write Tests: For every new feature or bug fix, write a failing test.
Implement Code: Develop the code necessary to pass the test.
Refactor: Clean up the code, ensuring tests continue to pass.
Repeat: Iterate for every new piece of functionality.
Additional TDD Practices:
Integration Tests: Simulate entire staking flows, including token transfers, locking periods, and reward payouts.
Simulation Scripts: Use off-chain simulations to model monthly reward budgets under different staking scenarios.
Example Simulation (Pseudocode in JavaScript)
For further testing outside the on-chain environment, you might want a simulation script written in JavaScript using a framework like Mocha:
Copy
Copy
Running Tests
Rust Tests: Run with
cargo test
to ensure all unit tests in your Solana program pass.JavaScript Tests: Run
npm test
(assuming you set up Mocha/Chai) to validate off-chain simulation logic.
6. Simulations and Monthly Reward Budget
The following are simulations that validate monthly reward distributions:
Simulation Scenarios
10% of Supply Staked (100M tokens)
Breakdown Example:
Bronze: 50M tokens at 9.5% APY → Annual Reward: 4.75M tokens
Silver: 35M tokens at 12% APY → Annual Reward: 4.2M tokens
Gold: 15M tokens at 16% APY → Annual Reward: 2.4M tokens
Monthly Reward: Approximately 0.95M tokens
20% of Supply Staked (200M tokens) ...
30% of Supply Staked (300M tokens)
40% of Supply Staked (400M tokens)
50% of Supply Staked (500M tokens)
Each simulation confirms that the reward distribution is within the monthly cap, ensuring a 2M token buffer under the maximum monthly distribution of 5M tokens.
Last updated