BalancerOracleAdapter
This contract is an oracle that calculates the BLP price of a Balancer pool, assuming that the OracleReader has access to all the price feeds for the underlying assets.
State Variables
poolAddress
Address of the Balancer pool this oracle adapter reads from
decimals
Number of decimals used for price values returned by this oracle
Functions
constructor
Note: oz-upgrades-unsafe-allow: constructor
initialize
Initializes the BalancerOracleAdapter. This function is called once during deployment or upgrading to initialize state variables.
Parameters
description
Returns the number of decimals used by the oracle.
Returns the description of the oracle.
Returns
version
Returns the version of the oracle.
Returns
getRoundData
Not implemented.
latestRoundData
Returns the latest round data. Calls getRoundData with round ID 0.
Returns
_calculateFairUintPrice
Calculates the fair price of the pool in USD using the Balancer invariant formula: https://docs.balancer.fi/concepts/advanced/valuing-bpt/valuing-bpt.html#on-chain-price-evaluation.
Parameters
Returns
_authorizeUpgrade
Function that should revert when msg.sender
is not authorized to upgrade the contract. Called by {upgradeTo} and {upgradeToAndCall}.
Parameters
Errors
NotImplemented
Error thrown when calling an unimplemented function
PriceTooLargeForIntConversion
Error thrown when a price value is too large to be safely converted to int256
Last updated