Prices and Fee
Last updated
Was this helpful?
Last updated
Was this helpful?
BSC protocol is based on the βConstant Productβ formula: where and are reserve balances, and k is the invariant that remains unchanged during the trading operation. This formula underlies how the exchange price is calculated.
For example, the case where the initial reserves are of token AAA and of token BBB and the user sells aaa of token AAA. If no fees are charged, then the received amount of is:
Then the price is tokens AAA per token BBB. With fee charge things will be slightly different:
The price is then tokens AAA per token BBB. The fee goes to the pool, increases the reserves, and thereby increases the invariant. It entails the growth of the value underlying each share and becomes the source of LP providers' gains.
If price altering results in significant differences between internal and external market prices, arbitrage opportunities will push the price back to the rational value.