← Back to home

ETH price prediction with Empiric price feed

The contract pulls the last n=10 check_point ETH price from Empiric oracle and uses that for a super smart algorithm to predict price for the next epoch

Screenshots

ETH price prediction with Empiric price feed screenshot 1
ETH price prediction with Empiric price feed screenshot 2
ETH price prediction with Empiric price feed screenshot 3

Problem Statement

The number historical price points pulled by contract be changed in contracts/libraries/helpers/constants.cairo. The higher this number, the more accurate the prediction would beThe algorithm contract used is inpredict_next_pricefunction which can be tuned further for more accuracyThe contract was deployed on StarkNet Goerli testnet at 0x6acea7a35c3226898b8143cc1ec76a7b079bb023fd660852b6b9ad7a17e1ebb

Solution

Contracts are written in CairoEmpiric oracle contract address on StarkNet Goerli: 0x0446812bac98c08190dee8967180f4e3cdcd1db9373ca269904acb17f67f7093Nile framework has been used for compiling and deploymentThe project showed that it's easy to query historical data onchain, and potentially more with other consuming data & computational feeds, more sophisticated algorithms for prediction can be done onchain as well

Hackathon

ETHSanFrancisco 2022

2022

Prizes

  • 🏆

    🥇 Empiric — Best Use

Contributors