Skip to main content

IGhoFlashMinter

Defines the behavior of the GHOFlashMinter.

The IGhoFlashMinter interface inherits the IERC3156FlashLender and IGhoFacilitator interfaces.

This page shows the events, write and view methods within the IGhoFlashMinter interface. The source code is available on GitHub.

Events

FeeUpdated

event FeeUpdated(uint256 oldFee, uint256 newFee)

Emitted when the percentage fee is updated.

NameTypeDescription
oldFee`uint256The old fee (in bps)
newFee`uint256The new fee (in bps)

FlashMint

event FlashMint(
address indexed receiver,
address indexed initiator,
address asset,
uint256 indexed amount,
uint256 fee
)

Emitted when a FlashMint occurs.

NameTypeDescription
receiveraddressThe receiver of the FlashMinted tokens (it is also the receiver of the callback)
initiatoraddressThe address initiating the FlashMint
assetaddressThe asset being FlashMinted. Always GHO
amountuint256The principal being FlashMinted
feeuint256The fee returned on top of the principal

Write Methods

updateFee

function updateFee(uint256 newFee) external

Updates the percentage fee. It is the percentage of the flash-minted amount that needs to be repaid. The fee is expressed in bps. A value of 100, results in 1.00%

Input Parameters:

NameTypeDescription
newFeeuint256The new percentage fee (in bps)

View Methods

CALLBACK_SUCCESS

Returns the required return value for a successful flashMint.

function CALLBACK_SUCCESS() external view returns (bytes32)

Return Values:

TypeDescription
bytes32The required callback, the keccak256 hash of 'ERC3156FlashBorrower.onFlashLoan'

MAX_FEE

function MAX_FEE() external view returns (uint256)

Returns the maximum value the fee can be set to.

Return Values:

TypeDescription
uint256The maximum percentage fee of the flashMinted amount that the flashFee can be set to (in bps)

ADDRESSES_PROVIDER

function ADDRESSES_PROVIDER() external view returns (IPoolAddressesProvider)

Returns the address of the Aave Pool Addresses Provider contract.

Return Values:

TypeDescription
IPoolAddressesProviderThe address of the PoolAddressesProvider

GHO_TOKEN

function GHO_TOKEN() external view returns (IGhoToken)

Returns the address of the GHO token contract.

Return Values:

TypeDescription
IGhoTokenThe address of the GhoToken

getFee

function getFee() external view returns (uint256)

Returns the percentage of each flash mint taken as a fee.

Return Values:

TypeDescription
uint256The percentage fee of the flash-minted amount that needs to be repaid, on top of the principal (in bps)