DexConversionPriceCL ​
Inherits:DexConversionPriceGetter, ChainlinkOracleImpl
returns the reserves conversion price fetched from Chainlink feeds
State Variables ​
RESERVES_CONVERSION_PRICE_MULTIPLIER ​
solidity
uint256 internal immutable RESERVES_CONVERSION_PRICE_MULTIPLIER;
RESERVES_CONVERSION_PRICE_DIVISOR ​
solidity
uint256 internal immutable RESERVES_CONVERSION_PRICE_DIVISOR;
Functions ​
constructor ​
for multiplier and divisor: a Fluid ChainlinkOracle returns the price in token decimals scaled to 1e27 e.g. for USDC per ETH it would be 3400e15 USDC if price is 3400$ per ETH. But the Dex internally would have a price of 3400e27. So for that example the multiplier would have to be 1e12 and the divisor 1.
solidity
constructor(
ChainlinkOracleImpl.ChainlinkConstructorParams memory reservesConversion_,
uint256 reservesConversionPriceMultiplier_,
uint256 reservesConversionPriceDivisor_
) ChainlinkOracleImpl(reservesConversion_);
Parameters
Name | Type | Description |
---|---|---|
reservesConversion_ | ChainlinkOracleImpl.ChainlinkConstructorParams | |
reservesConversionPriceMultiplier_ | uint256 | The multiplier to bring the fetched price to token1/token0 form as used internally in Dex. |
reservesConversionPriceDivisor_ | uint256 | The divisor to bring the fetched price to token1/token0 form as used internally in Dex. |
_getDexReservesConversionPriceOperate ​
solidity
function _getDexReservesConversionPriceOperate() internal view override returns (uint256 conversionPrice_);
_getDexReservesConversionPriceLiquidate ​
solidity
function _getDexReservesConversionPriceLiquidate() internal view override returns (uint256 conversionPrice_);
getDexConversionPriceFluidOracleData ​
Returns the configuration data of the DexConversionPriceFluidOracle.
solidity
function getDexConversionPriceFluidOracleData()
public
view
returns (uint256 reservesConversionPriceMultiplier_, uint256 reservesConversionPriceDivisor_);
Returns
Name | Type | Description |
---|---|---|
reservesConversionPriceMultiplier_ | uint256 | The multiplier for the reserves conversion price. |
reservesConversionPriceDivisor_ | uint256 | The divisor for the reserves conversion price. |