> For the complete documentation index, see [llms.txt](https://paragon-protocol.gitbook.io/paragon-protocol/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://paragon-protocol.gitbook.io/paragon-protocol/core-products/surplus-and-rebates.md).

# Surplus & Rebates

### What Is Surplus?

When you swap, you define a minimum acceptable output:

* **minOut** → your guaranteed result
* **amountOut** → actual execution result

If execution performs better:

**Surplus = amountOut − minOut**

***

#### Important

* Surplus is never negative
* If execution cannot meet your minimum → the trade reverts (or falls back)
* Your minimum output is always enforced

***

### How Surplus Is Distributed

Surplus is split programmatically:

* **60% → Trader**
* **30% → Liquidity Providers (LPs) used in the route**
* **10% → stXPGN / veFlow lockers**

***

### Why This Matters

In traditional DEX execution:

* pricing improvements are not always returned to the user
* value can be lost to MEV or inefficient routing

With Paragon:

* execution is optimized through solver competition
* improvements beyond your minimum are shared transparently
* incentives are aligned across traders, LPs, and governance

***

### Example

You swap:

**1,000 USDT → BNB**\
**minOut = 3.0000 BNB**

Actual execution:

**amountOut = 3.0120 BNB**

***

**Surplus = 0.0120 BNB**

Distribution:

* Trader → 0.0072 BNB
* LPs → 0.0036 BNB
* Lockers → 0.0012 BNB

***

👉 In the UI this appears as:

**“You saved 0.40%”**

***

### Where Rewards Go

#### 🧑 Trader

* receives immediate rebate
* paid in the output token
* can:
  * remain in wallet
  * be used directly
  * be routed into staking (optional)

***

#### 💧 Liquidity Providers (LPs)

* only LPs used in the execution route receive rewards
* rewards are proportional to:
  * liquidity contribution
  * actual usage during execution

👉 Only active, useful liquidity earns surplus.

***

#### 🔒 Lockers (stXPGN / veFlow)

* receive a protocol-aligned share
* participate in long-term incentive distribution
* benefit from overall system activity

***

### How LP Rewards Work

For each trade:

* specific pools are used in routing
* those pools receive a portion of surplus
* LPs earn based on their share of liquidity at execution time

***

### Claiming Rewards

**Trader Rebates**

* instant
* no claim required

***

**LP Flow Earnings**

* tracked per pool
* claimable at any time

***

**Locker Rewards**

* accumulate over time
* claimable via staking systems

***

### Transparency (PoBE)

Each trade records:

* expected output (minOut)
* actual execution output
* surplus generated
* distribution breakdown

Displayed as:

👉 **Proof-of-Best-Execution (PoBE)**

All data is:

* on-chain
* verifiable
* auditable

***

### Edge Cases

* no surplus → no additional rewards
* market movement → trade may revert
* very small surplus → minimal distribution

***

### Security & Protections

* minimum output always enforced
* solver execution validated
* routing checked before settlement
* invalid or unsafe routes rejected

***

### Parameters (Testnet)

* surplus split: **60 / 30 / 10**
* protocol fee: **0% (initial phase)**
* route complexity: controlled

***

### Positioning

Surplus & Rebates transform execution efficiency into shared value.

Rather than extracting value from users, Paragon redistributes execution improvements across participants.

***

### Summary

Surplus & Rebates introduce a new execution model:

* traders receive execution improvements
* LPs earn based on real usage
* lockers benefit from protocol activity

This aligns incentives across the entire system and connects execution quality directly to user outcomes.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://paragon-protocol.gitbook.io/paragon-protocol/core-products/surplus-and-rebates.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
