---
updatedAt: 2026-03-18T03:57:29.000Z
agentTools:
  projectIndex: https://lavarage-api.readme.io/llms.txt
---

# 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:**

```bash
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:**

```bash
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

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

### Claiming Rewards

```bash
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:

| Header               | Value                              |
| -------------------- | ---------------------------------- |
| `x-wallet-address`   | Your Solana wallet address         |
| `x-wallet-signature` | Ed25519 signature (bs58)           |
| `x-wallet-message`   | `lavarage:<wallet>:<timestamp_ms>` |

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