You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We will dive into integrating the Gnosis SafeSnap module and Kleros with an existing DAO. For this, you will need a Gnosis Safe (learn more about it [here](https://gnosis-safe.io/#getting-started)). For testing purposes, we are going to use the [Safe App in rinkeby](https://rinkeby.gnosis-safe.io/). We are also going to be using the tools available in the Kleros' [dao-module repository](https://github.com/kleros/dao-module), so clone it and create an .env file with your parameters as shown in the [sample file](https://github.com/kleros/dao-module/blob/main/.env.sample).
13
-
14
-
This guide will use the Rinkeby ETH Realitio v2.1 contract at [`0xa09ce5e7943f281a782a0dc021c4029f9088bec4`](https://rinkeby.etherscan.io/address/0xa09ce5e7943f281a782a0dc021c4029f9088bec4#code).
15
-
16
12
## Motivation
17
13
18
14
You might be wondering why do we need so many blocks to achieve decentralized governance. Let's imagine that your project's treasury and smart contracts are managed by a multisig owned by team members. Furthermore, its token holders can use the project's Snapshot space to vote proposals, which should be carried out if successful, technically feasible and aligned with the project's mission. The big question is how do token holders make sure that the multisig owners will act accordingly.
19
15
20
16
We can interpret this as a power play between an executive team performing actions and a legislative branch voting about what actions should be taken. The missing piece is a process secured by the equivalent to the judiciary power, which enforces the token holders decisions on-chain. Here is where SafeSnap and Kleros come in.
21
17
18
+
## Let's the Puzzle Together
19
+
20
+
We will dive into integrating the Gnosis SafeSnap module and Kleros with an existing DAO. For this, you will need a Gnosis Safe (learn more about it [here](https://gnosis-safe.io/#getting-started)). For testing purposes, we are going to use the [Safe App in rinkeby](https://rinkeby.gnosis-safe.io/). We are also going to be using the tools available in the Kleros' [dao-module repository](https://github.com/kleros/dao-module), so clone it and create an .env file with your parameters as shown in the [sample file](https://github.com/kleros/dao-module/blob/main/.env.sample).
21
+
22
+
The first part of the guide will use the Rinkeby ETH Realitio v2.1 contract at [`0xa09ce5e7943f281a782a0dc021c4029f9088bec4`](https://rinkeby.etherscan.io/address/0xa09ce5e7943f281a782a0dc021c4029f9088bec4#code).
23
+
24
+
In order to setup your DAO on Mainnet, jump to the [Mainnet Setup](#mainnet) section.
25
+
26
+
22
27
## Adding the SafeSnap Module
23
28
24
29
SafeSnap allows anyone to propose on-chain transactions that will be executed by the DAO. Whether each batch of transactions gets executed or not depends on the Realitio's outcome, based on the DAO's proposal rules. Everyone can participate in Realitio by providing an answer with a bond in ETH or in the DAO's token and request arbitration for disputed proposals.
@@ -32,22 +37,26 @@ Let's start by deploying the SafeSnap module.
32
37
33
38
## The Judiciary Branch
34
39
35
-
If someone thinks that the current answer submitted to Realitio is incorrect, instead of submitting the correct answer with a higher bond, it's possible to relay the final resolution to an arbitrator. So, who is the arbitrator?
40
+
When the proposal gets to the Realitio oracle, answers submitted to Realitio can be overwritten by other answers with a higher bond. Additionaly, it's possible to relay the final resolution to an arbitrator. So, who is the arbitrator?
36
41
37
42
When the SafeSnap's DAO module is deployed, the Gnosis Safe multisig is set as the default arbitrator. This means that, ultimately, the signers of the Gnosis Safe have full control of what gets executed and what not, because they can approve or reject a list of transactions no matter what was voted on Snapshot. Eventually, the ruling power should be given to an impartial third party that safeguards the DAOs written guidelines.
38
43
39
44
40
45

41
46
42
47
43
-
44
48
## Just use Kleros
45
49
46
-
In order to set Kleros as the judiciary power, i.e. the arbitrator, first go to "New transaction" and select "<> Contract interaction".
50
+
For testing purposes, we recommend to start using a centralized arbitrator, fully controled by the deployer address. To deploy a centralized abritrator together with a proxy contract that connects Realitio with the arbitrator, run:
Now we can set Kleros as the judiciary power, i.e. the arbitrator. First go to "New transaction" and select "<> Contract interaction".
47
55
48
56
49
57

50
58
59
+
51
60
Complete with the address of the SafeSnap module you deployed earlier, select the setArbitrator function from the dropdown and, in the arbitrator field, paste the address of the Realitio Arbitration Proxy contract. This proxy supports the Realitio interface and adds some features to the arbitration process, for example, allowing appeals to be crowdfunded.
@@ -60,15 +69,15 @@ The Safe signers still have control over the multisig and some privileges over t
60
69
61
70

62
71
63
-
Now we can say that the decentralization is completed. Your DAO has a trustless governance system. Let's go ahead and try create, dispute and execute a dummy proposal.
72
+
Now we can say that the decentralization is complete. Your DAO has a trustless governance system. Let's go ahead and try to create, dispute, rule and execute a dummy proposal.
64
73
65
74
## Take'em to court!
66
75
67
76
We can add a proposal to the module directly using hardhat tasks. If you want to set up a Snapshot space and integrate the SafeSnap plugin, check the [Snapshot integration](https://github.com/kleros/dao-module/blob/main/docs/setup_guide.md#snapshot-integration) section.
68
77
69
78
1. Add a dummy proposal with `yarn hardhat --network rinkeby addProposal --module <deployed_module_address>`. If you'd like to customize the proposal, modify the `sample_proposal.json` file as you wish.
70
-
1. Go to [reality.eth.link](https://reality.eth.link/app/) and look for the proposal. First, "Post" an answer and then "Apply for arbitration".
71
-
1. Go to [the centralized arbitrator UI](https://centralizedarbitrator.netlify.app/), expand the "Select" dropdown and paste the arbitration proxy address in the "Enter Custom Address" field. You should see one pending dispute.
79
+
1. Go to [reality.eth.link](https://reality.eth.link/app/) and look for the proposal. First, "Post" an answer and then "Apply for arbitration".
80
+
1. Go to [the centralized arbitrator UI](https://centralizedarbitrator.netlify.app/), expand the "Select" dropdown and paste the arbitration proxy address in the "Enter Custom Address" field. You should see one pending dispute. 
72
81
1. Expand the dispute item, unselect "Give an appealable ruling" and choose the ruling to give (Yes, No or Refuse to Arbitrate).
73
82
1. The arbitration doesn't automatically report the ruling to Realitio. To do so, run: `yarn hardhat --network rinkeby reportAnswer --module <deployed_module_address> --proxy <arbitration_proxy_address> --oracle 0xa09ce5e7943f281a782a0dc021c4029f9088bec4 --template 0x0000000000000000000000000000000000000000000000000000000000000dad`.
74
83
1. If the Kleros resolution is "No" or "Refuse to arbitrate", the proposal won't be executed. Otherwise, anyone can execute the transactions. In this latter case, run `yarn hardhat --network rinkeby executeProposal --module <deployed_module_address>`.
@@ -85,4 +94,6 @@ A good arbitrator should also be consistent over time, building jurisprudence as
85
94
86
95
The Kleros Court is currently used as the Judiciary branch of [the Kleros DAO, the Proof of Humanity DAO and the UBI DAO](https://governor.kleros.io/). Even though these DAO's use a different infrastructure that depends on the Kleros Governor, this is a good precedent of a well functioning decentralized governance system.
0 commit comments