How is price determined?

Price is determined by the number of tokens in each pool.The smart contract maintains a constant function: x*y=k, in which x = token1, y = token2, k = a constant number. Each swap takes place by replacing some of the tokens with a certain number of the other token. As k remains unchanged, balances of the tokens will be updated accordingly, which leads to changes in prices.

Last updated