Comment on page
OracleModule
uint256 UNIT
1e18 scale
uint256 GHO_DECIMALS
Number of decimals in the GHO token
address AAVE_ORACLE
Address of the Aave Price Oracle
address GHO
Address of the GHO token
constructor(address _oracle, address _gho) public
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
Name | Type | Description |
---|---|---|
collateral | address | Address of the collateral |
feeAmount | uint256 | Amount of fees |
Name | Type | Description |
---|---|---|
[0] | uint256 | uint256 : Amount of collateral |
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
Name | Type | Description |
---|---|---|
collateral | address | Address of the collateral |
collateralAmount | uint256 | Amount of collateral |
Name | Type | Description |
---|---|---|
[0] | uint256 | uint256 : Amount of fees |
Last modified 3mo ago