Skip to content

Liquidations and Sweeps ​

Interest Exchange liquidation removes a borrower's fixed-rate overlay when its prepaid runs out. It is separate from collateral liquidation in Aave, Morpho, or another underlying lending protocol.

Cells ​

A borrower's position in one expiry can hold several fixed-rate legs that share one prepaid balance. For liquidation it sits in a cell:

  • Column — the position's average fixed rate, rounded up to the pool's rate grid.
  • Funding tick — how far its prepaid reaches, in steps of liquidationTickSpacing per unit of notional.

Every position in a cell breaks at the same moment, so a cell is liquidated as one unit however many borrowers it holds.

When a Cell Breaks ​

As time passes, each column's level rises by its rate and falls by the capped floating credit. Higher-rate columns rise faster. A cell is broke once its column's level passes the cell's funding tick. currentTick(poolId, expiry, column) returns a column's live boundary; borrowerPosition returns the position's own tick.

Sweep Process ​

settle(poolId, expiry, budget, recipient):

  1. accrues the expiry to now (or maturity);
  2. uses a 4-ary tree over the rate columns to find broke columns without scanning them all;
  3. sweeps each broke cell: its notional leaves active accounting, the most expensive active backer liquidity goes idle, and the deficit at the column rate is charged to backers, net of the forfeited bonds;
  4. escrows each member's rebate (the gap between the column rate and the member's own lower average rate); and
  5. pays recipient the expiry's sweepBPS share of the swept bonds.

budget caps the work in one call. If broke cells remain, riskPending(poolId, expiry) stays true and later calls continue. VRT deposits and withdrawals sweep a small backlog themselves before pricing shares, and wait for a larger one to be settled.

A liquidated borrower collects what is left, meaning prepaid above the cell's committed coverage plus the rebate net of its share of any deficit, on its next action or through settlePosition. There is no per-borrower liquidate function.

Avoiding a Sweep ​

Borrowers can add prepaid directly with supplyPrepaid or opt into KeeperBundler top-ups. Top-up permission can cause the adapter to borrow additional underlying assets for the user, so the borrower must understand and explicitly grant both pool operator and protocol-specific adapter authority.

Interest Exchange Protocol