Smart Contracts with OpenZeppelin


OpenZeppelin offers templates for smart contracts. Using their templates is not only a good way to avoid common pitfall (such as overflows) when implementing common mechanisms (such as burning and minting tokens), but also it greatly simplifies audits.

For the CO, the most useful templates seem to be:

Also, for the initial tokens, it might be interesting to implement Token Vesting. An UI is available.

The upgradability is more difficult to implement. Several patterns have been drawn. OpenZepplin offers an Eternal Storage strategies.

What do you think about it?


Unfortunately I am a bit limited here by my weak knowledge of Smart Contract development. It seems to me that all make sense for CO:

  • Standard Tokens because even if we might end up implementing Security Tokens, it looks like all ST implementations are derived from ERC-20 tokens. So using Standard Tokens as a basis for a CO tokens makes sense.
  • Burnable Token and Mintable Token provide functions required for a bonded curve implementation
  • Ownable Token looks required to set the address of the Project Leader. It might probably be more complicated than that to implement in the end because most of the decisions cannot be taken unilaterally by the project leader but I think it’s a good start.
  • Token Vesting is required for pre-minted tokens (the initial supply).

Regarding upgradability, I would forget about it for the moment.