Case 1: User in a healthy position
Following the post on Delta and the liquidation logic, we think a full example of liquidation calculations is useful. Suppose that the initial conditions of the position taken by the user are:
Ratio Finance Risk Tolerance
Market Conditions
Borrower's position
ฮminโ = 2%
Collateralization Ratio = 130%
Following the calculations before we have the following conditions for liquidation
Borrower's Position
Risk monitoring
Maximum Borrowable USDr = $784.62
Collateral to Debt = 130%
In this case nothing needs to be done, the user is in a healthy position and there isn't any liquidation.
Case 2: User repays to be safe
Here we start from the same initial conditions as the example above, however different market conditions pushed LP Market price to $1.01 and Fair Price to $0.85.
Ratio Finance Risk Tolerance
Market Conditions
Borrower's position
ฮminโ = 2%
Collateralization Ratio = 130%
The current market conditions are such that:
Borrower's Position
Risk monitoring
Maximum Borrowable USDr = $ 776.92
Collateral to Debt = 128.73%
Then the amount to repay to be safe can be easily calculated:
Repay (%)
LP Tokens to deposit
USDr to repay
At the end of this repayment process the borrower goes back to a healthier position where:
Case 3: User getting partially liquidated
Here the same conditions as the example above are given, but the borrower didn't repay any of their debt within the 3 epochs of time given as a buffer before liquidation occurs.
Ratio Finance Risk Tolerance
Market Conditions
Borrower's position
ฮminโ = 2%
Collateralization Ratio = 130%
In this case the ratio between Market Price and Fair Price has dropped considerably and the position of the user needs to be liquidated
Borrower's Position
Risk monitoring
Maximum Borrowable USDr = $ 776.92
Collateral to Debt = 128.73%
In this example, at current market conditions the borrower's debt is now under-collateralized, therefore, the position needs to be readjusted. For this particular example this readjustment is:
Liquidation results
User perspective
Minimum Liquidation = 25%
Tokens to be unwound = 250
New LP Nominal = $ 757.50
LP Notional Value = $ 252.66
New Collateral to Debt = 142.40%