BakerDAO
HomeContractContract Audit
English
English
  • BakerDAO Index
  • BakerDAO Litepaper
  • V2.0 Use Tutorial
  • BakerDAO System Upgrade Scheme V1.0
  • BakerDAO's Economic Model 2.0
  • BakerDAO Whitepaper V1.0
  • BakerDAO Introduction
  • Announcement
    • 【Cooperation】DogeSwap BSC Chain Now Supports Yeild Farming By BKR(August 30,2021)
    • BakerDAO V1.6 Will Launch At 21:00 Sep. 10th(August 30,2021)
    • Single Token Harvest Fee Ratio Adjustment Announcement(August 21, 2021)
    • 🌞BakerDAO's first AMA alerting🤜(August 11,2021)
    • Opinions collected on 《BakerDAO System Upgrade Scheme V0.8 (Draft)》(July 28,2021)
    • Single Token Harvest Fee Ratio Adjustment Announcement(July 27, 2021)
    • BakerDAO Governance System V1.0 has Launched.(July 25, 2021)
    • Single Token Harvest Fee Ratio Adjustment Announcement(July 22, 2021)
    • Single Token Harvest Fee Ratio Adjustment Announcement(July 20, 2021)
    • Single Token Harvest Fee Ratio Adjustment Announcement(July 11, 2021)
    • BakerDAO early mining user Reward Compensation has been issued notice(June 25, 2021)
    • BakerDAO will compensate BAI (LP) Yeild Farming users(June 22, 2021)
    • BakerDAO Governance currency BKR is officially included by coinmarketcap(June 22, 2021)
    • BakerDAO has issued more than 10 million stable currency BAI(June 21, 2021)
    • BakerDAO has released the detailed configuration document of Collateral Clearing(June 21, 2021)
    • BakerDAO will Compensate BAI (LP) Yeild Farming users(June 21, 2021)
    • BakerDAO is about to start Yeild Farming(June 20, 2021)
    • BakerDAO Yield Farming launched(June 20, 2021)
    • BakerDao Borrow system launched(June 19, 2021)
    • BakerDAO successfully logs into BitKeep(June 19, 2021)
    • BakerDAO Governance Token BKR is about to start global airdrop(June 19, 2021)
    • BakerDAO through CertiK audit(June 18, 2021)
  • Blog
    • BakerDAO Weekly Report:9.27-10.10(October 11,2021)
    • BakerDAO Weekly Report:9.23-9.26(September 27,2021)
    • BakerDAO Weekly Report:9.13-9.21(September 22,2021)
    • BakerDAO Weekly Report:9.6-9.12(September 13,2021)
    • BakerDAO Weekly Report:8.30-9.5(September 06,2021)
    • BakerDAO Weekly Report:8.23-8.29(August 30,2021)
    • BakerDAO Weekly Report:8.16-8.22(August 23,2021)
    • BakerDAO Explanation Ⅳ:The vault of the Borrow system(August 19,2021)
    • BakerDAO Weekly Report:8.9-8.15(August 16,2021)
    • Review of the First AMA | BakerDAO System Upgrade Explanation and Q&A(August 15,2021)
    • BakerDAO Explanation III: Stability Fee(August 13, 2021)
    • BakerDAO Weekly Report:8.2-8.8(August 9,2021)
    • 《BakerDAO System Upgrade Scheme V1.0》development plan and system design(August 7, 2021)
    • BakerDAO Explanation II: Liquidation (August 6, 2021)
    • BakerDAO Weekly Report:7.26-8.1(August 2,2021)
    • 《BakerDAO System Upgrade Scheme V1.0》is Officially Released (July 30,2021)
    • BakerDAO Weekly Report:7.19-7.25 (July 26,2021)
    • BakerDAO Weekly Report:7.12-7.18 (July 19,2021)
    • BakerDAO Explanation I: A Decentralized Stablecoin - BAI (July 15, 2021)
    • BakerDAO Weekly Report:7.5-7.11 (July 13, 2021)
    • Single Token Mining Fee Stepped Rate Plan will be Launched on 11, July(July 10, 2021)
    • BakerDAO Yeild Farming APY up to 1391%(July 08,2021)
    • BakerDAO's Yeild Farming Rewarded has Exceeded Half in Half a Month(July 05,2021)
    • 5 Minutes to Understand BakerDAO(June 20,2021)
  • Liquidation
    • Collateral liquidation and auction
  • Guides
    • Proposal voting guide
    • How to Farming BKR
      • PC version
      • Mobile version
    • How to Borrow BAI
      • PC version
      • Mobile version
  • BDIPs
    • BDIP2: Adjust Stability Fee
    • BDIP1: Adjust Stability Fee and Line
  • Governance
    • Off-Chain Governance
    • On-Chain Governance
  • Audit
  • Liquidation FAQs
  • Social Media
