[GUIDE] Using a vanilla ERC20 token with Aragon

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.

Resources:

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

8 Likes

If I already have MiniMe token, how do I pass it either into Aragon UI or into newInstance function of DemocracyKit? https://github.com/aragon/dao-kits/blob/master/kits/democracy/contracts/DemocracyKit.sol#L54

Hey! Do you want to use it for Voting, or use the Token Manager app as well? If just voting, then you can follow https://hack.aragon.org/docs/guides-custom-deploy#adding-a-voting-instance and just add a new voting instance to a blank DAO created with aragonCLI, and you pass it your MiniMe token address. Let me know if you run into any hiccups!

Token Manager is not needed, thank you very much for explanation, will try.

Are there plans to have this functionality added to the aragonCLI?

cc @gabi @danielconstantin

1 Like

Currently we can do:
dao exec <tokenwrapper-address> lock <amount>

Is not the best UX, but I think we can improve it instead of creating a command for each app.
We can look into the ABI and show the user what methods are available, the parameter information, etc.

I don’t know how soon we can get to that though…

3 Likes

I think we may also build a basic UI for this particular use case, since it seems like it may be a popular one

5 Likes

I have two questions on this:

  1. How could something like this work for tokens which are already locked to another contract (e.g. bonded to Livepeer’s Bonding Manager), and not held by the user, but instead helb by the contract on behalf of the user - i.e. a variation to “The user holds the ERC20 token as they may normally do”.

  2. How would a DAO which holds a balance of the ERC-20 token exercise its voting rights as part of such a mechanism. I guess this question also extends to DAOs which hold MiniMe voting tokens in other DAOs, and might not be specifically related to this proposal.

This will require using the Agent app (or another app which implements a similar interface). Currently that means interacting using the CLI, but https://frame.sh is working on functionality to enable users to add an instance of Agent as an account in Frame. This would effectively allow users to interact with dapps as they normally would… but the actions they take would actually be proposed to an organization.

2 Likes

I wonder, do you imagine this UI as part of the DAO or a whole page only for that purpose?

I think as part of the DAO would be the simplest