🔬
Product Docs
  • Welcome to AZKA FINANCE
  • AZKA Token Murabaha Overview
    • General
    • System Components
    • Protocol Architecture
    • Token Types
    • Use Cases
    • AZKA RoadMap
  • Murabaha Pools V1
    • Providing Liquidity
    • Pool Metrics
    • vROI
    • Murabaha Fee Rate Curve
    • Shariah Considerations
  • Executing Murabaha V1
    • Pre-Requisites
    • Initiating Murabaha
    • Executing Murabaha
    • Quote Methodology
      • Amount of Murabaha Token Required (AMTR)
      • Required Amount of Currency (RAC)
    • Shariah Considerations
  • Managing Murabaha V1
    • Managing Murabaha
    • Liquidation Parameters
    • Liquidation Mechanics
    • Shariah Considerations
  • Token Murabaha Risk Framework
    • General
    • Asset Risk
    • Liquidity Pool Risk
    • Liquidation Risk
    • Risk Parameters
  • AZKA Token Design and Tokenomics
    • General
    • Specific Utilities (AZKA, vAZKA, dLP)
    • Token Distribution
    • vAZKA
      • vAZKA Reward Distribution
    • dLP (Dynamic LP)
      • Initiating dLP
      • vAZKA Murabaha Eligibility
      • Managing Eligibility
      • Claiming vAZKA
  • Governance
    • General
    • DAO Structure and Policies
    • azTeams
  • Developer Docs
    • Murabaha Pools
    • Executing Murabaha
    • Liquidations
Powered by GitBook
On this page
  1. Managing Murabaha V1

Liquidation Mechanics

As discussed previously, a user may have a diverse portfolio of collateral tokens (ie, ETH, WBTC, USD) securing various debt tokens (ie, ETH, WBTC, USD). To receive collateral, the Liquidator will pay amounts equal to the users debts in whatever tokens they are denominated. Subsequently, the liquidator is entitled to claim each type of collateral (i) from the user's account, in addition to a liquidator reward (LR). This acquisition occurs through an ordered process, prioritised according to the liquidators preference. The process involves iterative deductions from each collateral type (i) in the order specified by the liquidator until the total amount due is reached.

Price based Liquidations

When a price based liquidation occurs it means the users DTC has passed the users unique Liquidation threshold. The Liquidation Bonus is applied on the difference between the collateral's value and the value of the users debt.

Assuming the ETH price is 1000 USD (1 ETH : 1000 USD) and the users liquidation threshold is 90%. A collateral value of 1.11111 ETH and sum debt of 1000 USDT trigger a liquidation. By paying 1000 USDT the liquidator receives 1.055 ETH, this is because the WALB (Weighted Average Liquidation Bonus) of 50% is multiplied by the difference of 0.11111 ETH. Hence, the bonus can be viewed as a discount of approximately 5.5% on the value of the collateral.

Below is an example of how a Liquidation denominated in USD value is carried out.

Example: Multi-Collateral Price based Liquidation

Lets assume some user has 10 ETH collateral, 1 WBTC collateral and 20,000 USDT debt. Assuming the WBTC/USD price is 20,000 ( 20,000 USD per WBTC), the ETH/USD price is 2000 ( 2000 USD per ETH) and the USDT/USD price is 1. We can value the users portfolio in USD as follows:

USD value of Collateral : 20,000 USD in ETH + (20,000 USD in WBTC) = 40,000 USD

Debt value in USD : 20,000 USD in USDT

We can see that the users Debt to Collateral ratio is:

20,000 USD in USDT / 40,000 USD = 50%

Assuming that the Liquidation Threshold for ETH collateral is 90% and the Liquidation Threshold for WBTC is also 90%, the users unique Liquidation Threshold based on the weighted average formula is also 90%.

In a scenario where the DTC became 90%, or rather the ETH/USDT price became 1,222.22 (1,222.22 USD per ETH) and the WBTC/USD price became 10,000 (10,000 USD per WBTC). We can value the users portfolio in USD as follows:

USD value of Collateral : 12,222.22 USD in ETH + (10,000 USD in WBTC) = 22,222.22 USD

Debt value in USD is still: 20,000 USD in USDT

This would yield a DTC of approximately 90% and as a result, Liquidation would be triggered. Given the specific Liquidation Penalties for ETH and WBTC are 50% and 70% respectively.

The users WALB would be:

(12,222.22 USD in ETH * 0.5) + (10,000 USD in WBTC * 0.7) / 22,222.22 = 0.59 or 59%

