Choosing the right ERC20 for your business requirement

With so many types/choices to pick from, curious what others use/choose when you have to build a regulated ERC20 e.g. digitizing a physical asset

  • ERC20
  • ERC20Burnable
  • ERC20Capped
  • ERC20Detailed
  • ERC20Mintable
  • ERC20Pausable
  • IERC20
  • SafeERC20
  • TokenTimelock


1 Like

Hi @pkr,

A good place to start is the ERC20 API documentation

If I was creating an ERC20 token then I would use ERC20Detailed for name, symbol and decimals. As a side note, I would use decimals of 18 (unless I had a really good reason not to), see decimals documentation.

Whether you use a fixed supply or mint tokens (with or without a cap) depends on your intended tokenomics (including how you are distributing your tokens). You can also look at the Creating ERC20 Supply documentation.

For simple tokens (with no intended value), I tend to use a fixed supply to keep things simple, as there is no need for any roles.
For tokens used in the equivalent of a digital laundromat, you may want a mintable token (you may also want it to be burnable). Though it really depends on your use case.
Additionally there are multiple custom extensions, including:

For simple locking, I would use TokenTimelock though for vesting e.g. for project team tokens, then you could look at TokenVesting. For a crowdsale you may use both for different recipients.
Finally, there are some utilities to interact with ERC20 contracts in various ways.

  • SafeERC20 is a wrapper around the interface that eliminates the need to handle boolean return values.
  • TokenTimelock can hold tokens for a beneficiary until a specified time.

If you are considering a crowdsale, the suggest looking at the Crowdsale documentation.

You may also need to consider regulatory requirements in jurisdictions that you and your users are, and obtain appropriate advice on this.

You could also look at creating ERC777 tokens (no need to do approve and transferFrom in two separate transactions). See the ERC777 documentation for details. ERC777 also has the concept of operators, which depending on requirements may be needed.

Finally, for digitizing a physical asset you may want to consider using a non-fungible token if your physical assets are potentially unique.

See the ERC721 documentation.

1 Like