Its been a productive year following the first ETHBerlin last September! Jasper and Peter met last year at ETHBerlin when they sponsored the hackathon through Peter's first project EveryDapp. We are back this year to hack with the fire of a thousand Justin Suns. 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.
When dissecting Chainlink's whitepaper, a staking system coined "Chainlink 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.
Since we are prediction market nuts and want to be able to get external API data in a trusted way, we thought of a workaround by marrying Chainlink and Augur to have the best of both worlds: faster resolutions and a robust fallback oracle.
What it does
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 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.
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.
How we built it
We created a bridge contract between Augur and Chainlink. This contract can call external API's through Chainlink's smart contracts and operators. An individual user, market creator, or group can create a "disputeMarket" bond if an outcome is deemed invalid. The result of the "disputeMarket" on Augur is the final used as the final output for the contract.
Challenges we ran into
Two of our developers had to cancel last minute because of personal reasons, and our designer got food poising. Jasper and I are understaffed but have drunk enough club matte to do the work of 5 people. We're in it to win some cDAI (cheddar Dai)!
Accomplishments that we're proud of
Peter did a flip into the ball pit... Oh and we sort of achieved what we came to do too.
What we learned
Club matte is a schedule II narcotic. Also, more stretching, I'm writing this whilst lying down on a couch because my back hurts so damn much.
What's next for Chainlink \u2661 Augur
Chaugur, Auglink, or Linkur is part of something larger our team has been working on for a few months behind closed doors. It will serve as a crucial layer of security within our new stack and will continue to in development.
Prizes and Bounties
We are applying for: Open Track Prize and Chainlink - 1st, 2nd, and 3rd Prize