Size Credit Docs
  • Welcome
    • Introducing Size
  • Highlighted Products
    • Borrow
    • Earn
  • Security & Risk
    • Audits & Security
    • Risks
    • Contract Addresses
  • How It Works
    • Lending (Buying Credit)
    • Borrowing (Selling Credit)
    • The Yield Curve Order Book
      • Bids & Offers
      • Rate Hooks
      • In What Situations Are Bids and Offers Filled?
    • Offsetting Debt with Credit
    • Position Health & Liquidations
    • Technical Docs
      • 1. Core Components
      • ♾️1.1 Fixed-Rate Order Book (FROB)
      • ♾️1.2 Limit Orders
      • 2. Accounting System
      • ♾️2.1 Deposit Tokens & Global Trackers
      • ♾️2.2 Loans
      • ♾️2.3 Fees
      • 3. Mechanisms
      • ♾️3.1 Deposit & Withdraw
      • ♾️3.2 Limit Orders / Offers
      • ♾️3.3 Market Orders
      • ♾️3.4 Repayment
      • ♾️3.5 Liquidations
      • ♾️3.6 Claim
      • 4. FAQ
  • Official Links
    • Size App
    • Website
    • X
    • Telegram
    • Github
    • Media Kit
  • Terms of Use
    • Terms of Use
    • Privacy Policy
Powered by GitBook
On this page
  • 3.5.1 Automatic Collateral Assignment
  • 3.5.2 Eligibility for Liquidation
  • 3.5.3 Liquidation Mechanisms
  • 3.5.3.1 Standard Liquidation
  • 3.5.3.2 Self Liquidation
  • 3.5.3.3 Liquidation with replacement
  • 3.5.3.4 Overdue Liquidation
  1. How It Works
  2. Technical Docs

3.5 Liquidations

Previous3.4 RepaymentNext3.6 Claim

Last updated 11 months ago

3.5.1 Automatic Collateral Assignment

The FROB has a cross-collateral system, meaning each loan is backed by an amount of collateral that is automatically computed when a "liquidability check" is performed.

The criteria that is used is the pro rata collateral assignment: since each DebtPosition represents a percentage of the total borrower debt, that loan is backed by an equivalent percentage of the borrower collateral.

To be able to compute the amount of auto-assigned collateral dynamically in a scalable way, the protocol tracks both

  • total borrower debt and

  • total borrower collateral

so the automatically assigned collateral is

CLB(t)=DLB(t)DB(t)CB(t)C_{L_{B}}(t) = \frac{D_{L_{B}}(t)}{D_{B}(t)} C_{B}(t)CLB​​(t)=DB​(t)DLB​​(t)​CB​(t)

with

  • CB(t)C_{B}(t)CB​(t) the total collateral of the borrower BBB at the time ttt

  • DB(t)D_{B}(t)DB​(t) the total debt of the borrower BBB at the time ttt

  • DLB(t)D_{L_{B}}(t)DLB​​(t) the total outstanding debt of the loan LBL_{B}LB​ belonging to the borrower BBB at time ttt (amount due to the lenders)

  • CLB(t)C_{L_{B}}(t)CLB​​(t) the collateral automatically assigned to the loan LLL belonging to the borrower BBB at time ttt

The notation stresses how all of these quantities change over time as the result of the various actions the borrower and lender can take, which are

  • DLB(t)D_{L_{B}}(t)DLB​​(t) can be partially reduced both by the borrower via partial repayment and the lender via self-liquidation (when it is allowed)

  • DB(t)D_{B}(t)DB​(t) the total debt of the borrower changes as new loans are opened and closed

  • CB(t)C_{B}(t)CB​(t) the total collateral of the borrower changes as he deposits and withdraws it or liquidations and self-liquidations happen

3.5.2 Eligibility for Liquidation

Each loan has a collateral ratio computed as

The protocol has 2 collateral thresholds that are checked

The initial values are set to

Overdue loans are also eligible for liquidation, regardless of the borrower's collateral ratio.

3.5.3 Liquidation Mechanisms

3.5.3.1 Standard Liquidation

Since

with

