FlashLoan

Git Source

Author: EridianAlpha

This contract contains the functions for AavePM to execute a flash loan to repay debt and withdraw collateral.

Functions

_executeOperation

Flash loan callback function.

This function is called by the Aave pool contract after the flash loan is executed. It is used to repay the flash loan and execute the operation. The function is called by the Aave pool contract and is not intended to be called directly.

function _executeOperation(address asset, uint256 amount, uint256 premium, address initiator, bytes calldata)
    internal
    returns (bool);

Parameters

NameTypeDescription
assetaddressThe address of the asset being flash loaned.
amountuint256The amount of the asset being flash loaned.
premiumuint256The fee charged for the flash loan.
initiatoraddressThe address of the contract that initiated the flash loan.
<none>bytes

Returns

NameTypeDescription
<none>boolbool True if the operation was successful.