We developed the Expansions Pack to build upon Glue, adding both Sticky Assets Native Contracts (which interact with Glued) and Flash Loans.
To implement the Expansions Pack you can go on Github or easily install via npm
npm install @glue-finance/expansions-pack
The Expansions Pack contains two major pure contracts you can implement in your project to simplify the development experience:
Implementing Sticky Asset in your new token or NFT provides a complete, simplified native integration with Glue. It reduces development time through pre-built integrations and eliminates the need to study Glue extensively. Additionally, it expands your asset's Glue functionalities with hooks—programmable actions that execute during the unglue
process.
🪝 Hooks: Implementing StickyAsset allows you to expand the unglue functions via hooks.
ℹ️ Native ContractURI (ERC-7572): You can add asset information—such as logo, icon, and other details—directly through an on-chain URL.
💁♀️ Simplified Integrations: All direct implementations to interact with Glue are pre-coded and easily callable through existing functions. This allows you to focus on your specific logic without needing to be an expert in the Glue Protocol.
😎 Native Functionalities: Implementing the Sticky asset lets your token or NFT inherit all Glue functionality, allowing you to call unglue, flashLoan, check collaterals, and more directly from your asset address
<aside> 💡
To learn more about Sticky Asset and how to use it go to
</aside>
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:
👁️🗨️ Advanced Integrations: Native integrations with simplified functions like maxLoan
, multiMaxLoan
, getFlashLoanFeeCalculated
, and getLoanPlan
to check loan status before executing it.
🥹 Simplified Requests: Loan functions and logic are built in—just input the amount, asset, and Glues you want to borrow from..
🤖 Auto-Repayment: Both simple repayment logic for a single FlashLoan and multi-Glue Glued loans are automated—you only need to implement the loan logic, and we handle the rest.
🧠 Rich Data: All necessary information like repayment amounts and received amounts are automatically passed to _executeFlashLoanLogic
, the function where you implement your arbitrage logic
<aside> 💡
To learn more about the Glued Loan Receiver and how to use it go to
</aside>
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.
At Glue, we're focused on making the development experience as easy and friendly as possible. We want to empower the next generation of builders to create their own expanded tools and assets on top of Glue without needing to be experts in how Glue works internally. We've created a series of Mocks to simplify the testing and development lifecycle, reducing your development and testing time by a x10.
With Mocks, you can quickly test protocol responses using one-to-one interface calls that offer custom programmability for your specific testing scenarios.
<aside> 💡
To learn more about Glued Mocks and how to use it go to
</aside>