Enables cross-chain arbitration for Realition (Reality.eth) on xDAI or other AMB-compatible networks using Kleros as arbitrator.
- Alice requests arbitration on the main chain paying the arbitration fee to the ETH proxy and indicates the current answer she deems to be incorrect.
- The ETH proxy communicates the request (questionID, currentAnswer) to the xDAI proxy through the AMB.
- The xDAI proxy looks at the current answer on Realitio:
- If it is the same as the one pointed by Alice and it is not final then:
- Notify Realitio of the dispute.
- Notify the ETH proxy through the AMB.
- Otherwise, if it became a different answer then:
- Notify the ETH proxy through the AMB.
- The ETH proxy refunds Alice. END
- If it is the same as the one pointed by Alice and it is not final then:
- At this point Realitio has been notified of arbitration. However arbitration fees might have changed:
- If the fees stayed the same (most common case) then:
- Create a dispute on Kleros Court.
- If the fees have decreased then:
- Create a dispute on Kleros Court.
- Refund Alice of the difference.
- If the fees have increased, then the arbitration request will fail:
- Refund Alice of the value paid so far.
- The ETH proxy notifies the xDAI proxy through the AMB that the arbitration failed to be created.
- The xDAI proxy notifies Realitio of the failed arbitration. END
- If the fees stayed the same (most common case) then:
- The Kleros court gives a ruling. It is relayed to the xDAI proxy through the AMB.
- If the ruling is the current answer, Bob, the last answerer, is the winner. END
- If it is not, Alice is the winner. END
See contracts/README.md.
Each directory at the root of this repository contains code for each individual part that enables this integration:
bots/
: service to automate some steps of the flow which otherwise would required manual intervention from users.- Notice: while this is a centralized service, it exists only for convenience. Users can fulfill the role of the bots if they wish to.
contracts/
: Smart contracts to enable cross-chain arbitration for Realitio (Reality.eth). Learn more.dynamic-script/
: allows fetching the dynamic content for the arbitration, as described by ERC-1497: Evidence Standard.evidence-display/
: display interface that should be used to render the evidence for arbitrators, as described by ERC-1497: Evidence Standard.