> For the complete documentation index, see [llms.txt](https://docs.flash.trade/flash-trade/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flash.trade/flash-trade/flash-trade-protocol/perpetuals-specifications/max-profit.md).

# Max Profit

This is the **max profit cap**, and it's separate from your leverage, your liquidation price, or your collateral.

### How it works

When you open a position, the pool locks an amount of tokens to cover both your collateral and the maximum profit it's willing to pay on the trade:

```
locked_usd = (size_usd × max_payoff_bps / 10000) + collateral_usd
```

* **First term:** the maximum the pool will pay out as profit
* **Second term:** ensures your own collateral is always fully covered

At settlement, your total payout is capped at `locked_usd`:

```
payout = min(profit + collateral, locked_usd)
```

So your maximum profit is:

```
max_profit = size_usd × max_payoff_bps / 10000
```

### Max Profit Price

Beyond a certain price, your position stops earning more profit even if the market keeps moving in your favor. That threshold is the **max profit price**.

| Direction | Formula                                    |
| --------- | ------------------------------------------ |
| Long      | `entry_price + (max_profit / size_amount)` |
| Short     | `entry_price - (max_profit / size_amount)` |

For shorts with a 100% max payoff, the max profit price effectively reaches $0 — the asset would need to go to zero for the cap to bind.

### Why this matters

The max payoff cap is most relevant for **virtual tokens** — synthetic markets like forex, commodities, and tokenized equities — where the pool is backed by USDC rather than the native asset.

For these markets, the cap protects the pool from outsized payouts on positions where the underlying could theoretically move several multiples of its starting price (e.g. a small-cap equity doubling intraday).

For crypto-backed pools, where the pool holds the native asset, the cap rarely binds in practice unless price doubles or more.

{% hint style="info" %}

#### **Current max payoff settings:**

Live max profit prices for any open position are shown directly on the position panel in the trade UI. Refer to the live interface for the current `max_payoff_bps` applied to each market.
{% endhint %}


---

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

```
GET https://docs.flash.trade/flash-trade/flash-trade-protocol/perpetuals-specifications/max-profit.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.
