Skip to content

Problem: un-intuitive semantics with werc20 #807

@yihuang

Description

@yihuang

We reviewed the werc20 precompile in MantraChain. While it has merits, its drawbacks may outweigh the benefits because of the un-intuitive non-standard semantic of it:

  • The semantic is not the same as weth contract, because of how balance change, which is risky if developers try to use it as drop-in replacement for weth contract.
  • The semantic is not even like any other erc20 tokens, because the balance can automatically changed when native value transfer happens..

Basically, the werc20 token balance can change without any erc20 transfer calls, or the native balance can change without any native value transfer calls, these behaviors might be surprising for developers that come from normal EVM compatible chains.

This section in moonbeem doc describe a concrete security issue related to werc20 behavior.

Proposal

Since we'll refactoring dynamic erc20 dynamic precompiles, we can remove werc20 along the way, to simplify the system overall.

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