epuesta

Decentralized betting framework on football. With Ethereum and ChainLink.

Stars
8

Epuesta

Epuesta is a decentralized betting broker framework built with ChainLink.

Everyone can create a new contract with our framework on Ethereum as a broker for a specific match, you can customize your need and offer different deals with the contract.

The finality of a match is provided by Chainlink nodes in an decentralized manner, and result is distributed fairly with the contract.

Integration for Node Operators

Add New Bridge - apifootball

Currently using Apifootball as our data source. A sample RESTful API external adopter can be found at this repo.

Run it yourself or use our heroku server, then create a new apifootball Bridge with the adopter url.

Our adopter is deployed at:

https://apifootball-adopter.herokuapp.com/

Add New Jobs

With our current design, a chainlink node has to add two jobs in order to be capable of being Epuesta data source oracle.

The job specs can be found in jobs/

Contract Creator

Request Team Score

Chainlink.Request memory req = buildChainlinkRequest(stringToBytes32(MATCH_SCORE_JOBID), this, this.callbackHometeamScore.selector);
req.add("match_id", matchId);
req.add("copyPath", "match_hometeam_score");
sendChainlinkRequestTo(oracle, req, ORACLE_PAYMENT);

Response in uint256

Verify Match Data

Check Match Live

Chainlink.Request memory req = buildChainlinkRequest(stringToBytes32(MATCH_STATUS_JOBID), this, this.callbackMatchStarted.selector);
req.add("match_id", matchId);
req.add("copyPath", "match_live");
req.add("operator", "eq");
req.add("value", "1");
sendChainlinkRequestTo(oracle, req, ORACLE_PAYMENT);

Response in boolean

Related Projects