Staking Explained

From The C&C Wiki


Staking Explained
Image Wanted.png
Details
Item Rarity

This article will attempt to explain staking, liquidity pools and DEXs as simply as possible.

Here’s a really silly example that will help get the point across:

Pretend you are a kid interested in collecting marbles and there are kids at your school that are also interested in collecting marbles. Assume that marbles are all the same for simplicity. Imagine the marbles are not very rare, but there is no store nearby where they can be bought and sold. The kids at school all generally agree that marbles are worth about 25 cents, but it is very difficult to find someone willing to sell them if you want to buy, and it is also very difficult to find a buyer if you want to sell.

One of the kids has the idea to set up a place to trade marbles at his locker. If this kid were to buy and sell with his own money, he might buy marbles at 20 cents and sell them for 30 cents. Suppose though that this kid got his friends together and they collected 100 marbles and 25 dollars and stored them in the locker. One kid put in 10 marbles and $2.50, one 5 marbles and $1.25, another 20 marbles and $5 and so on. This would be like a liquidity pool in a decentralized exchange. (This is too complex for real life but stick with it)

The way this pool works is you can either buy or sell marbles into the pool. With 100 marbles and $25 in the pool, buying or selling a marble will be about 25 cents without a fee. Let’s say a kid wants a marble and buys one. He takes a marble out of the pool and puts 25 cents in (this is not exact but close enough). There are now 99 marbles in the pool and $25.25. The next marble will now cost a little more than 25 cents because we want the price of the marbles to adjust for supply and demand. For example, if everybody wants a marble, we don’t want the pool to run out of them. If everybody wants to sell a marble, we don’t want the pool to run out of money. The price of a marble is now roughly $25.25/99 or 25.5 cents (this example also breaks down in that marbles and pennies can’t be divided). If another kid came and bought a marble, the price would adjust again to roughly $25.505/98 or about 26 cents. If marbles were then sold back into the pool, the price would drop.

Why provide liquidity? The reason is you can collect fees. V2 liquidity pools typically charge 0.3% per transaction. In my previous bad example, let’s say there are 100 buys and sells and the pool ends up back at marbles being worth 25 cents. In this case because of the fees, the pool will have about 103 marbles and $25.75. If you withdraw your liquidity now, you will withdraw your same share of the pool, but now you’ll have 3% more marbles and 3% more money. Some pools put that fee as something claimable but not directly back in the pool. There may also be further rewards provided by a third-party to encourage staking liquidity. In the case of Captain & Company, kap/eth liquidity stakers receive nuggies, mBLAST, and airdrop points also.

What is the risk or downside? In a liquidity pool, a liquidity provider will suffer impermanent loss, defined as the value of the provided liquidity vs the value of the initial investment as measured at withdrawal. The amount of loss is determined by the change in market value of one side of the pair against the other. In the worst case, if one side of the pair becomes worthless, the loss is 100% and the provider loses their entire investment. For a less drastic scenario, in the previous marble example, let’s say you put in 40 marbles and $10 and the price went down such that you ended up with 50 marbles and $8. (Side note, the math works out that the number of marbles multiplied by the number of dollars will always be the same – in this case 400). In the end case, the marbles are worth 16 cents and you’re left with $16 in value rather than what would have been $16.40. Let’s say the price goes the other way and you’re left with 30 marbles and $13.33. In this case, your marbles are worth 44.4 cents and you’re left with $26.67 in value rather than what would have been $27.78. The more the price of one thing changes vs the other, the more money the liquidity provider loses. This is called impermanent loss. If in both these cases, the price comes back to 25 cents a marble, then there is no impermanent loss. Impermanent loss only becomes a real loss when the liquidity is withdrawn. However, if the price of a marble was to return to 25 cents from 44.4 cents, even though the impermanent loss goes away, the provider would lose money with lower impermanent loss relative to having marbles at 44.4 cents. See below:

Initial invest = 40 marbles and $10 = $20 Marbles at 44.4 cents = 30 marbles and $13.33 = $26.67 (initial investment without providing liquidity would have been $27.78) Return to original pricing = 40 marbles and $10 = $20 (if liquidity was withdrawn at 44.4 cents a marble, you would have had $20.83 - and you're down from $27.78 total value before)

The above example attempts to show that a liquidity provider never wants the value of one side of the pair to decrease, because even though it may help reduce impermanent loss, the value of the liquidity will still decrease. The other thing that is hard to understand is that there is impermanent loss in both directions because impermanent loss is relative to what you are comparing against. There is loss from the first state to the second state, and there is loss from the second state to the third state, even though there is no loss comparing the first state to the third state (first state and third state are the same). If you understand this, you understand the math behind staking better than most. Note, this is similar to holding a single asset and round-tripping it through a double and then a halving. You lost money by not selling at the peak even though you haven't lost money in an absolute sense.

At the highest level, the liquidity provider is betting that they will make more in fees and rewards than the loss they will incur and that this profit will be higher than other ways they could use their coins.

Discord | Twitter