#Ether 7: Video walkthrough of DAO simple proposal tutorial

When you send money from one account to another, you are interacting with human. In the world of Ethereum that may not be the case.
Decentralized Autonomous Organization(DAO) sounds very complex and difficult but it’s basically like a bot on a chat system.

Image for post
Image for post
Example requesting hubot chat bot (https://github.com/shokai/hubot-rss-reader) to get rss list

A bot reacts to your request based on the certain predefined rules. In case of Ethereum, it enables you to interact with the DAO contract with money (with their own currency Ether). You can deposit pool of money and each member of DAO can propose and vote how the money should be spend. You can code your contract to make the decision in the democratic manner without human intervention. This may open up a lot of possibility and I am super excited to be bale to experience how it works.

In this video walk through of the Ethereum’s DAO tutorial, we only cover the basic proposals as follows.

1. Create a ‘Congress’ contract (just like you created the token contract)
2. Watch someone else’s contract using ‘interface file’ and ‘address’.
3. Add a member to the contract.
4. Send some money to the `Congress` account as deposit.
5. Propose to send some of the deposit to another account.
6. A member vote for the proposal.
7. Once the deadline is passed, the proposal can be executed.

There are a couple of things I learnt while going through the tutorial.

8. An error is raised when non member tries to vote. The rule is enforced because it goes through onlyMembers modifier as part of newProposal function.

Image for post
Image for post

If you look into the onlyMembers code, you can see that it throw if msg.sender is not the member.

It is very powerful to be able to write a code that allows you to pool and distribute money with total strangers without any authorities. At the same time, I think there are possibilities (or you may call bugs) when a contract goes into unexpected deadlock scenario and money cannot be taken out from the contract at all.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store