Building up with Interfaces
Simply ERC1155 Interfaces allow maintainers to build on top of their version of yield-bearing Staked tokens, g-derivatives.
Designed and implemented by Geode.fi Developers, they allow your token to be used with the full functionality of a ERC20 token:
To provide extensive scalability to the implementation of g-derivatives, Interfaces provide some superuser powers for the maintainers.
Interfaces are able to mutate user balances without requiring any permissions. By allowing any contract that is approved by the maintainer to be a default implementation for your Staking Pool, you can build a whole protocol on top of it.
Mostly interfaces require a built-in approval process like ERC20 (approve/permit) or ERC721 (setApprovalForAll) to prevent other contracts from mutating your user's balances.
Because of the super powers that are allocated to Interfaces, maintainers should develop these contracts with caution.
2. Interfaces can bypass the ERC1155 requirements while other non-compatible contracts can not receive them.
Since most of the DeFi implementations are not built considering the needs of ERC1155 standard, Interfaces allow your version of ERC1155 to be compatible with any contract within DeFi.
Your protocol can use the underlying staking data for different purposes, or it may need to be mutated by different contracts for your user's needs. gAVAX and gETH allow the usage of multiple interfaces at once so a new interface doesn’t require a migration.
function setInterface(
address _Interface,
uint256 _id,
bool isSet }
Once you have finished implementing your contract and have deployed it, simply call the setInterface function from Portal. To activate your Interface the isSet parameter should be true.
setInterface( {address of your Interface}, {ID of your Staking Pool}, true }
Once you have finished using your old interface, simply call the setInterface function from Portal. To activate your Interface isSet parameter should be false.
setInterface( {address of your Interface}, {ID of your Staking Pool}, false }
Interfaces do not require any migration period for your users.
Underlying data of balances can be directly used with the new Interfaces, since it is stored in THE erc1155. However if you have any data stored in your previous implementation, you might need to migrate it.
It is recommended to wait enough time before deactivating for the sake of your users that locked their tokens within the old Interface in another contract.
DO NOT FORGET to deactivate your old Interface once the migration period is over.
Last modified 3mo ago