Skip to content

Design choice #28

@rya-sge

Description

@rya-sge

The Solidity version of CMTAT has make some design choice due to Ethereum ecosystem and EVM limitation (mainly contract code size).

It could make sense to make different choice for the Cairo implementation.

Here some open point:

Freeze

To be compatible with ERC-3643, the freeze functionality is implemented with only one function: setAddressFrozen which takes the target address and the frozen status (true/false).

However, for non-EVM blockchains, it could make clearer and makes more sense to separate the freeze and unfreeze (or thaw) functionality with two separates and distinct functions, such as:

freeze(address targetAddress)
unfreeze(address targetAddress)

ForcedBurn/forcedTransfer:

In the standard burn function, it is not possible to burn token from a frozen wallet. CMTAT offers a dedicated function forcedTransferwhich allows to force a transfer or a burn. If the forcedTransfer function is not available, the alternative is to implement only the function forcedBurn.

This is what is done for the CMTAT light version which does not include forcedTransfer. You can also decide to implement both. In this case, we suggest that only forcedBurncan burn tokens and not forcedTransfer. With the CMTAT Solidity version, when forcedTransfer is available, we do not implement forcedBurn to reduce smart contract code size, but this limitation is not necessary present with other blockchains.

See cmtat-framework

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions