> 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/solvency.md).

# solvency

GetRekt must account for cash and promises separately. A queue records amounts owed; it does not make the pool fully funded.

## Cash conservation

Across the protocol's relevant Sui balances, the new design must reconcile:

```
actual USDC held
  = locked cash margin
  + available LP cash
  + backed referral reserve
  + backed development-fee reserve
  + backed staking-fee reserve
```

If an implementation retains user cash balances instead of sending coins back to wallets, those balances must be included as another protected liability. The current Move path returns coins directly; the browser simulator uses its own available-cash ledger.

Queued claims and debt margin are obligations, not additional USDC on the left-hand side. LP cash reserved for the FIFO head is a subset of LP cash, not a second asset. Likewise, a staking reserve and its claimable sub-balances cannot be counted twice.

## Economic equity

For an LP-only view, subtract outstanding queued trader obligations and debt-collateral obligations from the LP cash assigned to them. This value can be negative. Open-position PnL creates additional contingent exposure, so a queue-only subtraction is not a complete mark-to-market solvency measure.

A cash loss adds only its final LP allocation to cash available for trader claims. A debt loss reduces liabilities. A referral claim transfers already reserved cash; it must not consume locked margin or money counted toward LP payments.

## Priority and liveness

The new cash-loss allocation first reserves fees and eligible referrals. FIFO orders claims against the remaining LP cash. Fee and referral balances must not also appear in the queue's spendable cash.

Keepers can advance bounded harvests and submit liquidations, but must not be able to change claim ownership or reorder payouts. Lack of a keeper, a fresh valid oracle update, or enough gas can delay operations. Lack of LP cash can delay payout indefinitely.

## Required public accounting

Publish the following, with their definitions:

* Actual USDC balances
* Locked margin
* LP cash
* Reserved referrals
* Fee reserves
* Queued liabilities
* Debt margin
* Open exposure
* Queue age
* Payment events

Publish cash losses and debt losses separately, even though both advance the reward counter. A single “TVL” figure cannot explain these obligations.


---

# 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/solvency.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.
