Flash Loans and Callbacks

Learn how Lotus flash loans and operation callbacks enable atomic strategies like leveraged positions, refinancing, collateral swaps, and liquidation flows.

Lotus exposes flash loans and optional callbacks on key protocol functions, enabling atomic strategies like leveraged positions, refinancing, collateral swaps, and liquidation integrations.

circle-exclamation

Flash loans and callbacks let you compose multi-step strategies into a single atomic transaction with no intermediate state risk.

Flash loans

A flash loan transfers assets to the caller, executes a callback, and requires repayment within the same transaction. Callbacks are also available on supply, repay, liquidate, and supply collateral. See Build → Flash Actions for developer guidance.

spinner

Callback support:

  • supply(): optional callback

  • repay(): optional callback

  • liquidate(): optional callback

  • flashLoan(): required callback

  • supplyCollateral(): optional callback

Constraints:

  • Callback must succeed

  • Must repay flash loan (exact amount, no fee)

  • No reentrancy allowed

  • Atomic: reverts on failure

See Also

  • Build → Flash Actions for developer guidance and code examples

  • Build → Recipes for canonical atomic flow patterns

  • Learn → Core Interactions for supply, borrow, and collateral operations

Last updated