Augur and Chainlink got Married.
Flux Market
Aug 25 · 4 min read

Disclaimer: This solution solves Chainlink’s immediate security vulnerabilities pertaining to oracle incentive structures and is not a permanent replacement for Chainlink’s version two protocol with its intrinsic “Reputation System.” In addition, this solution was created and implemented by the Flux team at ETHBerlin Zwei in 32 hours and has not been audited for security vulnerabilities. Special thanks to Vitalik for officiating this marriage at ETHBerlin.

ETHBerlin Zwei

*We took first place in Chainlink’s Prize Bounty to build the most compelling and ready-to-run project using Chainlink.

Its been a productive year following the first ETHBerlin last September! Our team has remained hard at work to reinvent prediction markets with the debut of Flux Market — derivatives on startups, back in April. Since then we have been iterating on the oracle quandary facing this community and decided to tackle it this weekend. We married Chainlink’s near-instant resolution times with Augur’s decentralized resolution mechanics. AKA “Chaugur, Auglink, or Linkur.

Introduction

There has been much discussion in the crypto community regarding the security of oracles, particularly Chainlink. There has been a prominent battle brewing between Joey Krug of Augur via a stream of tweets bashing the security or Chainlink’s oracle service. Chainlink provides a vital service by connecting smart contracts with reliable off-chain data from APIs throughout the internet.

Chainlink’s Security Problem

When dissecting Chainlink’s whitepaper, a staking system coined “Chainklink Reputation System” is detailed to attach a financial value to the validity of oracle aggregated data. The reputation system is logical but is not incorporated in version one of Chainlink’s main net protocol. At the moment, Chainlink oracles can theoretically be affected by 3rd parties incentivized to manipulate API data.

Diagram depicting Chainlink’s data aggregation flow and the section containing the theoretical security pitfall.

Introducing Flux’s Chainlink to Augur Bridge

Diagram depicting the secondary security layer on Augur that addresses Chainlink’s theoretical security pitfall.

The majority of contracts which utilize Chainlink for resolution data, require near-instant resolution. We created a fallback dispute mechanism which employs Chainlink for primary resolution’s but incorporates a dispute mechanism.

If the market resolves with data that varies from the API stream, a dispute function is called. When the dispute function is called a dispute bond is crowdsourced, either by users or market creator, and all open interest is locked. An Augur market is created, and open interest is transferred to the Augur market.

Complete sets are purchased in a batch transaction to ensure REP holders have the incentive to provide accurate resolution data. Purchasing complete sets makes these markets non-parasitic. The market immediately enters the resolution period, and no further trading is facilitated via Augur. The resolution data provided by REP holders acts as the final resolution for the market in question. The market resolves, and the escrow contracts distribute open interest to the winning party.

Let’s Unpack What Happened Here

By incorporating a secondary layer of security via Augur’s dispute mechanism, we remove the financial incentive for a Chainlink Oracle Node to operate in bad faith.

Example:

Jane and James decide to place a wager on the outcome of a sports game — each put 10,000 DAI on their team of choice. James bet on the underdog, and it seems his risk won’t pay off as Janes team is up by 20 points in the final half. James scrambles to contact the Chainlink oracle node listed at link.pool. His offer — the payout is 10k DAI if he wins, so he is willing to pay the oracle operator 5k DAI to alter the API data from ESPN. Because the oracle operator can only have his reputation, which is non-tradeable and without financial value, slashed they agree to participate.

On Chainlink today, the market would resolute, and James’ team would be listed as the winner. Jane is, of course, agitated with the altered result, but has no financial recourse to rectify the situation.

Enter Augur — By creating this fallback layer, Jane has an option for recourse. She can dispute the result of the market. Open interest is now transferred into an Augur market where the native resolution mechanic kicks in. The REP holders check the API data, and it returns a different result. The result from the Augur market is used as the final decision.

Jane is happy; she made 10k DAI! James burned 5k DAI by bribing the node operator and loses his initial wager of 10k DAI. The node operator is now blacklisted from use within the event contract for future API requests.

To view the technical implementation on test net, please visit our GitHub repo here. For more information regarding the hackathon please visit our DevPost.


— the Flux Team

Follow us on Twitter!

Flux Market

Written by

The first platform for peer-to-peer derivatives on startups.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade