flashLoan

This method enables users to request flash loans from Dexfai.

Function

function flashLoan(
    address _token, 
    uint _tokenAmount, 
    uint _wethAmount,
    address _to, 
    bytes calldata _data
) external;

Parameters

ParameterDescription

_token

An ERC20 token address. Token must have already a pool.

_tokenAmount

The amount of tokens for the flash loan.

_wethAmount

The amount of weth for the flash loan.

_to

The address of the recipient that receives the flash loan.

_data

the additional bytes data used for the flash loan.

Last updated