This is the third and last article on a series on how to use the Ethereum portfolio to create your own autonomous organizations. On First post, we detailed how to create a tokenand on the Second, we have shown how to generate a digital democracy controlled by these tokens. Now we are going to make the circle and create a token control by the organization!
We will modify the token contract to allow it to be struck by your DAO. So save the address of your current DAO in a note of note (pay attention to the icon) and Take this source code And you know the exercise: Contracts> Deploy a new contract> Source of solidity> Pick Contract
You can fill out the settings as you wish (yes, the emojis are authorized on the champs of the chain), but you will notice a new field which did not exist before: Central Minter. Here, add the address of your newly created democracy contract.
Click Deploy and wait for the transaction to be recovered. After having at least two confirmations, go to your democracy contract and you will notice that it now has one million of your new parts. Now, if you access the Contracts tab, you will see that there is a new DAO Dollar (Administration page) contract on your collection.
Select the “Minttoke” function to your right, then put any address that you have as “target”, then the quantity of new mints that you want to create from the thin air in their account. Press “execute” but Do not press on Send! You will notice that there is a warning indicating that the transaction cannot be executed. It happens because only the Minor (which is currently defined on the DAO address) can call this function and you call it with your main account. But the call code is the same, which is why you can simply copy it.
Instead, Copy the contract execution code from the “data” field And put it aside on a notebook. Also get the address of your new “Mint” contract and save it somewhere.
Now come back to the democracy contract and create a new proposal with these parameters:
- Like the beneficiaryPut the address of your new token
- Leave Etheramount empty
- On job description Just write a little description that you register for new parts
- On TransactionbyTecodeGlue the bytecode that you have recorded from the data field in the previous step
In a few seconds, you should be able to see that the details of the proposal. Unlike other fields, transactionbytecode can be extremely long and therefore expensive to store on the blockchain. Thus, instead of archiving it, the person who executes the call later will provide bytecode.
But this of course creates a security hole: how can a proposal be voted without the real code being there? And what prevents a user from executing a different code after the proposal was voted? This is why we keep the hatching of bytecode. Scroll down a little on the list of “Read from the contract” functions and you will see a proposal verification function, where anyone can put all the function parameters and check if they correspond to the one voted. This also guarantees that the proposals are only executed if the hatching of bytecode corresponds exactly to that of the code provided.
It is an older code, but it checks
Now, everyone can vote on the proposal and after the passage of the voting period, anyone with the right Bytecode can ask the votes to be recorded and the contract to be executed. If the proposal has enough support, the newly created parts should appear on Alice’s account, as if it were a transfer of the zero address.
Why a transfer of zero address? Because doing the opposite, sending a part to 0x00 is a way to destroy it effectively, but more importantly, because it says it on the contract code. You can change this as you prefer.
And now, you have a central minister contract which exists only on the blockchain, being the test of fraud, because all their activities are recorded transparently. Mint can also take traffic parts by simply sending the parts it owes to zero, or by freeze the funds on any account, but it is Mathematically impossible For mint to do one of these actions or generate more parts without the support of enough mint shareholders.
Possible uses of this DAO:
- The creation of a universal stable cryptocurrency. By controlling the total quantity of coins in circulation, Mint shareholders can try to create an asset whose value does not fluctuate too wildly.
- Timing sustained active certificates: parts can represent an external currency or articles that mint has and can prove to its shareholders and chip holders. When mint acquires or sells more of these assets, it can burn or generate more assets to ensure that their digital inventory will always correspond to their true counterpart
- Digitally supported assets. Mint can contain ether or other digital currencies based on Ethereum and use it to support the value of circulating currencies
Suggestions for suggestions
There are several ways of which this structure can still be improved, but we will leave it as an exercise and a challenge to the reader:
- Currently, votes are made by shareholders on the basis of freely negotiable token. Can rather be adhesive based on the invitation, each member obtaining a single vote (or perhaps use quadratic vote Or liquid democracy))?
- What about other voting mechanisms? Perhaps the vote instead of being Boolean could be a more flexible arrangement: you could vote to postpone the decision, or you can make a neutral vote but always count for the quorum
- Currently, all proposals have the same period of debate. Can you make this proportion the proposed value transfer? How would you calculate it to the tokens?
- Can you create a better token that can be created automatically by sending it ether, which can then be recovered by burning the token, at a fluctuating market price?
- What can he have or do the DAO, in addition to the tokens?