πŸ”₯Burn mechanisms

Explanation of Burn mechanisms of Lazy Token and usage of a wipe key.

One important aspect of Lazy Token is the ability to "burn" them, in other words permanently remove them from circulation. This makes Lazy Tokendeflationary. A burn event will occur when using Lazy dApps and Solutions so each time you use LAZY for utility the supply will shrink. It is possible to burn your LAZY directly at the treasury Smart Contract should you wish; no idea why you might want to but web3 = choices!

To ensure that burn mechanisms are executed in a secure and transparent manner, Lazy Tokenwas created with a "wipe key" managed by the smart contract acting as the treasury. This means that the smart contract is empowered as the key that is used to burn tokens, and it is the only entity that can authorize the burning of tokens. The team has no access to the key and can burn tokens in the same way as anyone else only from their own account. On ETH you might be used to seeing an ERC20Burnable implementation which is effectively what we have been able to achieve on Hedera with protections to ensure only you can burn your LAZY.

The great advantage of this approach is that it allows for a high degree of transparency and accountability. The smart contract is deployed on the Hedera Network, and has been open-sourced so anyone can inspect the code. Everyone can verify that the smart contract is functioning correctly and that tokens are being burned in accordance with the rules set forth in the contract.

In Lazy Token case, the relevant Burn mechanism rules are set in this part of the code:

/// Operation to wipe fungible tokens from caller's account
/// This method os open to all as the address for burning is the msg.sender the call
/// can only burn tokens they own
/// @param token The token address
/// @param amount The number of tokens to wipe
/// @return responseCode The response code for the status of the request. SUCCESS is 22.
    function burn(address token, uint32 amount)
        external
        returns (int responseCode)
    {
        (responseCode) = HederaTokenService.wipeTokenAccount(
            token,
            msg.sender,
            amount
        );

        if (responseCode != HederaResponseCodes.SUCCESS) {
            revert("burn failed");
        }
        emit TokenControllerMessage(
            "BURN",
            msg.sender,
            amount,
            "Burn (from user) complete"
        );
    }

As can be seen above, the smart contract or dApp using Lazy Token doesn't specify the account to burn - it supplies only the calling wallet (msg.sender - a special variable provided by the EVM representing the wallet that called the function). That means ONLY the holder can action the burn mechanism on their own tokens by asking the smart contract to use it's authority as the wipe key.

Code Source

If you want to inspect the Lazy Token code source, you can consult it since it has been open-sourced. If you have any questions, join Discord and raise a ticket to ensure it gets the focus needed. If we have enough interest, then the team would be glad to do a Q&A to run people through the architecture and design decisions.

$LAZY token sources have been Open Sourced

Last updated