Is it possible to burn specific amount of ERC-20 token occasionally on some specific web hook event? For example: On a blog site when a new post is published on specific tag, then n
amount of token will be burned. Also there should a max amount limit of token that can burn on a single day? How do I achieve this?
Add a comment
|
1 Answer
Yeah this is possible. But for that you must have stored the Private Key of the Burner Wallet in the webhook server, which is risky. So you can use something like multisig or timelock in that case. Anyway the process is as following,
- Create the server with available webhooks for your need.
- In the logic of the webhook, conditionally add the smart contract call to burn the tokens. For that, the token must support burning or you can just send tokens to the dead wallet considering burnt.
- Store private key safely to call the burning function. Add extra layer of security to the token contract and/or if you a using a separate contract for store burnable tokens by adding multisig, timelock.