Problem: un-intuitive semantics with werc20
- Dominant language
- Go
- Stars
- 164
- Forks
- 213
- Avg merge
- 3d 58m
- Merged PRs (30d)
- 12
Description
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](https://docs.moonbeam.network/learn/core-concepts/security/#setting-a-value) 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.
Contributor guide
Assessment
This issue has not been assessed yet.