Interacting with the Glue Protocol is the easiest DeFi lego tool for users, teams, and builders.
The protocol requires minimal data, which simplifies off-chain operations and enhances the user experience. This ensures usability even if the main or external interfaces are blocked. The minimal data requirement also enables smoother contract-to-contract interactions, eliminating the need for additional computation or off-chain logic to operate effectively. (To learn more about the Glue Design Decisions go to Glue Product Design and Lore and Architecture
write Interactions with Glue are:GlueStickThe function applyTheGlue is responsible for creating a new Glue contract for a given asset (address). This process makes the token "sticky" by associating it with a Glue address that can hold collateral.
<aside> ❗
Once you glue a token, remember to use the GlueStickERC20 for ERC20s and the GlueStickERC721 for ERC271s Enumerable.
</aside>
👇 For Detailed information about a**pplyTheGlue**
GlueAddressTo simplify adoption and avoid the need for additional implementation or coding for both new and existing apps, we chose not to include a specific Deposit function for sending assets to the Glue of a Sticky token. This eliminates complications for users and streamlines the process. To integrate Glue into your project’s economy or for users to donate to a project, all they need to do is transfer ERC20 tokens or ETH to the Glue address. It's that simple!
👇 For Detailed information about how to Glue Collateral
GlueAddressThe unglue function allows users to burn their sticky tokens and withdraw a proportional amount of the collateral held in the Glue contract.
The correct parameters to call the function are as follows:
collaterals: An array of token addresses representing the collateral to withdraw.amount: The amount of sticky tokens to burn.recipient: The address that will receive the withdrawn collateral.