Expand description
Size estimation utilities for DeFi pool profiler.
This module provides functions for estimating optimal trade sizes based on target price impact/slippage levels using binary search and liquidity analysis.
Structs§
- Estimation
Config - Configuration for size estimation algorithms.
- Size
ForImpact Result - Detailed result of a size-for-impact search.
Functions§
- estimate_
max_ size_ for_ impact - Estimates the maximum trade size for a given impact target.
- size_
for_ impact_ bps - Finds the maximum trade size that produces a target slippage (including fees).
- size_
for_ impact_ bps_ detailed - Finds the maximum trade size with detailed search diagnostics.
- slippage_
for_ size_ bps - Calculates the slippage in basis points for a given trade size.