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

# liquidity

The LP pays trading profits using the cash it actually has. It starts at zero and grows primarily through realized cash losses after fees and referral allocations. A trader's deposit or locked margin is not free LP capital.

## Cash and claims

A cash-backed position uses native USDC. A debt-backed position uses part of an existing unpaid claim. Claims can have the same USDC denomination without being USDC coins.

For a winning cash position, original margin is returned and net profit is paid or queued. For a debt position, the surviving margin and any net profit remain obligations that must be paid from LP cash or queued. A debt loss reduces those obligations without adding cash.

## First in, first out

New claims join the tail. Available LP cash pays the oldest outstanding claim first. The head can be partially paid; later claims cannot skip it. A bounded harvest operation advances the queue without requiring an unbounded traversal in one transaction.

Using a claim as margin consumes that part of the claim immediately. If a later settlement produces another unpaid amount, it enters as a new claim rather than keeping the consumed amount's old priority. Payment, collateralization, and settlement must all update outstanding liabilities exactly once.

## How much of a loss reaches the queue?

Under the new GetRekt cash-loss specification, a referred 100 USDC loss creates 68.6 USDC of LP cash after the 2% fee and referral split. With no valid referrer, it creates 98 USDC. Only this LP allocation is available for FIFO payments.

The old code instead waives the cash-loss fee while claims exist and has no referrals. The new allocation is not yet implemented. [Implementation status](broken://pages/c7eabe8af8c3f2ae7c1c1dce69dad717e5d1ac7a).

## When can I withdraw?

Cash returned to your wallet is transferable. An unpaid claim becomes withdrawable only when funded and paid. Harvest cannot create liquidity, and there is no promised repayment deadline.

The interface must show cash, locked margin, and queued claims separately, with queue position, remaining amount, and available LP cash. Trading volume, token supply, and economic LP value are not substitutes for a cash balance. [Solvency](broken://pages/48d2882b994a8ae55e1c97c563cd556494fed811).


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.getrekt.trade/liquidity.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
