ERC20 is the de facto standard for Ethereum tokens. It’s simple and widely adopted.
Yet the ERC20 standard doesn’t support some features that are key for governance. For instance, voting systems shouldn’t allow double voting, with a given token holder voting twice by sending their tokens to another address and voting again.
The MiniMe standard solves this problem by using checkpointing. This way, a voting app that ensure that token holders can only vote with the balance they had at the block when the voting started.
But, wouldn’t be ideal to combine the best of both worlds? ERC20 is simple and widespread, and MiniMe allows for secure votings.
So we have created a wrapper contract that allows wrapping an ERC20 token into a MiniMe token for interacting with Aragon.
It works the following way:
- The user holds the ERC20 token as they may normally do
- When the user wants to interact with the DAO (for example for voting), they lock any amount of tokens they want in the wrapper contract
- In exchange, the smart contract mints new wrapped tokens. Those tokens allow for safe voting and other interactions within the DAO
- If the user wants to get their ERC20 tokens back (for example for trading them), they unlock them from the wrapper smart contract. The wrapper burns the wrapped tokens and returns the locked ones to the user
This process may be done manually (by using the Contracts feature on MyCrypto, for example).
A tiny Aragon app can also be created to let users lock and unlock their ERC20 tokens via a simple UI. This app could be simplified version of a more advanced app created by MyBit that they use in their mainnet DAO.
- Wrapper smart contract: It’s just 143 lines including comments (around 100 without them)
- Complete codebase: Contains tests for the contract
Thanks to @facuspagnuolo for working on this use case, and to the MyBit team for their great usage of the Aragon platform and existing codebase