This is split as follows

3.5.3.2 Self Liquidation

Running a standard liquidation on such a loan would mean the liquidator suffers a net loss. This is a negative incentive for any 3rd party liquidator, so the only actors likely to perform a standard liquidation on an undercollateralized loan is one of Size's bots, with the purpose of taking a loss to make the lender whole.

This kind of liquidation will be subsidized by means of an insurance fund. However, it is not possible to assume that insurance capacity will be sufficient to make all the lenders whole in every potential scenario. In this case, lenders can also perform a "self-liquidation".

Using this mechanism, a proactive lender can limit the loss when the price of the collateral drops quickly. This mechanism is designed to leave it as an individual choice of each lender whether to self-liquidate as a stop loss and carry some inventory risk (or swap the ETH back into stablecoins) or keep the loss unrealized hoping the collateral ratio goes up again.

This operation does not change the collateralization of the borrower:

Proof

To simplify the notation let's redefine symbols as follows

To recap, the self-liquidation mechanism works as follows

Collateral Ratio before

Collateral Ratio after

Let's compute the difference in CR so

Let's double-check computing also the aggregated CR

Let's compute the delta CR and for the sake of simplicity let's skip the denominator since it is not relevant

Skipping the simplifications we get that this is equal to zero if

3.5.3.3 Liquidation with replacement

This mechanism consists of a liquidator performing a standard liquidation, but the repaid proceeds do not become immediately available for the lender(s) to be claimed but are used to fill a borrow market order instead, making sure that the due date remains the same as the one of the liquidated lender so the lender(s) can claim when they expect to

3.5.3.4 Overdue Liquidation

When the loan is overdue, it is eligible for liquidation in the same way as underwater loans. However, overdue loans with healthy collateral ratios have reduced penalties for the borrower.

ρLB(t)=CLB(t)DLB(t)\rho_{L_{B}}(t) = \frac{C_{L_{B}}(t)}{D_{L_{B}}(t)}ρLB​​(t)=DLB​​(t)CLB​​(t)​

ρo\rho_{o}ρo​ the minimum collateral ratio for opening a new loan and

ρl<ρo\rho_{l} < \rho_{o}ρl​<ρo​ the minimum collateral ratio for making a loan eligible for a standard liquidation

ρo=150%\rho_{o} = 150\%ρo​=150%

ρl=130%\rho_{l} = 130\%ρl​=130%

When a loan is eligible for standard liquidation, the liquidator is supposed to cover all the DLBD_{L_{B}}DLB​​ with an equivalent amount of USDC

DLB=VLBD_{L_{B}} = V_{L_{B}}DLB​​=VLB​​

VLBV_{L_{B}}VLB​​ the face value of the loan, so the sum of all the related lender(s) credits

In exchange, the liquidator gets an equivalent amount of collateral computed using our oracle price PPP at the time of liquidation

If ρLB>100%\rho_{L_{B}} > 100\%ρLB​​>100% it means the liquidation is profitable, and there is an incentive reward to be paid to liquidators. The liquidator gets up to a fixed 5% reward on the loan's face value. Then, the collateral remainder is split as follows:

νb\nu_{b}νb​ collateral remainder percentage back to the liquidated borrower

νp\nu_{p}νp​ collateral remainder percentage to the protocol

When ρLB<100%\rho_{L_{B}} < 100\%ρLB​​<100% it means the loan is undercollateralized.

When this happens, the lender cancels an amount of debt in the DebtPosition equivalent to their credit and, in exchange, they get an amount of collateral equivalent to the percentage of the total credit of that loan, so its face value VLBV_{L_{B}}VLB​​, from the borrower reserves.

If a lender EEE owns the credit γE,LB\gamma_{E, L_{B}}γE,LB​​ on the loan LBL_{B}LB​ then what happens is

the new debt of the loan is DLB′=DLB−γE,LBD_{L_{B}}' = D_{L_{B}} - \gamma_{E, L_{B}}DLB​′​=DLB​​−γE,LB​​

