Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Standard ERC20" -- new approach to tokens: Objects from universal factory, not a specification. #2290

Closed
nmushegian opened this issue Sep 17, 2019 · 2 comments
Labels

Comments

@nmushegian
Copy link

nmushegian commented Sep 17, 2019

For a long time, ERC20 was an ABI definition masquerading as a semantic spec. This means some "ERC20" tokens are now technically non-compliant even though the developers were following what the standard said at the time.

When the semantics were finally standardized, it revealed all the warts in the design. ERC20 tokens are surprisingly hard to build and use correctly.

Experience building token system shows that nearly all custom dapp logic lies when to mint/burn, and almost no dapp has a concept of "logic on transfer". In practice, every single dapp has its token re-audited to ensure it doesn't violate the same basic rules in every project.

Meta-proposal: Design by github thread is a bad idea

Proposal: A universal token factory that constructs a common "Token" type.

The token:

  • has a "controller" which is just a regular simple "owner" address. I propose "controller" because people tend to anthropomorphize "owner" and forget that single-signature control is a special case. The controller can update via setController. It really is just an "owner".
  • controller can call mint/burn/move ("move" is a backdoored "transfer")

The factory:

  • DOES fire an event recording new tokens,
  • does NOT assign a numeric ID
  • does NOT have a registry.

Do not dare try to launch the "first" "official" one of these without bytecode-level formal verification. You know who you are.

Consider this OP an evolving document, I will revise it with a concrete spec and rationale for each decision above.

Maybe if all the right people tweet about it we could even call these "ETokens" or "eTokens".

@github-actions
Copy link

There has been no activity on this issue for two months. It will be closed in a week if no further activity occurs. If you would like to move this EIP forward, please respond to any outstanding feedback or add a comment indicating that you have addressed all required feedback and are ready for a review.

@github-actions github-actions bot added the stale label Nov 20, 2021
@nmushegian
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant