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
Copy file name to clipboardExpand all lines: developer/arbitration-development/erc-1497-evidence-standard.md
+37-12Lines changed: 37 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,12 +89,30 @@ In the case of our Evidence Standard, MetaEvidence is the context while Evidence
89
89
\
90
90
In order to provide flexibility for all different types of disputes, and to try to keep minimal information on the chain, we decided to create standardized JSON objects that can be hosted anywhere and fetched by an interface to display a dispute. Below we provide some examples. For more information on what each field does, take a look at the [standard specification](https://github.com/ethereum/EIPs/issues/1497).
We have already discussed what MetaEvidence is, so let’s take a look at how a piece of MetaEvidence might actually look and how it would be used. Each dispute has one piece of MetaEvidence that is used to give all of the contextual information for a contract that might be disputed. MetaEvidence should be created at the same time as the agreement so that it can be impartial. The only restriction on MetaEvidence is that it must be created before a dispute can be raised in the smart contract.\
We have already discussed what MetaEvidence is, so let’s take a look at how a piece of MetaEvidence might actually look and how it would be used. Each dispute has one piece of MetaEvidence that is used to give all of the contextual information for a contract that might be disputed. MetaEvidence should be created at the same time as the agreement so that it can be impartial. The only restriction on MetaEvidence is that it must be created before a dispute can be raised in the smart contract.
95
+
96
+
The fields in this MetaEvidence JSON are as follows:
97
+
98
+
*`category`: The category that the dispute belongs to. All values are accepted here, but it's good to align it with other past disputes of the same kind for consistency.
99
+
*`title`: A title to describe what the dispute is about. Can be constant for all disputes from your dApp.
100
+
*`description`: Text to describe the situation of the case. It can also be static for all cases, in which you will just have a generic description that describes what to look out for in these cases.
101
+
*`question`: This is question posed to the jury after they review all the facts, documents and evidences of the case.
102
+
*`rulingOptions`:
103
+
* type: Can be one of the following values:
104
+
*`single-select`: the jurors select one answer among the provided options.
105
+
*`multiple-select`: the jurors can select any number of the provided options.
106
+
*`uint`: the jurors input an unsigned integer.
107
+
*`int`: the jurors input a signed integer.
108
+
*`string`: the jurors enter a string. String must fit into `bytes32`.
109
+
*`precision`: only applicable for ruling types `int` and `uint` to indicate the number of decimal places a ruling contains.
110
+
*`titles`: an array of the options available to the jurors. NOTE: the sequence of the titles is important as they map directly to the rulings you get when the Arbitrator responds to your Arbitrable using the `rule()` function.
111
+
*`descriptions`: the description of the `rulingOption` titles.
112
+
*`fileURI`: The URI that leads to the primary document of the case, which is a natural language contract, policy, or primary document that is the basis of the dispute. See [this section](../../integrations/types-of-integrations/1.-dispute-resolution-integration-plan/#2.-write-a-good-dispute-policy) on the role of the primary document and how to write a good one.
113
+
*`evidenceDisplayInterfaceURI`: The URI to a display interface that should be used to render the facts of a case in an iframe by the Arbitrator. 
114
+
115
+
Here's an example of a MetaEvidence JSON: 
98
116
99
117
```
100
118
{
@@ -118,9 +136,16 @@ Here's an example of MetaEvidence JSON:
118
136
}
119
137
```
120
138
139
+
Below you will find a diagram that shows how the elements in the MetaEvidence JSON get displayed on the [Court](https://court.kleros.io/cases/1213) and [Dispute Resolver](https://resolve.kleros.io/cases/1213) interfaces.
140
+
141
+
<figure><imgsrc="../../.gitbook/assets/metaevidence_diagram.jpg"alt=""><figcaption><p>A screenshot of <ahref="https://resolve.kleros.io/cases/1213">Case #1213 on resolve.kleros.io</a>, showcasing all the important elements in the MetaEvidence JSON of this case.</p></figcaption></figure>
142
+
143
+
#### Additional information about the evidenceDisplayInterfaceURI
144
+
121
145
The `evidenceDisplayInterfaceURI` can be used to display dynamic information in an iframe on the court interface about each case, including the details of the disputants, images or any other related information. There are no hard limits to the amount of content that can be displayed here, though a rule of thumb is to keep this page under 360px in height to make it easily readable on the court interface.
122
146
123
-
When loading the iframe, the `evidenceDisplayInterfaceURI` will be called with a URL-encoded JSON string as the payload, with the following keys to allow the page to display and retrieve content dynamically:
147
+
\
148
+
When loading the iframe, the `evidenceDisplayInterfaceURI` will be called with a URL-encoded JSON query string as the payload, with the following keys to allow the page to display and retrieve content dynamically:
124
149
125
150
*`disputeID`
126
151
*`chainID`
@@ -132,18 +157,18 @@ When loading the iframe, the `evidenceDisplayInterfaceURI` will be called with a
132
157
*`arbitrableJsonRpcUrl`
133
158
*`jsonRpcUrl`
134
159
135
-
Here is an example of the URL used by the iframe on the Arbitrator interface:
160
+
Here is an example of the URL with query string used by the iframe on the Arbitrator interface:
Below you will find a diagram that illustrates how all the elements above translate to the [Court](https://court.kleros.io/cases/1213) and [Dispute Resolver](https://resolve.kleros.io/cases/1213) interfaces.
143
-
144
-
<figure><imgsrc="../../.gitbook/assets/metaevidence_diagram.jpg"alt=""><figcaption><p>A screenshot of <ahref="https://resolve.kleros.io/cases/1213">Case #1213 on resolve.kleros.io</a>, showcasing all the important elements in the MetaEvidence JSON of this case.</p></figcaption></figure>
167
+
{% hint style="info" %}
168
+
Pro-tip: To avoid having to create a new MetaEvidence JSON and pin it to IPFS prior to every dispute, you can use just a static MetaEvidence JSON, and use a `evidenceDisplayInterfaceURI` that dynamically displays different information based on the query string. 
It is also essential in many types of disputes that the participants have a chance to show their viewpoint and give reasons why they believe they are right. Therefore there needs to be a way for an Arbitrator to receive Evidence. The Evidence JSON file includes the following properties:
0 commit comments