Inspiration

Blockchains make it easy to show timestamped possession of digital data.

What if that data is an educated guess about a real-world event?

We live in a world of too much (mis)information and insufficient access to subject matter expertise. Most people don't have the time or the sophistication to tell the true experts from the impostors. While some fields like math or physics have well-established theories, other fields may find forecasting an effective indicator of expertise. Oracles and smart contracts can drastically simplify finding trust-worthy experts: anyone can pick the real-world truths that they care about and see who predicts it well.

What it does

Credict focuses on taking records of credible predictions whose precision and originality can be easily verified. Anyone consistently making accurate forecasts can prove their capability and build a permanent track record.

It is also possible to build upon prediction records and create more applications. Imagine someone with a talent in trading stocks. They can start a one-person hedge fund and attract investors with their prediction record that is provably authentic.

As oracles involve more and more real-world facts, Credict automatically scales because new contract instances can be deployed for any particular oracle.

How we built it

Credict is written in Solidity.

Challenges we ran into

There were a few potential adversarial risks that we had to tackle.

  • Spamming risk: "If I submit a thousand predictions, one of these will be good."
    • Yes, but all of these predictions get recorded. Everyone still sees the 999 garbage, and the spammer simply wasted gas fee.
    • Reading predictions is based on address lookup, so spammers cannot make it more costly for people to read others' predictions.
  • Copycat risk: "Everything is public, I can copy someone else's predictions."
    • This can be solved through a combination of encryption and address-based watermarks. Basically, everyone prefixes their prediction with a variable watermark and encrypts the prefixed value until the prediction target time has passed. Then they can decrypt the prediction because nobody can copy it anymore.
  • Fake decryption risk: "I can find fake decryption keys and re-write my past prediction."
    • Credict takes statistics to help evaluate the trustworthiness of decrypted predictions: (1) watermark validity rate, (2) average watermark length, and (3) number of predictions per decryption.
      • An adversarial who cheats on decryption needs massive compute power to do well on (1) and maybe reasonable on (2), but always fails on (3).
      • An authentic forecaster who uses the true decryption key can effortlessly get healthy statistics on (1) (2) (3). All they need to do is put predictions in batches of 3-5 where each batch has the same set of keys.
    • Detailed explanation
      • Watermark values change when someone uses a different decryption key from their original one. The longer the watermark, the more infeasible it is to come up with fake decryption keys that yield a valid watermark. Therefore authentic forecasters can easily afford lengthy watermarks, but those trying to re-write a prediction face a steep cost, unless they go for short watermarks which undermines credibility anyway.
      • Track records are only meaningful when they are reasonably long and consistent. Faking decryptions will take a different set of keys per prediction, whereas authentic ones can easily use the same keys for multiple predictions and decrypt in batches.

Accomplishments that we're proud of

The code of Credict is not that complicated. However,

  • we are excited about future experts who prove themselves with the help of this contract.
  • this might be one of those dApps that can be enormously useful even on a testnet.

What we learned

When we started this project we had zero background in Solidity. Thanks to Remix and Chainlink resources, we were able to get up to speed quickly.

What's next for Credict: Credible Predictions of Oracles

We have a Python package in progress that makes it smoother to interact with PredictionRecorder. Specifically, credict-py can auto-manage encryption, decryption, and watermarks associated with making predictions.

Built With

Share this project:

Updates