Comment on page
Curve V1 Savior Details
This is the math and logic that would apply in the case of a Curve V1 saviour integrated with the RAI protocol.
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.
In the curve savior we aren't adding any collateral, therefore
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: