OracleModule

UNIT

uint256 UNIT

1e18 scale

GHO_DECIMALS

uint256 GHO_DECIMALS

Number of decimals in the GHO token

AAVE_ORACLE

address AAVE_ORACLE

Address of the Aave Price Oracle

GHO

address GHO

Address of the GHO token

constructor

constructor(address _oracle, address _gho) public

getCollateralAmount

function getCollateralAmount(address collateral, uint256 feeAmount) external view returns (uint256)

Get the amount of collateral for a given amount of fees

Calculates the amount of collateral matching the given amount of fees based on current prices

Parameters

Return Values

getFeeAmount

function getFeeAmount(address collateral, uint256 collateralAmount) external view returns (uint256)

Get the amount of fees for a given amount of collateral

Calculates the amount of fees matching the given amount of collateral based on current prices

Parameters

Return Values

Last updated