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 initial trade size bound for a target price impact.
- size_
for_ impact_ bps - Finds a trade size for a target slippage, including fees.
- size_
for_ impact_ bps_ detailed - Finds a trade size with detailed search diagnostics.
- slippage_
for_ size_ bps - Calculates the slippage for a given trade size, where 10,000 basis points is 100%.