Staking

Stake AUR tokens to earn a proportional share of protocol SOL revenue. Fully on-chain with a 200-round cooldown to prevent reward sniping.

Staking AUR

Stake your AUR tokens to earn passive SOL income from every match played in the arena. The more AUR you stake relative to other stakers, the larger your share of protocol revenue.

Overview

mermaid
graph LR
  M["Matches Played"] -->|"10% protocol cut"| P["Protocol Revenue"]
  P -->|"30%"| SR["Staker Reward Pool"]
  SR --> S1["Staker A<br/>40% of pool"]
  SR --> S2["Staker B<br/>35% of pool"]
  SR --> S3["Staker C<br/>25% of pool"]

Every scored match contributes 30% of the protocol's 10% cut to the staker reward pool. Your share is proportional to how much AUR you've staked relative to the total staked supply.

How It Works

1. Stake AUR

Transfer AUR tokens from your wallet to the protocol vault. Your stake PDA is created automatically on first stake.

text
You stake 10,000 AUR
Total staked across all stakers: 100,000 AUR
Your share: 10,000 / 100,000 = 10%

2. Rewards Accumulate Automatically

Every time a match is scored, the protocol updates a global cumulative reward factor. You don't need to claim every round — rewards pile up until you're ready.

3. Claim or Unstake (after cooldown)

After staking, there is a 200-round cooldown (~40 minutes) before you can unstake or claim rewards. This prevents reward sniping — a technique where whales briefly stake large amounts to capture disproportionate rewards.

  • Claim — Withdraw your accumulated SOL rewards while keeping your AUR staked
  • Unstake — Withdraw some or all of your AUR + automatically claim pending SOL rewards

⏱️ The cooldown resets every time you add more AUR to your stake.

Using the CLI

The easiest way to stake is with the Aureus CLI:

bash
# Install the SDK (includes CLI)
npm install -g @aureus-arena/sdk

# Check your current position
aureus status

# Stake 100 AUR
aureus stake 100

# Claim accumulated SOL rewards
aureus claim-rewards

# Unstake 50 AUR
aureus unstake 50

See the CLI Reference for all commands and configuration options.

Proportional Reward Math

The protocol uses a cumulative factor approach (similar to Synthetix StakingRewards or SushiSwap MasterChef) for gas-efficient, proportional distribution.

Global State (Arena PDA)

FieldDescription
reward_per_token_cumulativeRunning total of SOL distributed per staked AUR (scaled by 1e12)
total_aur_stakedTotal AUR staked across all stakers
staker_reward_poolSOL available for staker distribution

Per-Staker State (Stake PDA)

FieldDescription
aur_stakedAmount of AUR this staker has staked
reward_debtSnapshot of reward_per_token_cumulative at last stake/claim
pending_rewardsUnclaimed SOL accumulated before most recent stake change

When a match is scored:

mermaid
graph TD
  MATCH["Match Scored<br/>0.002 SOL protocol cut"] -->|"30% = 0.0006 SOL"| POOL["staker_reward_pool += 600"]
  POOL --> FACTOR["reward_per_token_cumulative<br/>+= (600 × 1e12) / total_aur_staked"]

When you claim:

text
pending_rewards = aur_staked × (cumulative_now − reward_debt) / 1e12
mermaid
graph LR
  CALC["Your Pending SOL"] --> PAY["Transfer SOL<br/>vault → your wallet"]
  PAY --> RESET["reward_debt = cumulative_now<br/>pending_rewards = 0"]

Example Walkthrough

Suppose there are two stakers:

EventAlice (Staked)Bob (Staked)Total StakedCumulative Factor
Alice stakes 60 AUR600600
10 matches scored (6,000 lamports to pool)60060100×10¹²
Bob stakes 40 AUR6040100100×10¹²
10 more matches scored (6,000 lamports)6040100160×10¹²

Alice claims:

text
pending = 60 × (160×10¹² − 0) / 10¹² = 9,600 lamports

Bob claims:

