Skip to content

How To Deploy A DAO [non devs]

Legionof7 edited this page May 3, 2016 · 7 revisions

DAO Wiki - Reliable

With great power comes great responsibility - Peter Parker's Uncle Ben

Deploying a DAO can seem very technical, and without a tutorial, it would be very difficult for a non-Dev to accomplish. If you are comfortable with a CLI you can try our other tutorial. If not then this tutorial will walk you through the steps required to deploy your own DAO only via a UI. If you run into complications, please add a short description of your issue at the end of this wiki so that we can help solve your problem and prevent others from getting stuck in the same way. Remember this is a WIKI, feel free to edit anything you think could be said more clearly!

Together we can DAO-ify the world.

To Do Wish List:

  1. Add screen shots
  2. Add detail
  3. Check for correctness grammatically and technically

Pre-requisites:

Understand how to work with the Ethereum Wallet on the Testnet and understand how to work with DAOs. It is HIGHLY recommended that you begin with this blog post and at least get to "The WORK!" section.

Other blog posts that will help you understand the inner workings of the DAO are here, here, and here, and having Christoph Jentzsch's White Paper available for reference will be incredibly helpful.

##1. Gather the information you will need to Deploy your DAO.

For your first DAO, it is always best to practice on the testnet, but either way, if you are deploying a practice DAO for fun or a DAO to start your own country, you will need to decide the following instantiating inputs for your DAO before you begin.

  1. curator The Ethereum address of the Curator for your DAO (typically a multisig wallet contract)
  2. proposal deposit The amount (in wei) to be paid as a deposit for a proposal. After a vote in the community Slack channel, it was decided that 2 Ether (2 * 10^18 wei) would be a reasonable number to start with, this can be changed by the DAO later through a proposal.
  3. min tokens to create The minimum number of DAO tokens (in its base unit) which need to be created during the Creation phase (e.g. 5.000.000 DAO = 5 * 10^22 base unit DAO)
  4. closing time The Unix time at which the creation phase ends, use http://www.unixtimestamp.com/ to determine this integer.
  5. private creation The only address which is allowed to create tokens. For a public DAO Creation, this field is left empty.

##2. Create a Text file of the applicable smart contracts.

There are 4 smart contract files that make up the DAO. It will be necessary to comment out or delete the "import" lines in the contracts. Merge these files together in this order:

  1. ManagedAccount.sol (https://github.com/slockit/DAO/blob/master/ManagedAccount.sol)
  2. Token.sol (https://github.com/slockit/DAO/blob/master/Token.sol)
  3. TokenCreation.sol (https://github.com/slockit/DAO/blob/master/TokenCreation.sol)
  4. DAO.sol (https://github.com/slockit/DAO/blob/master/DAO.sol)

Save this text file as a .sol extension type and if you want to edit the rules of your DAO, this is where you would do it.

##3. Compile your DAO

Technically, the DAO's smart contracts need to be compiled using a Solidity Compiler. The resulting bytecode, appended with the construction parameters using the Ethereum Contract ABI (also known as a JSON interface), needs to be set as the data field of a transaction with no receiver specified (empty array, not zero), which needs to be sent to the Ethereum network. There are many complicated ways to do this, and if you are an Ethereum developer, that is all you need to know.

If you didn't understand any of the above paragraph, that's ok! If you are a non-dev it is actually very easy to do the above steps thanks to Fabian Vogelsteller and Alex an de Sande's Ethereum Wallet. Once it is installed and synced, go to "Contracts" on the top right side and choose "Deploy New Contract".

There you can delete the default "MyContract" code in the "Solidity contract source code" field and paste in your text file created in Step 2. The Ethereum Wallet will freeze for a up to a minute or more on slower computers. This is normal. Be Patient! Let it think, this is a very complicated contract!

##4. Deploy the DAO_Creator Contract

In step 3, the Ethereum Wallet compiled your DAO contract, but your DAO is not yet deployed. To store the code you created in step 2 immutably for the rest of time on a blockchain you will have to use the helper contract DAO_Creator.

On the right side you can pick a contract to be deployed. Choose DAO_Creator and scroll down to click the blue "Deploy" button. This will deploy the DAO_Creator contract to the blockchain. After the block with this transaction is mined, the address of the contract can be seen as the receiver in the "latest transaction" list (by clicking on the identicon of the address). Please copy this address and store it. I stored mine commented out at the top of the text file that holds my merged DAO smart contracts.

Alternatively, you can us the DAO_Creator at 0x4a574510C7014E4AE985403536074ABE582AdfC8 (this is for version 1.0 of the contracts)

##5. Deploy the DAO: Repeat Steps 3 and 4.

Now that your customized DAO_Creator helper contract has been deployed on the blockchain, you can deploy your DAO. To do that you again need to compile your text file created in Step 2.

Go to "Contracts" on the top right side and choose "Deploy New Contract". There you can delete the default "MyContract" code in the "Solidity contract source code" field, paste in your text file.

Now we can go through the same steps as in Step 4 but instead of picking the DAO_Creator we pick the DAO contract. This contract needs to be deployed with several constructor parameters which need to be set as mentioned in Step 1 with one addition:

  • curator The Ethereum address of the Curator for your DAO (typically a multisig wallet contract)
  • dao creator Address of the DAO creator which was just created in the previous step
  • proposal deposit The amount (in wei) to be paid as a deposit for a proposal. After a vote in the community Slack channel, it was decided that 2 Ether (2 * 10^18 wei) would be a reasonable number to start with, this can be changed by the DAO later through a proposal.
  • min tokens to create The minimum number of DAO tokens (in its base unit) which need to be created during the Creation phase (e.g. 5.000.000 DAO = 5 * 10^22 base unit DAO)
  • closing time The Unix time at which the creation phase ends, use http://www.unixtimestamp.com/ to determine this integer.
  • private creation The only address which is allowed to create tokens. For a public DAO Creation, this field is left empty.

After every value is set, the DAO can be deployed and the address can be retrieved in the same manner as explained above for the DAO_Creator contract. The address of the contract will be seen as the receiver in the "latest transaction" list (by clicking on the identicon of the address).

Congratulations. If you were able to complete these steps, the DAO you created is now in it's Creation phase.

If you had issues, please state them below.

##Can't get contract to compile

"delete or comment out the 'import' lines" solved my issue.

Clone this wiki locally