[Cryptocurrency] How will the fees of LP providers be distributed?

in #sct-kr2 years ago

Liquidity providers receive a percentage of their transaction fees.
In the case of pancakeswap, the total commission is 0.25%, of which about 70%, or 0.17%, is taken by the LP provider. The rest is pancakeswap's income.

3333.png

Paying bnb when swapping is a fee to raise the transaction to bsc block, and 0.25% of the transaction fee must be paid separately. 0.25% is a fairly high fee. If you trade the same amount 100 times, you will be charged 25% as a commission.

As transaction fees accumulate, they should be distributed to LP providers. LP quantity does not change even if one day passes after LP supply. If so, I am really curious how the accumulated fees are distributed to the LP providers.

Current LP information for pancakeswap. It displays APR for LP earnings. The current BNB/BUSD LP yield is 15.88%. very high.

444.png

Today's question is how the accumulated fees are delivered to the LP. Why are you curious about this? I'm working on some kind of project right now, because it's a successful project when there is a guarantee that the LP fee will be paid in real.

Now let's check it out.

It will be accurate when I look at the source code and check it, but I'll put this on to try in the next life. I've been trying to figure out how to distribute it.

The point is that there is a value of k that determines the size of the overall pool, and the value of k does not change until the liquidity supply changes. This means that no matter how many fees are accumulated, the pool size does not change.

So when does the value of k change... that's when the liquidity supply changes.

Someone could add additional liquidity or subtract existing liquidity supply. Of course, you can also subtract your existing liquidity supply. When liquidity changes occur, the K value is changed, and the accumulated fees are also taken into account.

For ease of explanation, we assume that 10 users have 10% stake in each of 10 users.

Over time, fees accumulate. However, since there is no change in users, it continues to maintain the stake. It is assumed that the accumulated fee is 10, and that 10 is newly supplied as liquidity.

When this happens, the shares of existing users are maintained, fees are added, and liquidity of new users is added. New users will have an LP quantity of 10 (9.09) from the existing pool (100) + commission (10) of 110 status.

If the existing user has 10 LP quantity when they put in 10, the user who comes in after the fee has accumulated will drop the LP quantity in inverse proportion to the accumulated fee even if they put the same quantity.

This can be summarized in a table as follows.

66666.png

5555.png

In conclusion, it has a very simple structure that allows existing users to take the fees incurred by changing the LP quantity of new users appropriately without changing the LP quantity of existing users.

Every time I look at the AMM structure, I often think that it is amazing, but the fee distribution is also calculated in a really simple and efficient way.

Long live uniswap, the first commercialized AMM!!

Coin Marketplace

STEEM 0.29
TRX 0.12
JST 0.032
BTC 59036.72
ETH 2970.23
USDT 1.00
SBD 3.73