Orbitlending

Orbitlending liquidations

Updated ·

In Orbit Protocol's published lending-contract code for Blast, a liquidator repays debt and seizes the borrower's collateral OTokens, which represent shares in a lending pool. Ordinary liquidation requires a positive account shortfall. A separate deprecated-market branch can allow liquidation without a shortfall, subject to its own repayment limit.

Navigate this article

These rules describe the published SpaceStation.sol and OToken.sol implementations. Current deployment settings and transaction availability remain unconfirmed.

Shortfall and Collateral Value

SpaceStation calculates the account's position across the markets that it has entered. Each collateral holding contributes its OToken balance multiplied by its exchange rate into the underlying asset, oracle price and market collateral factor. The controller compares that adjusted collateral value with the total oracle-valued debt.

A positive shortfall means that debt exceeds adjusted collateral. At exact equality, both liquidity and shortfall are zero, so a zero liquidity reading alone does not establish liquidation eligibility. The getAccountLiquidity result also includes an error code; a price or snapshot error prevents the ordinary eligibility check from approving liquidation.

The controller uses stored market snapshots. Borrow interest, oracle-price changes and collateral-factor changes can alter the balance between debt and adjusted collateral.

Liquidation Parameters

Fields and conditions in the published SpaceStation.sol implementation
Field Value or Rule Applicable Scope Consequence
shortfall Greater than zero Liquidation of debt in a non-deprecated market Required for the ordinary eligibility branch.
closeFactorMantissa Configured fraction of the borrower's stored borrow balance Debt in the selected borrowed market, for an ordinary liquidation Caps the requested repayment in that liquidation.
collateralFactorMantissa Zero for the deprecation test The borrowed market One of three conditions that must hold together for deprecation.
borrowGuardianPaused true for the deprecation test The same borrowed market Borrowing must be paused as part of the three-condition test.
reserveFactorMantissa 1e18 , representing 100%, for the deprecation test The same borrowed market Completes the test when the other two conditions also hold.
liquidationIncentiveMantissa Configurable multiplier The calculation of collateral OTokens to seize Scales the repayment value before conversion into collateral OTokens.

The Deprecated Market Exception

SpaceStation's liquidation eligibility checks test deprecation on the market in which the debt is owed. All three deprecation conditions in the table must hold together for that market. A borrowing pause alone is insufficient.

The deprecated-market branch skips the account-shortfall requirement and ordinary close-factor cap. It still rejects a requested repayment greater than the borrower's stored debt in that market. Both the borrowed market and selected collateral market must remain listed, and the other execution checks still apply. The code does not establish that any particular deployed market currently meets the deprecation conditions.

Visual outline: Orbitlending liquidations: The Deprecated Market Exception

Open full-size image

Collateral Seizure and Its Recipients

SpaceStation calculates the total collateral OTokens to seize from the underlying debt amount actually repaid. It multiplies that amount by the liquidation incentive and borrowed-asset oracle price, then divides by the collateral-asset oracle price and collateral OToken exchange rate. Either oracle price being zero causes the calculation to fail. Exact base-unit amounts follow the contract's fixed-point arithmetic and integer rounding.

OToken's collateral seizure logic deducts the total seized OTokens from the borrower. The protocol portion is burned and its underlying value is added to reserves; the liquidator receives the remaining OTokens. When the protocol share is nonzero, the liquidator's receipt is smaller than the borrower's total OToken loss.

Execution and the Liquidation Event

The OToken liquidation path first accrues interest in the borrowed and selected collateral markets. Execution requires both markets to be listed, a shared controller and unpaused collateral seizure. The code also rejects self-liquidation, a zero repayment and a seizure greater than the borrower's collateral OToken balance.

After repayment and seizure succeed, OToken emits LiquidateBorrow with the liquidator, borrower, actual repayment amount, collateral market and total seized OTokens. The event's seized count includes the protocol portion. Remaining debt and collateral still determine whether the account has a shortfall after liquidation.

Borrower Repayment

An ordinary repayment reduces debt without invoking collateral seizure. In the non-deprecated branch, reducing debt can remove shortfall when the remaining oracle-valued debt no longer exceeds adjusted collateral. The deprecated-market branch can still permit liquidation of remaining debt without a shortfall when its three market conditions hold.