> For the complete documentation index, see [llms.txt](https://docs.usefarlight.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.usefarlight.com/protocol/health-and-liquidation.md).

# Health factor and the collateral auction

How the health factor is measured, how CollateralAuction sells collateral by Dutch auction, and how closed equity markets and sequencer outages change the rules.

Farlight recovers value from a failing loan in one way only: a Dutch auction run by the `CollateralAuction` contract. Anyone can open it, and its parameters are set for an underlying equity market that is shut for most of the hours in a week.

## The health factor

```
HF = collateralValue × liquidationLtvBps / 10_000 / debt
```

* `collateralValue` is the escrowed amount multiplied by the `PriceGate` price, after the session-aware haircut covered below.
* `liquidationLtvBps` is the tier's liquidation LTV. It is a separate figure from the maximum LTV permitted at origination.
* `debt` is principal plus accrued interest, summed over all slices.

Two thresholds matter:

| Line            | HF     | Consequence                                                                                       |
| --------------- | ------ | ------------------------------------------------------------------------------------------------- |
| **Warning**     | < 1.10 | Keepers and the front-end notify the borrower, who is encouraged to add collateral or repay part. |
| **Liquidation** | < 1.00 | Any address can call `startAuction(loanId)`.                                                      |

A loan in the **Defaulted** state, whether because its grace window lapsed or its rollover auction failed, can be auctioned at any HF.

## How the auction runs

`CollateralAuction` offers the escrowed collateral for USDG on these terms:

| Parameter     | Setting                                                                                                                                                           |
| ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Opening price | 1.03 × oracle                                                                                                                                                     |
| Floor         | 0.70 × oracle during a regular session; 0.85 × oracle while the market is closed                                                                                  |
| Length        | roughly 45 minutes, price falling linearly                                                                                                                        |
| Who can buy   | anyone, in part or in whole                                                                                                                                       |
| Price inputs  | Chainlink Data Feeds drive the curve; where a stream adapter is configured for the token, a Data Streams report must be supplied and is cross-checked at purchase |

Buyers may be DEX arbitrageurs, liquidity providers on Morpho and Uniswap, Robinhood's own authorised participants, or the lenders in the loan itself. The auction quotes a price instead of pushing tokens into a pool, so shallow DEX depth in a single-name token does not turn into a poor fill.

### Why not a DEX swap

Most pooled lending protocols liquidate by routing collateral through an AMM. For long-tail Stock Tokens those pools are thin, and a forced sale would move the price by much more than the penalty itself. An auction instead invites anyone with a view on fair value to bid, including the lender who wanted the stock in the first place.

## Penalty and the order of payment

The liquidation penalty is **3%** of the debt:

* 1 point goes to the keeper or liquidator who started the auction,
* 2 points are split between the protocol and the loan's lenders under the fee schedule.

Proceeds are distributed in sequence: the keeper's point first, then each slice's principal plus accrued interest pro rata, then the penalty share, and lastly any remainder to the borrower. If proceeds fall short, the slices take the loss pro rata (junior slices first, once tranching is live). No other loan is affected.

## Settlement in collateral

A lender whose offer set `selfLiquidate` is paid in collateral at the oracle price instead of USDG, up to the value of their claim and capped at their pro-rata share of the escrow, so no other slice is left worse off. No interest share is charged on in-kind settlement. The path suits lenders who want the stock itself, and it removes their slice from the auction entirely.

## Closed-market rules

Equities do not trade overnight or at weekends, and Monday's open can sit a long way from Friday's close. Farlight handles this explicitly:

* **Haircuts.** If Chainlink `marketStatus` reports closed, or the feed's `updatedAt` is older than the session's staleness bound, the tier's closed-market haircut (10 to 15 points) is subtracted from both the effective max LTV and the liquidation LTV. HF is computed with the haircut applied.
* **Bounded floor.** Auctions may still run in a closed session, but the floor is fixed at **0.85 × oracle**, so a weekend auction cannot become predatory.
* **Lender opt-out.** A lender who set `noClosedMarketLiquidation` has declined liquidation of their slice outside trading hours. If an auction starts in a closed session, those slices and their pro-rata share of the collateral are split out into a new active loan under the same borrower, and only the remaining slices are auctioned. If every slice opted out, the auction has to wait for the market to reopen.

## After the sequencer returns

The protocol reads the Chainlink L2 Sequencer Uptime Feed and refuses to open any new auction for **1 hour** after the sequencer recovers from an outage. That hour lets borrowers top up collateral by the normal route, or through transactions they queued in the L1 delayed inbox while the sequencer was down. See [Sequencer and chain risk](/risk/sequencer-and-chain.md).

## PriceGate comes first

Before any HF is computed or any auction price is set, `PriceGate` rejects:

* a zero or negative price,
* a price whose `updatedAt` is older than the session's staleness bound,
* a single-update move greater than the 25% cap, which pauses the market until it has been reviewed manually,
* any token whose feed reports `oraclePaused()`, meaning a corporate action is in progress.

See [Oracles and market sessions](/risk/oracles.md).

## Worked example

A Tier A loan (liquidation LTV 70%) holds 250 NVDA in escrow against 20,000 USDG of debt.

* At 176.40, the collateral is worth 44,100 and HF is 1.54.
* At 125.00, the collateral is worth 31,250 and HF is 1.09. The warning triggers.
* At 114.00, the collateral is worth 28,500 and HF is 0.9975. The loan is auctionable.

A keeper starts the auction at 117.42 (1.03 × oracle), and the price descends linearly. At 113.00 an arbitrageur buys all 250 tokens for 28,250 USDG. Debt plus the 3% penalty comes to 20,600. Distribution: 200 to the keeper, 20,000 plus accrued interest to the three slices pro rata, 400 as the penalty share, and roughly 7,650 USDG returned to the borrower.

On a Saturday the same loan is subject to the haircut, which lowers the liquidation LTV to 60%. Keeping HF above 1.0 then requires 33,333 of collateral value, so the loan becomes auctionable at NVDA 133.33, and the auction floor is held at 113.33.


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.usefarlight.com/protocol/health-and-liquidation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
