Risk and Return
The standard impermanent loss return profile for a Uniswap V2 style LP position is shown below. This curve was originally introduced by Pintail in their blog post on Uniswap. The x-axis is the price ratio change from its initial values. So, where
x=1, the relative price of the tokens has remained the same. Where
x=2, the relative price of the tokens has doubled. Where
x=0.5, the relative price of the tokens has halved (or, doubled in the opposite direction).
Note also that these calculations are the worst-case scenario – they assume that there are zero swap fees and zero incentive rewards throughout the duration of the deposit – so that the only factor determining returns is impermanent loss (which is never positive).
From here on, we'll refer to any points to the right of
x=1as when the DAO token increases in price relative to ETH. Points to the left of
x=1are when ETH increases in price relative to the DAO token. The Rift protocol can operate on arbitrary ERC20 tokens, but this will be pedagogically useful.
So, how does Rift manipulate this return profile to benefit both DAOs and Liquidity Providers given their respective goals from using the protocol? To calculate these return profiles, we do the following.
Let’s call the starting amount of ETH
E_0, and the starting amount of DAO tokens
G_0(G for governance). Similarly, when a user withdraws their LP position, let’s call the ending amount of ETH
E_1, and the ending amount of DAO tokens
Maintaining the standard from the graph above, let’s define
xas the price ratio change from time 0 to time 1:
The constant product,
k, is the product of reserves of the two tokens. At time
t=0, we know:
Since we are assuming no swap fees or other rewards, we know that the constant product must remain the same from time 0 to time 1, according to the standard rules for a constant product AMM. This gives us the following equation.
Combining the last two definitions, we can derive the amount of ETH and DAO tokens available upon withdrawal from the LP position, represented by the formula below. Derivation is left as an exercise for the reader.
For simplicity, we can actually assume that:
We can make this assumption without loss of generality because impermanent loss only cares about the price ratio change between time 0 and time 1, and not about the absolute prices between those two times. This ensures the validity of the next few formulas.
Working with this assumption, we can now define the “base profits” for each side – i.e. the absolute returns upon immediate withdrawal from the LP position.
Now that we know how much of each token the LP position returns upon immediate withdrawal, we can determine how much must be swapped to either side based on the interest rate floor and ceiling of 0.
sistands for “swap in”.
Now that we know swap amounts, we can calculate how much of each side is received from the swap (”swap out”).
We sum the initial amount received from the position with amounts swapped in and out. This determines the absolute returns of the position.
And the final returns:
Assuming our base parameters of the interest rate floor and ceiling, we can now plug in these formulas and view how impermanent loss is distributed for the LP. Below, the blue line represents the standard impermanent loss profile for a Uni V2 position, while the orange line represents that of an LP who deposits via Rift.
Blue is the standard impermanent loss experience by liquidity providers in AMMs. Orange is the reduced impermanent loss experienced by LPs in the Rift Protocol.
As we can see, Rift LPs (ETH depositors) receive impermanent loss protection.
When the price of the governance token increases vs ETH (
x>1), the ratio of assets in the pool has been skewed such that there are now fewer DAO tokens and more ETH in the LP position. In this scenario, the excess ETH in the position is swapped for governance tokens to pay back the DAO and make their position whole, never going below the LPs initial deposit.
When the price of the governance token decreases vs ETH (
x<1), the ratio of assets in the pool has been skewed such that there are now more DAO tokens and fewer ETH in the LP position. In this scenario, the excess governance tokens are swapped for ETH to make the liquidity providers whole.
Now we can add in the return profile for DAOs.
Blue: Standard IL; Orange: IL for LPs in Rift; Green: IL for DAOs in Rift
This graph and these calculations assume there are no swap fees or other rewards; however, if swap fees outweigh IL, then any excess ETH is retained as profits for LPs.