the amount CLBγE,LBVLBC_{L_{B}} \frac{\gamma_{E, L_{B}}}{V_{L_{B}}}CLB​​VLB​​γE,LB​​​ of collateral is transferred from the borrower BBB reserves to the lender EEE reserves

CCC : auto-assigned collateral (previously known as CLBC_{L_{B}}CLB​​)

DDD : total loan debt (previously known as DLBD_{L_{B}}DLB​​)

x≤Dx \le Dx≤D : amount of credit canceled in the self-liquidation process

lender forgives xxx amount of credit and therefore the new debt is D′=D−xD' = D - xD′=D−x

in exchange, he receives collateral pro rata so the new collateral is C′=C−CxDC' = C - C \frac{x}{D}C′=C−CDx​ so C′=C(1−xD)C' = C(1 - \frac{x}{D})C′=C(1−Dx​)

ρ0=CD\rho_{0} = \frac{C}{D}ρ0​=DC​

ρ1=C′D′\rho_{1} = \frac{C'}{D'}ρ1​=D′C′​

Δρ=ρ0−ρ1\Delta \rho = \rho_{0} - \rho_{1}Δρ=ρ0​−ρ1​

CD−C(1−xD)D−x=CD−xC−CD+xCD(D−x)=0\frac{C}{D} - \frac{C(1 - \frac{x}{D})}{D - x} = \frac{CD - xC - CD + xC}{D(D-x)} = 0DC​−D−xC(1−Dx​)​=D(D−x)CD−xC−CD+xC​=0

CR Before C0+C1D0+D1\frac{C_{0} + C_{1}}{D_{0} + D_{1}}D0​+D1​C0​+C1​​ where C0C_{0}C0​ is the auto-assigned collateral to that loan and D0D_{0}D0​ is the debt of that loan

CR After C1+C0(1−xD0)D1+D0−x\frac{C_{1} + C_{0}(1 - \frac{x}{D_{0}})}{D_{1} + D_{0} - x}D1​+D0​−xC1​+C0​(1−D0​x​)​

C0(D0−x)+C0D1+C1(D0−x)+C1D1−C0(1−xD0)(D0+D1)−C1(D0+D1)C_{0}(D_{0} - x) + C_{0}D_{1} + C_{1}(D_{0} - x) + C_{1}D_{1} - C_{0}(1 - \frac{x}{D_{0}})(D_{0} + D_{1}) - C_{1}(D_{0}+D_{1})C0​(D0​−x)+C0​D1​+C1​(D0​−x)+C1​D1​−C0​(1−D0​x​)(D0​+D1​)−C1​(D0​+D1​)

x(C0D1D0−C1)=0x(C_{0} \frac{D_{1}}{D_{0}} - C_{1}) = 0x(C0​D0​D1​​−C1​)=0

which is true if C0D0=C1D1\frac{C_{0}}{D_{0}} = \frac{C_{1}}{D_{1}}D0​C0​​=D1​C1​​ which means that a specific loan needs to have the same collateral ratio as all the other loans and we know this is always true by construction.

Letting aside protocol fees that have already been taken on the liquidated loan during the standard liquidation process, at the due date the new borrower must return the face value of the liquidated loan VLBV_{L_{B}}VLB​​ plus the new protocol fees

If the liquidation happens at time τ\tauτ and the due date is at TTT then the new loan needs to have a duration of T−τT-\tauT−τ and the corresponding rate is obtained by applying this term to the yield curve ΨB′\Psi_{B'}ΨB′​ of the new borrower B′B'B′ so that we obtain the new rate r′=ΨB′(T−τ)r' = \Psi_{B'}(T - \tau)r′=ΨB′​(T−τ) which allows the computation of the actual amount to lend out aka issuance value ILB′=VLBr′I_{L_{B'}} = \frac{V_{L_{B}}}{r'}ILB′​​=r′VLB​​​ of the new loan that replaces the old one.

Since r′>0r' > 0r′>0 always then VLb>ILB′V_{L_{b}} > I_{L_{B'}}VLb​​>ILB′​​ and this determines a net profit VLb−ILB′V_{L_{b}} - I_{L_{B'}}VLb​​−ILB′​​ that is earned in cash by the protocol

♾️