Skip to main content
Not available on production. The flashloan materialiser and the lifi.flashloanRepay op are disabled on https://composer.li.quest, and the published @lifi/composer-sdk doesn’t export materialisers.flashloan. A compile that uses them is rejected. Contact us if you need early access.
flashloan sources a flow input by borrowing the amount from a flashloan provider instead of pulling it from the signer. The borrowed amount is made available to the flow as its input, so the rest of the flow can spend capital the user doesn’t hold upfront. Because a flashloan must be repaid in the same transaction, a flow that borrows via this materialiser must settle the loan (principal plus the provider’s fee) before it ends, with one or more lifi.flashloanRepay ops. If the loan isn’t repaid, simulation reverts. Config:

Example

The shape of a flow that borrows USDC through an Aave V3 flashloan. It needs an early-access build of the SDK that exports materialisers.flashloan: