What is Price Impact?
Valery avatar
Written by Valery
Updated over a week ago

Price Impact is the influence that swapping has over the market price of the underlying asset pair. It is directly related to the number of funds in the pool. When you execute a swap through DeFi Wallet, you interact directly with a liquidity source that offers the best price for the trade you made. DeFi Wallet does its best to optimize each trade before committing your executed swap.

Price Impact is affected by:

  • The size of your trade relative to the size of the liquidity pool;

  • The algorithm of the relevant swap protocol

    • The constant product formula: x * y = k. Imagine a scenario where x and y are the reserves of two tokens: A and B. In order to withdraw some amount of token A, one must deposit a proportional amount of token B to maintain the constant k before fees. For this reason, the pool can always provide liquidity no matter how large a trade/swap is.

Example:

When a user buys ETH from a DAI/ETH pool, they reduce the supply of ETH and add to the supply of DAI. This results in an increase in the price of ETH and a decrease in the price of DAI. How much the ETH price moves depends on the size of the trade relative to the size of the pool.

If the trade assumes a smaller proportion of the pool, then there will be a smaller Price Impact and less slippage, and vice versa.

Did this answer your question?