Glued Loans are an advanced, gas-optimized system enabling users to borrow from multiple Glues in a single transaction. This system offers maximum flexibility by allowing users to handle the repayment logic themselves, making it ideal for complex operations and special token types. With Glued Loans, you can manage tax-tokens and ETH, utilize the entire liquidity of an asset in the Glue ecosystem in one transaction, and develop flexible, advanced functionalities.

You have complete freedom to use the collateral, implementing highly gas-efficient strategies without restrictions. Just remember to return the correct amount! The only requirement is on the Glue balance—not on how you repay the loan.

<aside> đź’ˇ

This function is from the GlueStickERC20 or the GlueStickERC721. To better understand the Glue Ecosystem architecture and find the correct deployment addresses, visit Lore and Architecture | License & Deployments

</aside>

Technical Flow:

  1. Borrower calls gluedLoan() to multiple glues for a specific amount of an asset from the GlueStickERC20 or GlueStickERC721
  2. Contract calculates optimal loan distribution across selected Glues
  3. Executes loans from multiple Glues
  4. Passes control to borrower’s executeOperation() function
  5. User implements custom repayment logic
  6. Verifies repayment of loans + 0.01% fee
  7. Reverts if repayment fails

Technical Implementation:

Building a Glued Loan Receiver