The Liquidator would pay a USDT amount equal to the debt back to the AZKA USDT pool and according to the Liquidation, receive the following from the users collateral:

Liquidation Bonus = (22,222.22 - 20,000) * 0.59 = 1,311.11 USD

Liquidator will receive = 20,000 USD + 1,311.11 USD as a bonus

The users collateral account will be deducted as follows until the liquidator receives what they are owed + bonus:

i) Assuming the Liquidator provided the order to be [WBTC, ETH], the users 1 WBTC will be liquidated first, which is worth approximately 10,000 USD. This is less than what is owed and hence the users full WBTC collateral will given to the liquidator.

The liquidator still needs to receive 11,311.11 USD (21,311.11 USD - 10,000 USD (in WBTC)) ii) The users remaining 10 ETH collateral will be used to satisfy the remaining amount, leaving the user with 911.112 USD worth of ETH or more specifically 0.7454 ETH.

12,222.22 USD in ETH - 11,311.11 USD = 911.112 USD in ETH (0.7454 ETH)

Time Based Liquidation

Time based Liquidations occur when a user fails to repay a specific debt on time. As mentioned previously each debt is unique and it may be the case that it is a specific debt that needs to be cleared rather than the sum total debts of the user, as would be the case in a price based liquidation. Hence, for a user with a total number of unique debts (N), we isolate the debt (i) in (N) that has reached expiry.

We use a similar methodology as in a price Liquidation albeit we can expect that the User will be left with significantly more collateral; if at time of liquidation; the user had a healthy DTC ratio. In such a scenario, It is not possible for the users DTC to be greater than or equal to the users unique Liquidation Threshold. We isolate the expired debt and treat it as if it has incurred a price liquidation by dividing the Expired debt by the liquidation threshold to deduce the collateral corresponding to that specific debt and the users liquidation threshold.

Example: Multi-Collateral Time based Expiration

Lets assume some user has 10 ETH collateral, 1 WBTC collateral and two 10,000 USDT debts. Assuming the WBTC/USD price is 20,000 ( 20,000 USD per WBTC), the ETH/USD price is 2000 ( 2000 USD per ETH) and the USDT/USD price is 1. We can value the users portfolio in USD as follows: We can value the users portfolio in ETH as follows:

USD value of Collateral : (20,000 USD in ETH) + (20,000 USD in WBTC) = 40,000 USD

Debt (i) value in USD : 10,000 USD in USDT

Debt (ii) value in USD : 10,000 USD in USDT

We can see that the users Debt to Collateral ratio is:

20,000 USD in USDT / 40,000 USD = 50%

Assuming that the Liquidation Threshold for ETH collateral is 90% and the Liquidation Threshold for WBTC is also 90%, the users unique Liquidation Threshold based on the weighted average formula is also 90%.

Let's assume that prices haven't changed, 10,000 USDT of the 20,000 USDT debt is set to expire and the user hasn't been unable to repay the debt. This would trigger a liquidation in the following manner:

Assuming the Liquidation Bonus for ETH and WBTC are 50% and 70% respectively, the users WALB would be:

(20,000 USD in ETH *0.5) + (20,000 USD in WBTC *0.7) = / 40,000 USD = 60%

The Liquidator would repay the 10K USDT debt back to the AZKA USDT pool and the expired debt would be isolated and treated as follows:

Collateral for Expired debt(i) = 10,000 / 0.9 = 11,111.111 USD

We then use the same logic as in Price Liquidations:

Liquidation Bonus = (11,111.111 USD - 10,000 USD) * 0.6 = 666.667

Liquidator will receive = 10,000 USD + 666.667 USD as a bonus

The users collateral account will be deducted as follows until the liquidator receives what they are owed + bonus:

i) Assuming the order specified by the Liquidator is [WBTC, ETH], The users 1 WBTC is equivalent to 20,000 USD and is enough to satisfy what is owed. Hence the user will be left with approximately 9,333.33 USD worth of WBTC (20,000 USD - 10,666.667 USD) which is equivalent to 0.4666 WBTC. ii) The users now has 10 ETH collateral, 0.4666 WBTC collateral and an outstanding 10,000 USDT debt.

The users new DTC is :

10,000 USD in USDT / (20,000 USD in ETH + 9,333.33 USD in WBTC) = 34 %

PreviousLiquidation Parameters NextShariah Considerations

Last updated 1 year ago