The Glue protocol is compatible with any ERC20 or ERC721 (Enumerable) token. After a Glue is set and a token becomes "Sticky," users can attach any ERC20 token or ETH to it. Holders of Sticky tokens can then detach these assets automatically by burning their Sticky tokens. The amount released is proportional to the number of tokens burned.
Permissionless Design
- No limitations or requirements: Anyone can create a Glue for any ERC20 or ERC721 token without owning or controlling the original token contract.
- No setup process: Creating or using a Glue requires no complex configuration or approval process.
- Open access: Once created, any user can interact with a Glue to add collateral or unglue (burn) tokens.
- No central authority: The protocol operates on smart contract logic, without any central authority controlling or gatekeeping its use.
- No data required: Users don't need to perform complex calculations through the interface. The smart contract handles all computations. Users simply input the amount of Sticky tokens to burn and provide addresses for ungluing assets.
- No implementation required: To start using Glue and sending assets, simply perform a standard ERC20 or ETH transfer.
- No owner: Glues don't require an owner to function. Only token holders can withdraw or manage assets from a Glue by burning to unglue!
- Data Availability: Data Availability: Glue contracts are designed to provide valuable data for both interfaces and external contracts, which can be used for various purposes.
- Expandability: The simplicity of Glue contracts is designed to easily expand functionalities by building on top. They're designed to be top-tier DeFi building blocks.
- Gas Efficiency: Gas Efficiency: Glue contracts are designed to be industry leaders in gas efficiency, considering the complexity of their internal math. This allows builders to easily create protocols on top without being hindered by gas costs. Additionally, Glue contracts are designed to return fundamental data, which can simplify the gas requirements for applications interacting with them.
Simplified Lego Money Development
Glue introduces several UX decisions to simplify developers' lives without compromising security and decentralization:
- Collateral Imprecision: When you call Glue for
batchUnglue
, unglue
, or gluedLoan
, the operation won't fail if a requested collateral isn't held, is duplicate or has an extractable amount of 0. This design empowers bots and complex applications to operate without spending gas to check exact collateral balances for each Glue before performing multi-operations. The Glue protocol atomically understands these situations and efficiently skips invalid operations.
- SelfMath on GluedLoans: When you call a
gluedLoan
, you don't need to specify exact amounts to loan from each Glue. The protocol automatically draws from each requested Glue's usable amount until reaching the total loan amount, skipping remaining Glues once the target is met. Glue also sends you the full list of refundable amounts and addresses to complete the flashloan easily without complex calculations.
- SelfMath on Unglue: When burning Sticky Tokens using either
unglue
or batchUnglue
, you don't need to calculate the withdrawn collateral amount yourself. These calculations are handled internally by the Glue. Simply provide the addresses of the collaterals you want to unglue (you can include more addresses than what's actually held), and the Glue will determine the exact proportional amount you can extract.
- SelfLearning: The Glue learns the Sticky Asset-based dynamics at the first unglue interaction. It detects if the ERC20 respects the totalSupply standard, if ERC20s or ERC721s are burnable, and if they have hooks. Users don't need to configure any of these parameters when they
applyTheGlue
.
- GluedHooks: Hooks only work for SAN (Sticky Assets Native)—assets specifically designed in their smart contracts to interact natively with GluedHooks. GluedHooks extend Glue functionalities by executing functions at two key moments: when the Sticky Asset is received by the Glue and before collaterals are sent to the withdrawer. With Hooks, you can implement features ranging from simple fees to complex DeFi applications when holders unglue their Sticky assets. To make your asset native, you can implement IGluedHooks or build directly on top of the StickyAsset Library.
Frequently Asked Questions (FAQ)