amm_price_impact
Compute price impact and average price for trades on an AMM pool. Determine how large a trade the pool can absorb before quoting, using human-readable trade sizes.
Instructions
The depth / slippage table for one AMM pool: the realized average price and price impact for each of a list of trade sizes, exact to the wei. Use this to reason about how large a trade a pool can absorb before quoting. Sizes are human 'NUMBER SYMBOL' strings. Requires the optional flox-py dependency.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pool | Yes | A pool spec: {venue, token0:{symbol,decimals}, token1:{symbol,decimals}, ...venue params}. | |
| sizes | Yes | Trade sizes as 'NUMBER SYMBOL' strings. |