Curve V1 Savior Details
Last updated
Last updated
This is the math and logic that would apply in the case of a Curve V1 saviour integrated with the RAI protocol.
The Curve V1 savior requires SAFE owners to deposit Curve RAI/3Pool LP tokens. The RAI/3Pool contract can be found here.
Upon liquidation, the Curve savior will withdraw all underlying liquidity (RAI + 3Pool tokens) from the LP shares protecting the liquidated SAFE. It will then use the withdrawn RAI to pay back as much debt as possible from the SAFE. The 3Pool tokens aren't used in this process and will need to be withdrawn manually from the savior at a later date.
We reuse the variable naming and debt/collateral liquidation relationship from the Uni-v2 savior calculation.
In the curve savior we aren't adding any collateral, therefore . For we have to calculate the amount of RAI withdrawn from the pool. We will assume that the USD value of the pool stays 50/50 and that RAI trades close to it redemption price. Therefore for each RAI-3Pool LP token we are getting RAI which give us the following formula:
Which then gives us (after also replacing the liquidation price):
To this we have to add the $2000 liquidator fee.
To help with the whole calculation, you can use the following spreadsheet: