3. Build Flash Loan

Flash loan transaction manifest

A flash loan transaction typically interacts at least 3 times with components - to get, use and repay the loan. However, depending on the use case, the number of interactions might increase.

Therefore, on a high level, a flash loan transaction manifest can be broken down into:

  1. Getting a loan

  2. Using a loan

  3. Repaying a loan

Below a transaction manifest for a flash loan on Gable is illustrated:

Tailoring this transaction to your use case will require you to (1) fill in open fields:

  • <loan_amount>: the loan amount in XRD that you would like to receive.

  • <your_account_address>: the account address to which you would like to return the residual XRD of the transaction (you profit).

And (2) overwrite the 'use loan' section with your specific use case.

Note: no method call to “lock_fee” is required – the wallet will add this automatically.

Last updated