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

# Liquidity accounting

The facility's asset balance includes both reserved amounts and free cash. Its reserve floor covers claimable balances, pending deposits, unclaimed recovery-pot funds and withheld principal. The facility refuses actions that would leave its balance below that floor.

Cash above the floor is free cash. It funds owed value on an Epochs facility and withdrawal executions on a Continuous facility. The reserve floor excludes unfunded owed value, which is funded from free cash. Each role named here is held by the entity named for that role in the facility's agreement.

A withdrawal is funded only when the facility holds cash to fund it, normally from borrower repayment.

## Reserve floor

$$
R = C + P + D + W, \qquad B \ge R
$$

Where:

* $$R$$ is the reserve floor, in asset units to 6 decimals.
* $$B$$ is the facility asset balance, the facility's own balance of the admitted asset, in asset units to 6 decimals.
* $$C$$ is claimable value: funded withdrawals, refunds and credits not yet claimed, all lenders, in asset units to 6 decimals.
* $$P$$ is pending deposits waiting for settlement, all lenders, in asset units to 6 decimals.
* $$D$$ is recovery-pot funds received and not yet claimed, in asset units to 6 decimals.
* $$W$$ is withheld principal, newly funded principal reserved in the facility and not yet delivered, in asset units to 6 decimals.

The reserve floor is exact, with no rounding, because it sums asset amounts to 6 decimals. Every term is at least 0; recovery-pot funds are 0 before a default, and withheld principal is 0 in Winding down, Claims only and In recovery. The balance must cover the floor after every change to cash or a reserved amount. The facility refuses actions that would break this relation.

Illustrative example: a facility asset balance of 1,250,000.000000, claimable value of 40,000.000000, pending deposits of 100,000.000000, no recovery-pot funds and withheld principal of 60,000.000000 give a reserve floor of 200,000.000000. The balance covers the floor, and free cash is 1,050,000.000000.

Withheld principal counts once in the reserve floor. It is excluded from deposit exposure because the shares issued for it already count there; see [Deposits and principal delivery](/platform/deposits-and-withheld-principal.md).

### Priority bound

$$
Q \le O
$$

Where:

$$Q$$ is the priority withdrawal value outstanding during a protected withdrawal window, in asset units to 6 decimals. $$O$$ is owed value, the withdrawal value fixed at settlement and not yet funded, all lenders, in asset units to 6 decimals.

The comparison is exact, with no rounding, because both terms are asset amounts to 6 decimals. Both are at least 0, and priority withdrawal value is 0 outside a protected withdrawal window.

Funding priority withdrawals reduces their outstanding value. The protected withdrawal window closes when that value reaches 0, not when the funding window ends. A default clears the priority and leaves owed value unchanged.

Illustrative example: owed value of 300,000.000000, of which 120,000.000000 was fixed by a settlement that opened a protected withdrawal window, satisfies the bound. The window stays open until the 120,000.000000 is funded in full.

### Worked balance sheet

Every amount below is in asset units to 6 decimals for the illustrative facility above.

| Item                                  | Symbol    | Amount           | Treatment                                                                  |
| ------------------------------------- | --------- | ---------------- | -------------------------------------------------------------------------- |
| Facility asset balance                | $$B$$     | 1,250,000.000000 | Total cash held by the facility                                            |
| Claimable value                       | $$C$$     | 40,000.000000    | Reserved                                                                   |
| Pending deposits                      | $$P$$     | 100,000.000000   | Reserved                                                                   |
| Recovery-pot funds not yet claimed    | $$D$$     | 0.000000         | Reserved                                                                   |
| Withheld principal                    | $$W$$     | 60,000.000000    | Reserved                                                                   |
| Reserve floor                         | $$R$$     | 200,000.000000   | Sum of the reserved amounts                                                |
| Free cash                             | $$B - R$$ | 1,050,000.000000 | Available to fund withdrawals                                              |
| Owed value not yet funded             | $$O$$     | 300,000.000000   | Not reserved; funded from free cash                                        |
| Priority withdrawal value outstanding | $$Q$$     | 120,000.000000   | Part of owed value; funded first, from withheld principal before free cash |

The Curator can fund all owed value in this example because free cash covers it. Priority withdrawals must be funded in full before the next settlement begins.

## Uses of free cash and withheld principal

The [withdrawal rules](/platform/withdrawals-owed-value-and-claims.md) govern funding from free cash on Epochs facilities and execution on Continuous facilities. An execution uses only cash above the reserve floor. A protected withdrawal window gives priority withdrawals first use of withheld principal, then free cash.

Principal delivery uses withheld principal inside the reserve floor. The facility delivers it only if the balance still covers the floor afterward; otherwise the amount stays withheld.

Delivered principal is outside the facility. The total delivered records history: it is never cash, a reserve or backing for withdrawals, and repayments do not reduce it.

The apps derive available liquidity from free cash, capped at the value of outstanding shares. This reporting measure excludes delivered principal.

## Repayment

Any eligible wallet can repay after activation, including during settlement. The published wallet is the borrower repayment wallet (Borrower ops). Repayment adds the amount the facility accepts to its cash and accounting, affecting only that facility.

In Claims only, the facility takes no more than its remaining funding shortfall and refuses repayment once that shortfall is zero. In recovery, repayment is uncapped and funds the recovery pot; see [Funding the recovery pot](/platform/after-a-default.md#funding-the-recovery-pot).

{% hint style="danger" %}
Sending tokens directly to a facility's address does not record a repayment.
{% endhint %}
