When the data reported by/to a decentralised oracle is debatable, users can vote for one of the proposed data values or a new value until the consensus is achieved.
A decentralised oracle is used to feed data from the external world into the blockchain. Decentralised oracles, especially the ones using human oracles, rely on different data sources to report the data. Both the data source and oracle owners may have diverse and/or conflicting interests. Further, data sources and off-chain components of an oracle could be compromised. Consequently, the data reported by multiple oracles may not agree or could be ambiguous. The lack of consensus on the correct data leads to a dispute.
How can an application reach consensus when the data reported by an oracle is disputed?
- Fairness – Every participant in a blockchain network has an equal right to access and manipulate the blockchain. Each participant’s decision on what data are valid should have the same weight as the others.
- Consensus – The decentralised oracle comprising multiple participants with different opinions needs to reach an agreement to make a decision. Participants also need to agree on which of the many paths leading to an outcome based on their preferences (e.g., simple or qualified majority) is taken.
- Transparency/Auditability – The process used to resolve the dispute should be deterministic and auditable so that the outcome can be reproduced from the same input.
Voting mechanisms commonly used to resolve real-world disputes could be adopted to solve this issue. When the data originally reported by a decentralised oracle is disputed, voting could be used among a group of oracle participants to make a collective decision. As a blockchain provides equal rights to every participant (i.e., each has the same level of ability to access and manipulate the blockchain), each participant could propose what data should be considered as valid and/or submit their vote as a transaction.
First, anyone with a blockchain account that does not agree with the data submitted to the decentralised oracle can propose another value as the tentative answer. Then every participant votes for a value of their preference by sending a transaction. The voting transaction is signed by the private key of the participant that represents the right of the participant to make a decision. Typically, the majority rule is used to select the proposed data with the most votes. A vote could also be weighted by the resources owned by the participant, like the application-specific tokens. In such cases, the majority could be decided based on the highest aggregated weight. If the dispute cannot be resolved with a single round of voting (no majority is achieved), multiple rounds of voting could be adopted while eliminating the least voted options.
One possible extension to the solution is to support secret voting by leveraging the encrypting data on-chain pattern. The voters can encrypt their choice when casting a vote. During the vote-counting phase, they can release the key to decrypt their vote. However, by linking the voting transaction with other transactions from and to the account, the anonymity of the user might be compromised. A more privacy-preserving way for the voter is to create a new account for voting only.
- Equality – The voting method allows the participants to use their right to participate in decision making.
- Consensus – A decentralised oracle with multiple participants with different preferences can reach a consensus through voting.
- Collusion – Participants might collude during voting to gain various benefits.
- Duplication – A vote is associated with the blockchain account. A smart contract can help to avoid duplicated votes from the same blockchain account, e.g., by counting only the most recent vote. However, as a public blockchain is pseudonymous, participants can own multiple blockchain addresses to gain additional voting power, which is similar to the Sybil attack at the network layer.
- Time – Voting may take a long time due to long voting/dispute time windows and multiple rounds of voting. Also, delayed transactions and long confirmation times increase delay.
- Decentralised oracle leverage voting to decide on the data fed from the external world
- Security deposit pattern could be used to stake an asset during voting
- Multiple authorisation is an alternative form of voting that can be used with smart contract function execution
- The voting mechanism is used in DAOs (Decentralised Autonomous Organisations)
- In Gnosis prediction market, a voting mechanism is used if someone challenges the reported outcome. This voting mechanism allows users to vote on what the correct outcome was by betting Ether on that outcome
- In Augur prediction market, a similar voting mechanism is used to resolve disputes on the outcome reported by oracles