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).x=1
as when the DAO token increases in price relative to ETH. Points to the left of x=1
are 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.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 G_1
.x
as the price ratio change from time 0 to time 1:k
, is the product of reserves of the two tokens. At time t=0
, we know:si
stands for “swap in”.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. 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.