How Is the Price of Assets Maintained within an Automated Market Maker (AMM) Pool?
The price is maintained by a constant function formula, such as x · y = k, where x and y are the quantities of the two assets in the pool, and k is a constant. When a trader buys one asset, they reduce its supply and increase the other's, which algorithmically adjusts the price ratio to reflect the trade.