project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4
project screenshot 5
project screenshot 6

ETHedger

Using a simple machine learning linear regression trading model written in python

ETHedger

Created At

ETHGlobal Istanbul

Project Description

Using a simple machine learning linear regression trading model written in python, ETH live prices are fed in from the EVM to Cartesi. The buy/sell decision are stored in a local file and posted to the log. Transactions are executed on EVM. At the end of the Epoch the transactions sent to the smart contact to check the state. If the transactions are invalid the depositor loses their deposit, if not they get their deposit back.

How it's Made

Using a Python-based linear regression model empowered by Pandas and Scikit-learn, the price data of Ethereum (ETH) sourced from Chainlink is analyzed within the Cartesi VM via the ETHedger script. This script records buying and selling actions, storing them in a log. At each epoch's end, this log undergoes validation; validated records result in deposit refunds to the depositor, while invalid ones lead to the forfeiture of the deposit by the program. The execution of buy, sell, and price actions is managed by a Solidity smart contract on the Ethereum blockchain, which governs deposit refunds or claims based on transaction record validity. This ecosystem intertwines machine learning analysis, transaction recording, validation, and contract-based execution for managing ETH transactions.

background image mobile

Join the mailing list

Get the latest news and updates