Source of Errors

Published by Mario Oettler on

In this topic, we explain the sources of errors that can occur in blockchain oracles. Errors can occur in every stage of the reporting phase.

Faulty Data Sources

If data sources provide wrong data, reporters pick them up and submit them to the oracle. This is no problem if there are many independent data sources since the wrong data could be filtered out in the cleaning process. But if there are not enough independent data sources, the error can make its way into the smart contract. The following illustration shows how one data source can influence the result.

In this setup, data sources 2, 3, and 4 retrieve their data from data source 1. For the reporters, however, they appear independent. Reporters A, B, and C rely on those data and submit them to the oracle. The data coming from reporter D would be considered as wrong.

Faulty reporters

Reporters can also contribute to wrong data. This can happen intentionally or unintentionally. Unintentional errors are, for example, rounding errors or parsing errors.

But reporters can also manipulate data intentionally. To increase the impact, they could launch a Sybil attack. Here, the malicious reporter sets up many fake reporter nodes that appear to be independent. But in fact, they are controlled by the same entity. With a Sybil attack, it is possible to influence the result. This works if the reporters are anonymous. Avoiding Sybil attacks is only possible if reporters have to reveal their real identity or have to lodge a deposit. Deposits, however, have the disadvantage that richer players have better chances to register more reporters than poorer players.

Freeloading

Freeloading means that a reporter can observe the data provided by other reporters and copy them. This would create two problems:

1. Correlation of data: This weakens the security because the diversity of data sources is reduced. Error detection mechanisms usually work only if few data sources are corrupted.

2. Saving costs on the back of honest reporters: The freeloading reporter would save expenses for querying the data source or obtain the data themselves.

Freeloading can be solved with a commit reveal scheme. In the first step, reporters create a hash from their values concatenated with a random string (salt), and submit that hash to the oracle contract.

After each reporter has committed to the value, the values and salts are revealed.

The hashes are then compared. If a reporter reveals a different value-salt combination than what he committed to in step one, he loses all of its deposit. The same holds if the reporter doesn’t reveal at all. This ensures that nobody can copy and use the data for free in the actual reporting round.

But once the revealed data is written to the blockchain, it is public and can be seen by everyone at no cost. This makes it difficult for oracles to get paid for their work.

Mirroring

A reporter can use only one data source but distribute the data to other reporters. For the oracle this looks like there are many independent reporters, but in reality, they all depend on a single data source. This can also be used as a Sybil attack. The costs for the query of the data source are split among the reporters.

Commit-reveal schemes do not help against mirroring schemes as off-chain data transfers are still possible.

Misaligned Incentives

Oracles, data sources, and reporters can take bribes from users and submit wrong data. Oracles could also become users themselves. In this case, they could, for example, influence the outcome of a bet in their favor.  

If we assume rational oracles, they try to maximize their reward. As long as an oracle is honest, it will be chosen for future tasks and get paid. As soon as the oracle lies, it loses its entire reputation and is out of business. It cannot expect any further payments from the oracle business in the future.

The reward for being honest must be higher than the reward for cheating. This can be calculated with the net present value.

Let us assume that the data source receives a payment of 1 for each report and the interest rate is 10 %, and we assume an infinite time frame, we can calculate the net present value:

NPV = R/i

NPV: Net present value

R: periodical Reward

i: interest rate

NPV = 1/0.1 = 10

In our calculation example, the oracle would have no incentive to cheat as long as the reward for cheating is lower than 10.

Categories: