getLiquidityPoolInfo
LiquidityPoolInfo struct for LiquidityPoolInput _input
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
function getLiquidityPoolInfo(struct IPriceAggregator.LiquidityPoolInput _input) internal view returns (struct IPriceAggregator.LiquidityPoolInfo)
LiquidityPoolInfo struct for LiquidityPoolInput _input
| Name | Type | Description |
|---|---|---|
| _input | IPriceAggregator.LiquidityPoolInput | LiquidityPoolInput struct with pool address and type |
function getTimeWeightedAveragePrice(struct IPriceAggregator.LiquidityPoolInfo _poolInfo, uint32 _twapInterval, uint256 _precisionDelta) internal view returns (uint256)
| Name | Type | Description |
|---|---|---|
| _poolInfo | IPriceAggregator.LiquidityPoolInfo | Liquidity pool info |
| _twapInterval | uint32 | TWAP interval in seconds |
| _precisionDelta | uint256 | precision delta of collateral |
function _getPoolTickCumulatives(struct IPriceAggregator.LiquidityPoolInfo _poolInfo, uint32 _twapInterval) internal view returns (int56[])
| Name | Type | Description |
|---|---|---|
| _poolInfo | IPriceAggregator.LiquidityPoolInfo | Liquidity pool info |
| _twapInterval | uint32 | TWAP interval |
function _tickCumulativesToTokenPrice(int56[] _tickCumulatives, uint32 _twapInterval, uint256 _precisionDelta, bool _isGnsToken0InLp) internal pure returns (uint256)
| Name | Type | Description |
|---|---|---|
| _tickCumulatives | int56[] | array of tickCumulatives |
| _twapInterval | uint32 | TWAP interval |
| _precisionDelta | uint256 | precision delta of collateral |
| _isGnsToken0InLp | bool | true if GNS is token0 in LP Inspired from https://github.com/Uniswap/v3-periphery/blob/main/contracts/libraries/OracleLibrary.sol |
