Skip to main content
Library to abstract liquidity pool operations such as fetching observations, calculating TWAP, etc. Currently supports Uniswap V3 and Algebra V1.9 liquidity pools

getLiquidityPoolInfo

Returns a LiquidityPoolInfo struct for LiquidityPoolInput _input

Parameters

getTimeWeightedAveragePrice

Calculates the time-weighted average price of a liquidity pool over a given interval

Parameters

_getPoolTickCumulatives

Fetches tickCumulatives data from the pool. Calls the appropriate oracle function based on the pool type

Parameters

_tickCumulativesToTokenPrice

Returns TWAP price (1e10 precision) from tickCumulatives data

Parameters