💸Price Impact

One of the key factors everyone should consider in yield farming

Price Impact is the influence of a user's individual trade over the market price of an underlying asset pair. It is directly correlated to the amount of liquidity in the liquidity pool of DEXes / Automated Market Makers (AMMs). Price Impact can be especially high for illiquid markets/pairs, and may cause a trader to lose a significant portion of their funds after the swapping.

Price impact occurs due to the pricing model of AMMs. As the ratio of the assets in the pool changes, one asset becomes more expensive and the other becomes cheaper. The supply of one asset increases and the supply of the other asset decreases. As such, the asset that is decreasing in volume becomes even more expensive.

The more that the ratio of the assets shifts, the more that the price changes. Price impact is a significant issue in sparse liquidity pools where it's easier to change this ratio compared to a pool with very large liquidity.

Price Impact Calculation and Examples

This calculation uses the constant product formula to determine how much of one asset should be swapped for another asset.

Constant product formula:

Constant Product must remain the same before and after a trade occurs.

Sample Pool's Starting Information

  • USDC = 2,000,000

  • CRO = 10,000,000

  • Constant Product = 20,000,000,000,000

  • CRO/USDC Market Price = 0.2

Example 1: Swap 10,000 USDC to CRO

After swap

  • USDC = 2,010,000 (10,000 USDC was added from the swap)

  • Constant Product = 20,000,000,000,000 (always unchanged)

  • CRO = 9,950,249 (constant product / new USDC amount)

CRO received = 49,751 (original CRO amount - new CRO amount; 10,000,000 - 9,950,249)

Price per CRO paid = 0.201 USDC

Price impact = 0.50%

Example 2: Swap 100,000 USDC to CRO

After swap

  • USDC = 2,100,000 (100,000 USDC was added from the swap)

  • Constant Product = 20,000,000,000,000 (always unchanged)

  • CRO = 9,523,810 (constant product / new USDC amount)

CRO received = 476,190 (original CRO amount - new CRO amount; 10,000,000 - 9,523,810)

Price per CRO paid = 0.210 USDC

Price impact = 5.00%

As shown in the above examples, Price Impact during swapping is dependent on the proportion of swap size and pool size. Every step (opening position, rebalancing, capital protection, liquidation, closing, etc.) of Strategy / Yield farming involves swapping between tokens, and its Price Impact effect could be very significant. Thus, having conducted plenty of reserach, Single Finance has taken preventative measures to further safeguard our users' assets.

Our Measures Against Price Impact

1. Stable Swap

Stable Swap platforms differentiate themselves from traditional AMM/DEX by offering a lower trading fee and minimal slippage on stablecoin trades due to the algorithmic difference in the model.

Stable Swap platforms adopt a less convex curve than traditional AMM, reducing the Price Impact of every trade. By directing stablecoin swapping via a Stable Swap platform, Single Finance is glad to help retain more equity for our users, who can now earn more and risk less.

2. Estimation on Price Impact Before Taking Action

When a user is opening a new Strategy or leveraged yield farming position, a real-time estimation on Price Impact is displayed next to Assets Supplied. If the to-be-supplied asset amount is relatively significant to the pool size, high Price Impact is expected. Taking the estimated figure into consideration, users may choose to open the position by batch or reduce the position size to avoid high Price Impact.

On the withdrawal page, users can also find the Price Impact estimation, as well as a suggestion for withdrawal portion so as to control the Price Impact level to be within 1%. Alternatively, user may also choose to withdraw under "Minimize Trading".

Last updated