Skip to main content

Flash Loans

Operations → Flash Loans (Composer)

Lead type: ComposerCommands.FLASH_LOAN.

The sub types are defined by the following enum:

FlashLoanIds Enum

ValueNameDescription
0MORPHOMorpho Blue flash loans
1BALANCER_V2Balancer V2 (covers Swaap)
2AAVE_V3Aave V3 (covers many forks)
3AAVE_V2Aave V2 (covers many forks)

To encode an operation, the caller has to append this data to the call.

abi.encodePacked(
uint8(ComposerCommands.FLASH_LOAN),
uint8(FlashLoanIds.[FlashLoanProvider]),
...params
)

Alternative sources can be Uniswap V4 and Balancer V3. These are triggered via the lead type: ComposerCommands.GEN_2025_SINGELTONS. We elaborate on these later.

Specific lenders