The Glued Loan Receiver simplify the management and development of Flash Loans and Glued Loans Get Flash-Loans from collateral, our library to natively interact with Glue and take advantage of native Glue functions. To start up your Loan Receiver implement Expansions Pack to your project:

To implement the Expansions Pack you can go on Github or easily install via npm

npm install @glue-finance/expansions-pack

After import Expansions Pack to your project you just need to import GluedLoanReceiver into your asset:

import {GluedLoanReceiver} from "@glueExpansionsPack/contracts/base/GluedLoanReceiver.sol";

// If you need external interactions import also IStickyAsset Interface
import {IGluedLoanReceiver} from "@glueExpansionsPack/contracts/interfaces/IGluedLoanReceiver.sol";

// Enounce Sticky asset in your contract
contract MyArbitrageBot is .., .., GluedLoanReceiver {...}

🎉 Congratulations! You've successfully implemented Sticky Asset! Here are all the advantages you now have access to:

By implementing GluedLoanReceiver, you can drastically simplify your flash loan development and focus on complex arbitrage logic. You won't need to worry about implementing loan requests and repayments—whether for single flash loans or multiple Glue glued loans.

Here are the advantages of using GluedLoanReceiver in your contracts:

🧮 Plus, We've Made Math Simpler for You

Expansions pack comes with Glued Math integrated, our math library that simplifies classic math operations in Solidity programming. It includes ultra-precise fixed-point math operations and tools to adjust decimal places between different tokens and ETH.

We built Glue and Glue Expansions using GluedMath.sol, and it's been transformative! Both GluedLoanReceiver and StickyAsset come with GluedMath's capabilities built in, making it easy to implement these functions in your own logic.

How to use GluedLoanReceiver to simplify your Flash Loans development experience with Glue

Frequently Asked Questions (FAQ)