> 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/getting-started/how-a-facility-works.md).

# How a facility works

A facility is one credit line between lenders and one borrower, with its own shares, cash and accounting. Its shares carry no claim on another facility.

The facility enforces share accounting and controls onchain. Its Master Lending Agreement sets the borrower's repayment obligation, while repayment depends on the borrower's credit. Yield can increase a position's recorded value without adding cash to the facility.

The figures shown in the apps and described here are informational. The Master Lending Agreement governs amounts, dates, defaults and remedies.

## Flow of value

![Flow of deposits, shares, principal, repayments and claims between a lender, one facility, borrower wallets and compliance escrow](https://1212871591-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAPyk7jtRhMNFPRuPw5d3%2Fuploads%2Fgit-blob-0ca822e42f158ecdbce7614cc6ce88d2d41f0c7b%2Fflow-of-value.svg?alt=media)

*Figure: Movement of assets and shares between a lender, one facility, borrower wallets and the compliance escrow. Yield moves no assets; it is credited to the share price.*

The facility holds deposits until it delivers principal to the borrower receiving wallet (Borrower funds). Delivered principal is then outside the facility. If a Continuous facility has a liquidity sleeve split, the configured part of each delivery goes to a receiver that holds no facility role.

Repayment comes from the published borrower repayment wallet (Borrower ops) or any other eligible wallet. Claims are paid from facility cash, subject to the beneficiary's eligibility.

## Deposits and shares

A Continuous deposit becomes active immediately. The facility issues shares at the current share price, and those shares earn from that moment. On an Epochs facility, the deposit remains pending until settlement converts it into shares at the price pinned for continuing holders. The lender can cancel it for a refund before settlement begins. In Winding down, the facility accepts no new deposits and pending deposits remain refundable.

### Principal delivery

The facility first reserves every active deposit in full as withheld principal. It attempts delivery as part of a Continuous deposit or after settlement completes on an Epochs facility.

The borrower receives principal through facility delivery. Undelivered principal remains reserved under the [deposit and reserve rules](/platform/deposits-and-withheld-principal.md).

{% hint style="danger" %}
A plain token transfer to a facility's address is not a deposit or a repayment. It issues no shares and is not credited to any position.
{% endhint %}

## Share price and yield

One share price values every share in the facility. A position is worth the shares held times that price, rounded down to the asset's smallest unit. The price starts at 1, when one share is worth exactly 1.000000 of the asset. The [share-value formulas](/platform/shares-and-the-share-price.md) give the conversion rules.

On a fixed-rate facility, the share price grows with time at the facility's fixed rate. A variable-rate Epochs facility applies the declared yield once per epoch, at settlement.

## Settlement on an Epochs facility

Epochs run consecutively for a set length. The Curator can start settlement after the [settlement clock](/platform/epochs-and-settlement.md#settlement-timing) reaches that length and any reaction buffer required for protected withdrawals, subject to the facility's current operating status. The facility remains Settling until processing completes.

Settlement activates pending deposits and fixes queued withdrawals as owed value at the pinned withdrawal price. That value never changes afterward, regardless of when it is funded. When settlement completes, the next epoch opens and the facility records a payment-due time: completion time plus the settlement window. This disclosure milestone triggers no default, funding or change of state. A Continuous facility has no epochs or settlement.

## Withdrawals, funding and claims

A lender requests a withdrawal of some or all of its shares, which leave its wallet and are held by the facility until pricing. At an Epochs settlement, the facility cancels the shares and fixes the request as owed value. Funding can then make that value claimable in steps.

On a Continuous facility, the Curator or Redemption operator executes the request in full or in part at the current share price, using facility cash or cash supplied for execution. The facility cancels the executed shares and credits their value to claimable.

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

The lender can claim any positive amount up to its claimable balance. The lender may name another eligible receiving wallet, while a delegate may pay only the lender. If the lender's address is restricted, the facility credits the claimed value to the compliance escrow under that address. [Withdrawals and claims](/platform/withdrawals-owed-value-and-claims.md) explains requests, pricing and payouts separately.

## Components

| Component                 | Responsibility                                                                                                                                                  |
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Facility                  | Holds its asset balance, issues and cancels shares, and accounts for deposits, withdrawals, delivered principal, repayment and, after default, the recovery pot |
| Facility directory        | Keeps an append-only history of registered facilities, connects them to shared components; retirement changes neither facility state nor obligations            |
| Approved-address registry | Records approved wallets; each facility applies its own participation check                                                                                     |
| Compliance escrow         | Holds restricted payouts under their beneficiaries                                                                                                              |

The platform also includes the share marketplace. Optional components bound to a facility are listed with the [component addresses](/reference/deployed-contracts-and-addresses.md). Every listed component has a stable address.

### Share accounting and the borrower's obligation

The facility reserves cash for pending deposits, claimable balances, withheld principal and unclaimed recovery-pot funds. No payment or principal delivery leaves cash below those reserves. Unfunded owed value is outside the reserve floor; see [liquidity accounting](/platform/liquidity-accounting.md).

The entities named in the agreement decide borrower diligence and the grounds for default offchain.

### Onchain transactions

Deposits, withdrawal requests and claims are transactions from the participating wallet or its delegate; a repayment is sent by the payer. A transaction changes the facility only once the network includes it in a block. If the facility refuses it, nothing in the facility changes, although the sending wallet still pays the network fee in the network's own currency. This is separate from a platform fee.

Eligibility, verification and the agreement precede participation, which is set per facility and shown on its facility page. [Lending](/getting-started/onboarding.md) and [Borrowing](/getting-started/onboarding-1.md) list the prerequisites.