text
pending = 40 × (160×10¹² − 100×10¹²) / 10¹² = 2,400 lamports

Total distributed: 12,000 lamports = exactly what went into the pool ✅

Alice earned more because she was staked for longer and had a larger share.

Revenue Sources

Staker rewards come from two sources:

1. Match Protocol Fees (30% of 10%)

Every match contributes 0.0006 SOL per match (at 0.01 SOL entry fee):

text
Per match: 0.02 SOL pot × 10% protocol × 30% staker = 0.0006 SOL

2. LP Swap Fees (via ClaimPoolFees)

When the AUR/SOL liquidity pool generates trading fees, anyone can call ClaimPoolFees to collect them:

  • wSOL fees → Added to staker_reward_pool, increasing the cumulative factor
  • AUR fees → Added to T1 token_jackpot via swap_fee_aur_jackpot, feeding the T1 jackpot pool
mermaid
graph LR
  TRADES["DEX Swaps<br/>AUR ↔ SOL"] -->|"trading fees"| POOL["Meteora DLMM<br/>Position"]
  POOL -->|"ClaimPoolFees"| SPLIT{"Token type?"}
  SPLIT -->|"wSOL"| CHECK{"Stakers exist?"}
  CHECK -->|"Yes"| STAKERS["staker_reward_pool<br/>(cumulative factor ↑)"]
  CHECK -->|"No"| JP["T1 SOL Jackpot"]
  SPLIT -->|"AUR"| JACKPOT["T1 token_jackpot<br/>(transfer-based)"]

Instructions

Stake (IX 6)

AccountTypeDescription
Stakersigner, writableYour wallet
Stake PDAwritable["stake", wallet]
Arena PDAwritableGlobal state
Staker AUR ATAwritableYour AUR token account
Vault AUR ATAwritableProtocol's AUR token account
Token ProgramSPL Token
System ProgramFor PDA creation

Data: [6, amount_u64_le]

Unstake (IX 7)

Same accounts as Stake, plus:

AccountTypeDescription
SOL VaultwritableFor SOL reward payout

Data: [7, amount_u64_le]

Claim Rewards (IX 8)

AccountTypeDescription
Stakersigner, writableYour wallet
Stake PDAwritable["stake", wallet]
Arena PDARead cumulative factor
SOL VaultwritableSource of SOL rewards

Data: [8]

Anti-Sniping Cooldown

To protect long-term stakers from dilution, the protocol enforces a 200-round cooldown (~6,000 slots ≈ 40 minutes) after any stake action.

The attack it prevents:

  1. Whale watches the mempool, sees a large round about to be scored
  2. Stakes 900K AUR right before scoring → captures ~90% of that round's staker rewards
  3. Unstakes immediately → long-term stakers got diluted to ~10%

How the cooldown stops it:

  • Cannot unstake or claim rewards until cooldown expires
  • Cooldown resets every time you add more stake (prevents pre-warming with 1 AUR)
  • 40 minutes is long enough that future round activity is unpredictable
  • Short enough that legitimate stakers barely notice
ConstantValueDuration
STAKE_COOLDOWN_SLOTS6,000~40 minutes

Zero-Staker Fallback

If there are no active stakers when SOL rewards are generated (from match protocol fees or LP pool fees), the SOL is redirected to the T1 SOL jackpot rather than sitting idle in the vault. This ensures all protocol revenue is always productive — either rewarding stakers or boosting jackpots for active players.

Once stakers enter the pool, all future SOL rewards flow normally to the staker reward pool.

Key Properties

  • 200-round cooldown — Prevents reward-sniping whale attacks
  • Low minimum stake — 0.1 AUR minimum (prevents dust-harvesting rounding exploits)
  • Proportional — Your reward share = your_staked / total_staked
  • Lazy distribution — No gas cost per staker per match; rewards accumulate until claimed
  • Composable — Staking and claiming are separate instructions, can be automated by bots
  • Two revenue streams — Match fees + LP swap fees both flow to stakers
  • No idle funds — SOL redirects to T1 jackpot when no stakers exist