# Cube XP

**Cube XP** is the rewards program for liquidity providers and traders on Cube. Every dollar of LP fees generated by your swaps, and every dollar of active liquidity you provide, earns XP that accumulates on your wallet and is tracked on a public leaderboard.

There will never be a better time to farm XP than the current epoch — rewards halve at the end of every 4-month period.

***

## How XP is earned

| Action                | XP rate                                               | When it's credited                   |
| --------------------- | ----------------------------------------------------- | ------------------------------------ |
| **Swap**              | **10,000 XP per $1 of LP fees** generated by the swap | Instantly, on every swap             |
| **Provide liquidity** | **50 XP per $1 per day**                              | While the LP position remains active |

* **Swap XP** is one-shot and is calculated on the **LP fees that the swap generates for the pool**. The headline rate is **10,000 XP per $1 of LP fees**. There is no claim step.

  > **Example.** On a **$100 swap**, a pool with a **1% swap fee** generates $1 of LP fees, which credits the swapper **10,000 XP**. A pool with a 0.3% swap fee would generate $0.30 of LP fees on the same $100 swap, crediting 3,000 XP. A pool with a 2% swap fee would credit 20,000 XP.

  In other words, swap XP per $1 of volume **scales with the pool's fee tier** — high-fee pools naturally credit more XP per $1 swapped, low-fee pools credit less. This keeps swap XP tightly aligned with the actual value the swap creates for the protocol and its LPs.
* **Liquidity XP** is continuous — XP accrues for as long as your BPT (pool token) balance is non-zero. Withdrawing liquidity stops accrual on the withdrawn portion immediately.

> Under the hood, liquidity XP is credited by a worker every 3 hours (≈ 6.25 XP per $1 per 3h). The UI rounds this to a clean **50 XP / day** headline number — the on-chain economics are identical.

XP appears in two places in the app:

* The **swap confirmation modal** shows the XP you'll earn for that trade.
* The **add liquidity** flow shows the daily XP rate your deposit will start accruing.

***

## Why swap XP is pool-dependent

Swap XP is intentionally **not** a flat number-per-dollar-of-volume. The metric is **LP fees generated**, and that is naturally pool-dependent: different pools run at different swap-fee tiers, and a $1 swap through a high-fee pool produces materially more LP fees (and more value for the protocol) than the same $1 swap through a tight low-fee pool.

By denominating swap XP in **dollars of LP fees**, the rate automatically scales with each pool's fee tier without needing any hand-tuned per-pool multipliers:

| Pool swap fee | LP fees from a $1 swap | XP credited (at 10,000 XP / $1 of LP fees) |
| ------------- | ---------------------- | ------------------------------------------ |
| 0.05%         | $0.0005                | 5 XP                                       |
| 0.30%         | $0.003                 | 30 XP                                      |
| 1.00%         | $0.01                  | 100 XP                                     |
| 2.00%         | $0.02                  | 200 XP                                     |

So when you see a number like **"100 XP per $1 swapped"** referenced elsewhere, that is just the **example case of a 1% fee pool** — not a protocol-wide rate. The single underlying rule is always **10,000 XP per $1 of LP fees generated by the swap**, and the swap UI shows the exact XP you'll earn for the trade in front of you.

> Note: "LP fees" here refers to the swap fee the pool charges. Future versions may exclude any protocol-fee carve-out from the XP base (i.e. credit XP only on the portion that actually accrues to LPs); this will be flagged in the UI before it ships.

***

## Epochs and halvings

Cube XP runs in **epochs**. Each epoch lasts **4 months**, and at the end of every epoch the per-dollar XP rates are **cut in half**.

| Epoch       | Swap rate (per $1 of LP fees) | LP rate (per $1 per day) |
| ----------- | ----------------------------- | ------------------------ |
| 1 (current) | 10,000 XP                     | 50 XP                    |
| 2           | 5,000 XP                      | 25 XP                    |
| 3           | 2,500 XP                      | 12.5 XP                  |
| …           | halved each epoch             | halved each epoch        |

