| Constant Factor AMM
Last updated
Last updated
Anyone can become a liquidity provider (LP) on Hyperswap by depositing an equivalent value of both tokens in a pool. For example, if you wish to provide liquidity to the ETH/USDC pool, you would deposit both ETH and USDC in equal value. In return, you receive liquidity provider (LP) tokens, which represent your share of the pool. LPs earn trading fees on every swap made in the pool, typically 0.3% per trade. These fees are added to the pool, increasing its total value and the value of the LP tokens. To withdraw liquidity, LPs can redeem their LP tokens for the underlying assets, along with their proportional share of the accrued fees.
A swap on Hyperswap V1 is the process of exchanging one ERC-20 token for another. Users can initiate swaps directly from their wallet by interacting with the Hyperswap Router.
Prices are algorithmically determined by the ratio of tokens in a given liquidity pool. When a swap occurs, the relative quantities of the two tokens change, which updates the price. The larger the trade, the greater the price impact (slippage) due to the constant product formula.
For example:
A large trade on a small liquidity pool will result in a larger price movement. A small trade on a large liquidity pool will result in a minimal price movement.
When a swap is made, the price of the tokens in the liquidity pool adjusts based on the constant product formula mentioned earlier. A 0.3% is applied to each swap.