Skip to main content

Module size_estimator

Module size_estimator 

Source
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§

EstimationConfig
Configuration for size estimation algorithms.
SizeForImpactResult
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%.