Hi. I have managed to add a test liquidity pool over bsc testnet. I am basically forking pancakeswap, so I do not understand how do we actually set the price for our cake token so that it can be swapped with bnb? What parameters have to be adjusted in what way for that purpose.
Hi,
Sorry, I am not familiar with the BSC-Chain and pancakeswap, maybe you should ask for help in their forum: Home | Binance Chain Forum
I think
Pairs act as automated market makers, standing ready to accept one token for the other as long as the “constant product” formula is preserved. This formula, most simply expressed as
x * y = k, states that trades must not change the product (
k) of a pair’s reserve balances (
xand
y). Because
kremains unchanged from the reference frame of a trade, it is often referred to as the invariant.
So if at first, you add 100 token and 100 eth
, then later, if you input 10 token, you will get
100(token) * 100(eth) = (100+10)(token) * (100-?)(eth)
So, in this case, the ?
means how much eth you can get when you sell 10 token. It is AMM rather than PMM.