PCL pools currently assert spread against price scale. If gap between internal oracle price and price scale is significant such swaps could possibly incur 20-25% spread according to internal calculations even tho it is fine from user’s perspective (they receive assets according to market price).
For example, current ASTRO - USDC.axl PCL pool state
This PR is meant to mitigate this issue and assert spread against current market price a.k.a. internal oracle price (EMA).
PCL pools currently assert spread against price scale. If gap between internal oracle price and price scale is significant such swaps could possibly incur 20-25% spread according to internal calculations even tho it is fine from user’s perspective (they receive assets according to market price).
For example, current ASTRO - USDC.axl PCL pool state
This PR is meant to mitigate this issue and assert spread against current market price a.k.a. internal oracle price (EMA).