Glue's implementation of single flash loans, providing a secure and efficient borrowing mechanism. This implementation offers several key advantages:

Technical Implementation

<aside> šŸ’”

To use this function, you must use GlueERC20 or GlueERC721 contract of a specific Sticky Token. To better understand the Glue Ecosystem architecture and find the correct deployment addresses, visit visit Lore and Architecture | License & Deployments

</aside>

Technical Flow:

  1. Borrower callsĀ flashLoan()Ā for a specific amount of an asset from a Glue address
  2. Contract transfers tokens to borrower
  3. Executes borrower'sĀ onFlashLoan()Ā callback
  4. Verifies repayment of loan + 0.01% fee
  5. Reverts if repayment fails

Implementation Details

The implementation of Glue's Flash Loans are designed to provide a secure, efficient, and standardized borrowing mechanism. Single Flash Loan are designed to call a precompiled and simplified Glued Loan (more info Glued Loans, to start a Flash Loan you need:

Building a Glued Loan Receiver