Protection Contract
Last updated
Last updated
ERC20 Protection
The ERC20 Protection Contract is designed to be as lightweight and gas efficient as possible. It is likely the most used type of protection contract. Multiple ERC20 protection contracts can be deployed (each having their selection of tokens and time lapse). Once deployed the ERC20 protection contract is not updatable. Approval for each protected ERC20 token is required after protection contract deployment.
Once registered Heimdall monitors for activity (transfers originating from the primary wallet) on the protected tokens and resets the time lapse accordingly. On time lapse expiration Heimdal triggers the automatic assets transfer.
By completing the registration & approval process, users grant the Protection Contract permission to transfer funds from the primary wallet when needed, such as when the dormancy period ends. There's also a function for emergency token withdrawal in case of wallet compromise, allowing users to withdraw tokens preemptively.
Certain tokens, like proof-of-receipt staked tokens, cannot be transferred by the Protection Contract because it cannot unstake or withdraw tokens from pools.
Approval transactions specify a token amount, which defaults to the user's wallet balance at approval time. If the user sells some tokens, the remainder stays protected; if they buy more, only the initial amount is protected unless they update the Protection Contract with a new approval transaction for the additional amount. It is advisable to set up an allowance larger than the wallet balance in order to avoid having to send further approval transactions.
A technical note: Approval functions are specific to ERC-20 tokens. Since Ethereum is not ERC-20, the user must convert Ethereum to Wrapped Ethereum (WETH) for protection. If WETH is converted back to Ethereum, it is no longer protected.
NFT Protection
The NFT Protection Contract secures assets by executing approval transactions for each asset a user elects to protect. This consolidates the assets, each receiving approval displayed on the dashboard. Once all assets are selected and approvals are completed, Heimdal monitors the userβs last transaction until the time lapse expires.
By completing this process, users grant the Protection Contract permission to transfer tokens from the primary wallet when needed, such as when the time lapse expires. There's also a function for emergency token withdrawal in case of wallet compromise, allowing users to withdraw tokens preemptively.
Certain tokens, like proof-of-receipt staked tokens, cannot be transferred by the Protection Contract because it cannot unstake or withdraw tokens from pools.