kip | title | author | discussions-to | status | type | created |
---|---|---|---|---|---|---|
KIP-99 |
Reality.eth v2.1 as an arbitrable |
Jaybuidl (@jaybuidl) |
Draft |
Arbitrable |
2023-04-08 |
This proposal intends to provide an explicit specification describing how the Kleros protocol handles arbitration requests originating from the Reality.eth v2.1 protocol.
The Reality protocol is the most complex integration of the Kleros protocol so far. Prior to this proposal, there has been a lack of a comprehensive specification.
Contributing to the complexity of this integration are: the dynamic nature of the questions and possible answers, an extra reserved answer ("answered too soon"), and a different encoding of the "invalid/refused to arbitrate" answer.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 and RFC 8174.
Reality | Kleros |
---|---|
bool | ✅ maps to single-select |
uint | TBC |
single-select | ✅ |
multiple-select | TBC |
datetime | TBC |
The answers must include:
{
"id": "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF",
"title": "Answered Too Soon",
"reserved": true
}
externalDisputeID = realityQuestionID
- Retrieve the Reality contract address: it is the address calling into
arbitrable.requestArbitration()
- Querying the event
LogNewQuestion
for the requestedrealityQuestionID
on the Reality contract. - Retrieve the reality template by querying the event
LogNewTemplate
fortemplate_id
on the Reality contract. - Execute the template:
rc_question = require("@reality.eth/reality-eth-lib/formatters/question.js");
rc_question.populatedJSONForTemplate(LogNewTemplate.question_text, LogNewQuestion.question);
{
realityAddress = callerOf(arbitrable.requestArbitration());
realityTemplateID = LogNewQuestion.template_id;
realityQuestionID = LogNewQuestion.question_id;
realityUser = LogNewQuestion.user;
realityType = populatedJSONForTemplate.type;
realityCategory = populatedJSONForTemplate.category;
realityLang = populatedJSONForTemplate.lang;
realityFormat = populatedJSONForTemplate.format;
realityTimeout = LogNewQuestion.timeout;
realityOpeningTime = LogNewQuestion.opening_ts;
realityCreationTime = LogNewQuestion.created;
realityNonce = LogNewQuestion.nonce;
realityFrontendUrl = frontendUrl + metadata.realityAddress + "-" + metadata.realityQuestionID;
}
realityRuling = bytes32(klerosRuling - 1);
TODO: realitio()
pointing to Reality, metadata indicating template restrictions, terms of services, cross-chain arbitration.
TODO: the rationale should flesh out the specification by describing what motivated the design and why particular design decisions were made, as well as any alternative designs that were considered.
TODO: an implementation must be completed before any KIP proceeds to “Last Call” status.
TODO
All KIPs must include a discussion of the security implications/considerations relevant to the proposed change as well as proposed mitigations. A KIP cannot proceed to “Final” status without a sufficient security review from the core team.