Skip to main content

compare_pool_profiler_detailed

Function compare_pool_profiler_detailed 

Source
pub fn compare_pool_profiler_detailed(
    profiler: &PoolProfiler,
    snapshot: &PoolSnapshot,
) -> PoolProfilerComparison
Expand description

Compares a pool profiler’s internal state with on-chain state and classifies mismatches.

Sqrt price can differ when replay is event-scoped but the RPC snapshot is block-scoped. Fee protocol can differ until SetFeeProtocol events are indexed and applied during replay, leaving the profiler value lagging the on-chain one. Accrued protocol-fee balances can differ when per-step rounding during replay accrual diverges from the on-chain accumulator. These mismatches are non-blocking when tick, liquidity, ticks, and positions all match.

§Panics

Panics if the profiler has not been initialized.