Inspiration

The Numeral data science/quantitative finance/machine learning tournament is accessible to anyone around the world, allowing for great learning and earning opportunities in the field of machine learning and data science. However earning returns on any successful model you end up creating requires capital investment via the Numeraire crypto currency to stake (bet/invest) on your machine learning model. This leaves those with less expendable income and a lot of data science skill with little monetary gain from their contributions to the Numerai fund and community. Numerous Numerai community members have posted on the forums, Numerai chat, and twitter that they are selling their submissions through informal deals, but almost none receive offers because there is no system to prevent sellers from just running away with buyer's money without providing a Numerai prediction submission.

Steak aims to resolve this issue by allowing data scientists to sell their Numerai submissions (the predictions produced by their machine learning model) to supplement their returns on their own Nuemraire to others for Ethereum. Steak provides submission selling that requires no expensive legal agreements and no ambiguity about whether both parties will fulfill their promises. This means anyone, no matter their income, can see significant returns on their contribution to the Numerai hedge fund.

What it does

Steak is an Ethereum smart contract that mediates the sale of Numerai predictions using Chainlink functionality. Steak first allows buyers to pay in Ethereum for access to a machine learning model, and then rewards the seller Ethereum if they fulfill their promise, otherwise a refund is issued.

Making calls to Numerai API's using Chainlink ensures that the predictions sold are not just randomized garbage, but instead match with what was promised by the data scientist when they created the contract (real predictions by a powerful and well tested machine learning model). Steak can issue refunds if it detects fraud occurred, and only pays out the agreed Ethereum price if the seller has provably fulfilled their promise.

Steak has a web3 GUI interface to allow persons of limited technical skill to buy or sell Numerai submissions without touching websites like etherscan, and provides visual feedback on the state of a contract to give intuition on the structure of Steak contracts. Included in the website are also articles relevant to buyers, sellers, and the general monetary risk of the Numerai platform to insure no one invests in something they do not understand.

View a sample contract on the web interface (Use the Kovan Test Network in MetaMask)

How I built it

The Solidity contract was built over a week and a half and tested over almost a full month to ensure it was error free in all aspects using the Remix IDE and Steak web interface. To learn Solidity tutorials and documentation by the Chainlink team, the web3js docs, and Solidity docs were used as reference along with many other miscellaneous online sources.

The web interface was built once the actual Solidity smart contract had been fully fleshed out. Behind the scenes Javascript was used along with the web3js, jquery, bignum, and bootstrap Javascript libraries to implement all dynamic and blockchain accessing elements of the site. Bootstrap was used as the framework for the GUI design and worked quite nicely.

Github repo

Challenges I ran into

Kovan Test Net Oracles are not always up and working, which cost about a week of testing time for time sensitive portions of the contract.

Ethereum gas prices are crazy, and if setting up a Steak contract costs more than what you are going to sell your submissions for, there is no reason for Steak to exist. Since Steak contracts are not time sensitive on the scale of minutes of hours, using low gas prices for Steak contracts is acceptable for the most gas intensive parts of using Steak which are contract creation, payment claims, and refunds.

Learning about how Solidity, Chainlink, and the Ethereum blockchain work in order to build a contract and Javascript interface.

Finding a good layout for the web interface that wasn't too cramped but also included all required functionality and information.

Accomplishments that I'm proud of

Three weeks of successful contract and interface testing and planned Ethereum main net deployment once my Numerai model has been tested for atleast three months.

Learning Solidity, Chainlink API calls, and the web3 Javascript library and building a system of practical use to one of my favorite online communities.

Building my first Bootstrap webpage.

The Numerai development team reaching out with a job interview after being impressed with the project (I have a technical interview on Monday :D).

Using my new knowledge about Solidity and Chainlink to help others in the Chainlink Discord with their code.

What I learned

The web3 library and use of Javascript functions like .catch() and .then() relating to web3 requests.

How to write Ethereum contracts.

How to call Chainlink oracles.

How to view and navigate the Ethereum blockchain.

What the Ethereum Virtual Machine is.

How Ethereum gas prices and gas costs work.

The Bootstrap framework.

Improved organization of Solidity and Javascript code.

What's next for Steak

Main net deployment and contracts with real buyers.

Main net use by other Numerai data scientists.

Longer term contracts (three or six months) to save on gas prices and discourage buyers from dropping deals as soon as they see any negative returns.

Built With

Share this project:

Updates