Uni-V2 RAI/ETH Savior Details

The Uniswap V2 RAI/ETH savior allows users to deposit LP shares to protect their safe. Upon a liquidation attempt from a keeper, the savior will withdraw all RAI and ETH liquidity from Uniswap.

The savior will then repay as much RAI debt as possible. If the Safe's collateralization ratio is still not at the target ratio that the Safe owner picked, the savior will also add more ETH to the Safe. The keeper that triggered the savior will then take a flat fee as reward for saving the Safe.

The savior does not guarantee that the safe will be saved. The user needs to make sure that they deposited enough LP tokens so the savior can both reward the keeper that saves their position and bring the Safe's collateralization ratio to the target they picked.

Minimum Savior Balance Formula

In order to derive the formula for the minimum LP balance that can bring your Safe to a target CRatio, we use the following variables:

We first need to use the liquidation price formula:

Which then gives us:

And similarly:

We can now replace these results in the equation from the liquidation price:

Using Wolfram Alpha:

​We get 2 solutions:

Done! To that we have to add the flat $2000 keeper fee. Below is a calculation example:

The spreadsheet is available here, make a copy to test your own parameters: https://docs.google.com/spreadsheets/d/1flg9LidXvxcAInw4-AtDCEFniMGoZg9fIgm-x36S3CA/edit#gid=0

Last updated