Powered by GitBook
On this page
  • What is Liquidation?
  • Why does Liquidation exist?
  • Who triggers Liquidation?
  • What is the Liquidation Ratio?
  • What is the Liquidation Price?
  • What is the Liquidation Penalty?
  • Why is the Liquidation Penalty necessary?
  • What happens during a Liquidation?
  • How much Collateral is left after a Liquidation?
  • How do I calculate my Liquidation Price?
  • Formula
  • Result
  • How do I calculate my Collateralization Ratio?
  • How do I lower my Liquidation Price?
  • What are typical practices to avoid getting Liquidated?
  • How would a flash crash affect the Liquidation of Vaults?

Was this helpful?

Liquidation FAQs

PreviousAuditNextSocial Media

Last updated 3 years ago

Was this helpful?

What is Liquidation?

Liquidation is the process of selling collateral to cover the amount of HAI a user has generated from their . Liquidation is the process of selling collateral to cover a user’s generated HAI. A Vault can be Liquidated if the value of its collateral falls below the required minimum level, called the Liquidation Ratio. During the Liquidation process, enough collateral is sold to cover the debt along with a Liquidation Penalty, leaving the remaining collateral available for withdrawal.

Why does Liquidation exist?

HAI is a proxy for the US Dollar, with the additional benefit of being fully backed by real value in the form of various collateral assets. Liquidation helps to ensure that HAI is always backed by an appropriate amount of collateral by closing-out Vaults that are under their minimum required Collateralization Ratio for their given collateral type.

Who triggers Liquidation?

To make sure that the required surplus of collateral exists at all times, a class of users called Keepers are incentivized to maintain a constant watch for Vaults that become under-collateralized. These Keepers are a special category of Hayker Protocol users. They are the actors in the system who are incentivized to make sure that the outstanding HAI supply remains fully collateralized and solvent. They help maintain the health of the entire ecosystem by ensuring that undercollateralized Vaults are offered up for Liquidation as quickly as possible. This is particularly important during rapid market downturns as the collateral value could be subject to slippage. keepers can use this bot to participate in liquidation:(Auction Keeper):

What is the Liquidation Ratio?

The Liquidation Ratio is the minimum required collateralization level for each Vault type before it is considered undercollateralized and subject to Liquidation. The Hayker Protocol’s Oracle provide the system with pricing data that is used to track Vaults for when their Liquidation Ratio is breached. Once breached, they are available for Liquidation.

For example, a Vault with a 150% Liquidation Ratio will require a minimum $1.50 of collateral value for every $1 of HAI generated. If the value of the collateral falls to $1.49 it will be Liquidated to cover the generated HAI in addition to a fee called the Liquidation Penalty.

Each Vault type’s Liquidation Ratio is determined by a combination of the collateral’s risk profile and the Stability Fee. There may be multiple Vault types for each collateral, with varying Liquidation Ratios and Stability Fees.

What is the Liquidation Price?

This is the price at which a Vault becomes vulnerable to Liquidation. It is unique to each user’s Vault and moves up slowly as Stability Fees accrue.

What is the Liquidation Penalty?

This is a fee that is paid by Vault owners when their Vaults are Liquidated. The fee is added to the Vault’s total outstanding generated HAI when a Liquidation occurs, which results in more of the collateral being sold on Auction.

Proceeds from Liquidation Penalties are put towards the Surplus Auctions, which result in burned HKR.

Why is the Liquidation Penalty necessary?

The penalty is necessary to prevent Auction Grinding Attacks, which essentially break the Auction mechanism since an attacker can exploit the Hayker Protocol for profit.

What happens during a Liquidation?

Liquidation occurs through an Auction mechanism built into the Hayker Protocol.

The simplified order of operations looks like this:

  • A Keeper detects an undercollateralized Vault and triggers a Liquidation.

  • All of the collateral is put up for auction to cover the outstanding HAI + Liquidation Penalty

  • Once bids reach the HAI amount equaling to the outstanding HAI + Liquidation Penalty, the auction reverses and bidders now compete by offering to accept less collateral for the HAI they bid in the previous phase.

  • Once the auction completes bidders receive the sold collateral, the winning bidders HAI is burned, and the Vault owner receives leftover collateral if any remains.

How much Collateral is left after a Liquidation?

Since Liquidations occur through Collateral Auctions, there is no way to accurately predict the exact amount of collateral one would receive.

How do I calculate my Liquidation Price?

The Liquidation Price for a given Vault is usually shown on front-ends that offer Vaults. Though one can manually calculate their Liquidation Price by using the following simplified formula:

Formula

(Generated HAI * Liquidation Ratio) / (Amount of Collateral) = Liquidation Price

Variable

Value

Generated HAI

1000 HAI

Liquidation Ratio

130%

Amount of Collateral

100 HT

Result

(1000 × 1.3 ) ÷ (100) = 13 USD

If we use HT as an example, it would need to fall to 13 USD before the Vault is considered undercollateralized by the system.

How do I calculate my Collateralization Ratio?

The Collateralization Ratio for a given Vault is usually shown on front-ends that offer Vaults. Though one can manually calculate their Collateralization Ratio by using the following simplified formula:

Formula:

(Collateral Amount x Collateral Price) ÷ Generated HAI × 100 = Collateralization Ratio

Given that:

Variable

Value

Collateral Amount

100 HT

Collateral Price

20 USD

Generated HAI

1000 HAI

Result:

(100 x 20) ÷ 1000 × 100 = 200%

The Vault in this example has a Collateralization Ratio of 200%.

How do I lower my Liquidation Price?

If a user’s Vault is close to the Liquidation Price, they may either add more collateral or pay HAI back into the Vault.

The most efficient way a user can lower their Liquidation Price is to repay HAI. This also has the added benefit of reducing the Stability Fees that accrue for the owner of the Vault. This can be proven by the following example:

Formula:

(Generated HAI x Liquidation Ratio) ÷ Collateral Amount = Liquidation Price

Given that:

Variable

Value

Liquidation Ratio

130%

Collateral Amount

100 HT

Collateral Price

20 USD

Generated HAI

1000 HAI

Current Liquidation Price:

(1000 × 1.3 ) ÷ (100) = 13 USD

Liquidation Price change by adding 20 HT (20 HT * 20 USD =400 USD) worth of collateral:

(1000 × 1.3) ÷ (120) = 10.8 USD

Liquidation Price change by repaying 400 HAI:

(600 × 1.3 ) ÷ (100) = 7.8 USD

What are typical practices to avoid getting Liquidated?

Remaining aware of a Vault’s condition is the Vault owner’s own responsibility. Ensuring that assets remain safe from Liquidation is entirely in the hands of each Vault owner. Below are some common practices to monitor the health of a Vault:

Vault owners could:

  • Set up price alerts for the collateral asset(s) being used.

  • Set up a personal rule that would require them to unwind their Vaults if the collateral price falls below a certain level, this may act as an additional buffer.

  • Make sure they have adequate access to their Vaults, especially during volatile periods in the markets.

  • Keep note of their Vault’s number. They can use it as a reference to have an external party payback HAI or add collateral on their behalf if they don’t have immediate access to their Vault.

  • Make sure they have access to emergency funds or assets that can be readily used to pay back HAI or add more collateral to their positions.

Remember that opening a Vault and generating HAI represents the creation of risk. Vault owners should be very cognizant of this fact and should use Vaults at their own risk.

How would a flash crash affect the Liquidation of Vaults?

A flash crash on a single exchange will not affect the system as Oracle aggregates prices from many sources. The Chainlink Oracle which HaykerDAO user calculates the median of these prices, which naturally filters outliers like a broken price from an exchange that’s experienced a flash crash.

For a more detailed guide on how Auctions and Keepers work see on MakerDAO.

Vault
https://github.com/BakerDAO-Fi/auction-keeper
The Auctions Protocol