The swap rate column is **XP per $1 of LP fees** — the effective XP per $1 of volume depends on each pool's fee tier (see [Why swap XP is pool-dependent](#why-swap-xp-is-pool-dependent)). The halving schedule applies on top: at the start of each new epoch the rate is halved, regardless of pool.

We are currently in **epoch 1** — the most rewarding epoch the program will ever offer. Every subsequent epoch issues half as much XP per dollar.

A **countdown to the next epoch** is shown in the interface so you always know how long the current rate lasts before the next halving.

XP already earned is **not affected by halvings** — only the rate at which new XP is generated changes.

***

## Leaderboard

A public leaderboard ranks wallets by total XP earned across all epochs.

* LPs and traders compete on the same board — both activities convert into the same XP unit.
* Rankings update as new XP is credited (swaps in real time, LP positions every 3h).
* Early participation in epoch 1 has the largest impact on long-term standing, because later epochs accrue XP more slowly.

The goal is not just a leaderboard for its own sake but a **complete long-term rewards system** for Cube users.

***

## What XP is for

XP is the protocol's single, persistent record of contribution to Cube.

If Cube ever introduces a token in the future, XP **may eventually be convertible** into it. This is not a commitment to a token launch — just a statement that XP is intended to be the basis on which any future allocation to LPs and traders would be calculated.

***

## Tips for farming XP

* **Start early in the epoch.** Day 1 of epoch 1 is the highest XP-per-$ rate the program will ever pay.
* **LP XP compounds with time.** Because LP XP accrues per day, leaving liquidity in for a full epoch is dramatically better than rotating in and out.
* **Trade size matters linearly.** Both swap and LP XP are exactly proportional to dollar size — no thresholds, no per-day bonuses.
* **Pool fee tier matters for swap XP.** Because swap XP is paid on **LP fees generated**, swapping the same dollar amount through a higher-fee pool credits proportionally more XP. See [Why swap XP is pool-dependent](#why-swap-xp-is-pool-dependent).
* **Watch the countdown.** When the epoch timer is close to zero, consider front-loading activity before the halving.

***

## Links

* **XP Documentation** → this page
* **Leaderboard** → <https://cubee.ee/leaderboard>

***

## FAQ

**Do I need to claim XP?** No. XP is credited automatically — instantly for swaps, every 3 hours for active LP positions.

**Do I lose XP if I withdraw liquidity?** No. XP already earned is permanent. Withdrawing only stops further accrual on the withdrawn portion.

**Does XP earned in epoch 1 get halved when epoch 2 starts?** No. Halvings apply to the **rate** at which new XP is earned, not to balances already accrued.

**Is the LP XP really 50 / $ / day, or 6.25 / $ / 3h?** They're the same number. The worker credits ≈ 6.25 XP per $1 every 3 hours; over 24 hours this equals 50 XP per $1. The UI shows the daily number for simplicity.

**Will there be a referral program?** A referral system is planned as a separate launch — including XP for inviting friends and, longer-term, potential revenue-share in USD on referred LP/trader activity. Details will be published in a dedicated announcement.

**Is XP a token?** No. XP is an off-chain accounting unit tracked by the Cube backend. It is not transferable and has no on-chain representation today.

**Why does swap XP per $1 swapped differ between pools?** Because swap XP is paid on **LP fees generated by the swap**, not on raw swap volume. A $1 swap through a 1% pool generates $0.01 of LP fees → 100 XP. A $1 swap through a 0.3% pool generates $0.003 → 30 XP. The single underlying rule is always **10,000 XP per $1 of LP fees**; the per-dollar-of-volume number is just that rule applied to the pool's fee tier. See [Why swap XP is pool-dependent](#why-swap-xp-is-pool-dependent).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cubee.ee/rewards/cube-xp.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
