Skip to content

ICenterPrice ​

Git Source

Functions ​

centerPrice ​

Retrieves the center price for the pool

This function is marked as non-constant (potentially state-changing) to allow flexibility in price fetching mechanisms. While typically used as a read-only operation, this design permits write operations if needed for certain token pairs (e.g., fetching up-to-date exchange rates that may require state changes).

solidity
function centerPrice(address token0_, address token1_) external returns (uint256);

Returns

NameTypeDescription
<none>uint256price The current price of token0 in terms of token1, expressed with 27 decimal places