Referral Program

Earn rewards by referring traders to Lavarage.

Referral Program

Lavarage offers a referral program that rewards you for bringing traders to the platform. Earn a share of trading fees from every user you refer.

How It Works

  1. Register — Call POST /referral/register with your wallet to get a referral code
  2. Share — Give your code to other traders
  3. Earn — When referred users trade, you earn a percentage of their fees
  4. Claim — Periodically claim your accumulated rewards

Getting Started

Register your wallet:

curl -X POST https://api.lavarage.xyz/api/v1/referral/register \
  -H "Content-Type: application/json" \
  -H "x-wallet-address: YOUR_WALLET" \
  -H "x-wallet-signature: SIGNATURE" \
  -H "x-wallet-message: lavarage:YOUR_WALLET:TIMESTAMP" \
  -d '{ "walletAddress": "YOUR_WALLET" }'

Customize your code:

curl -X POST https://api.lavarage.xyz/api/v1/referral/customize \
  -H "Content-Type: application/json" \
  -H "x-wallet-address: YOUR_WALLET" \
  -H "x-wallet-signature: SIGNATURE" \
  -H "x-wallet-message: lavarage:YOUR_WALLET:TIMESTAMP" \
  -d '{ "walletAddress": "YOUR_WALLET", "referralCode": "MYCODE" }'

Referral Tiers

Rewards scale with the number of active referrals. Call GET /referral/tiers to see current tier requirements and reward rates.

Checking Stats

curl https://api.lavarage.xyz/api/v1/referral/stats/YOUR_WALLET

Claiming Rewards

curl -X POST https://api.lavarage.xyz/api/v1/referral/claim \
  -H "Content-Type: application/json" \
  -H "x-wallet-address: YOUR_WALLET" \
  -H "x-wallet-signature: SIGNATURE" \
  -H "x-wallet-message: lavarage:YOUR_WALLET:TIMESTAMP" \
  -d '{
    "walletAddress": "YOUR_WALLET",
    "amount": "1000000",
    "tokenAddress": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
  }'

Wallet Signature Authentication

Referral write operations (register, bind, claim, customize) require wallet signature authentication. Send these headers:

HeaderValue
x-wallet-addressYour Solana wallet address
x-wallet-signatureEd25519 signature (bs58)
x-wallet-messagelavarage:<wallet>:<timestamp_ms>

The message timestamp must be within 5 minutes of server time.