When a token swap occurs through a pool, the supply of an asset decreases while that of the other increases. Therefore, price changes occur that are adjusted by that algorithm called an automated market maker (AMM) discussed before. This is the time where liquidity pools play their best role as they do not need a professional, centralized market maker to manage the prices of assets. Liquidity providers simply deposit their assets into the pool and the smart contract takes care of the pricing.