Skip to content

TARE liquidations

API reference: AuctionHouse · TareEngine

ELI5: If your loan gets too risky, bots can pay off part of your debt and take your collateral — plus a small reward. If you're already underwater, a different path settles bad debt.

What you can do

Function When
liquidate(collateral, user, debt_to_cover) HF < 1, position still solvent
settle_bad_debt(user) Collateral value < debt
retire_bad_debt(amount) Refill surplus to pay down ledger

Flywheel fit

Liquidation bonuses and stability fees increase surplus → sTARE APY + Keep reinvestment. Does not route through Coil.

Contract walkthrough

Liquidate (tare_engine.vy):

  1. assert HF(user) < MIN_HEALTH_FACTOR
  2. Seize collateral worth debt_to_cover + 10% bonus
  3. Burn debt_to_cover TARE from liquidator
  4. Assert HF strictly improved

Settle bad debt:

  1. Require insolvency (collateral USD < debt)
  2. Move collateral to seized_collateral
  3. Zero user debt
  4. Burn min(debt, surplus) from buffer
  5. Book remainder as total_bad_debt
flowchart TD
    A[HF drops below 1] --> B{Collateral covers debt+bonus?}
    B -->|yes| L[liquidate]
    B -->|no| S[settle_bad_debt]
    S --> AH[AuctionHouse optional]
    S --> BD[total_bad_debt ledger]

AuctionHouse — Dutch auction on seized collateral; proceeds to surplus.

Parameters

Param Value
MIN_HEALTH_FACTOR 1e18
LIQUIDATION_BONUS 10%

What can go wrong

User risks

  • No warning UI on-chain — monitor HF off-chain.
  • Deep insolvency cannot use liquidate — must use bad-debt path.
  • Surplus exhaustion → total_bad_debt rises (transparent on-chain).

See Liquidations (learn).

Source: TARE-Stablecoin/src/tare_engine.vy, auction_house.vy