Skip to content

Defiesta/simple-ai-agent

Repository files navigation

Simple AI Agent

A verifiable AI trading signal generator for DeFi using RISC Zero and Boundless Network. The system generates ETH price predictions using linear regression and creates trading signals (BUY/SELL) with verifiable zero-knowledge proofs.

Overview

The AI agent analyzes historical ETH price data using linear regression to predict future prices and generate trading signals. All computation is verifiable through zero-knowledge proofs generated by RISC Zero and processed via the Boundless Network.

Quick Start

  1. Install RISC Zero:

    curl -L https://risczero.com/install | bash
    rzup install
  2. Set up environment variables using the template:

    cp .env.example .env
    # Edit .env with your actual values
  3. Run with the full production configuration:

    RUST_LOG=info cargo run --release --bin app -- --current-price 3200

    or Run the trading signal system:

    RUST_LOG=info cargo run --release --bin app

Architecture

The system consists of:

  • Guest Program: Rust program that performs linear regression on ETH price history
  • Smart Contract: TradingSignal contract deployed on Base mainnet that verifies proofs and stores signals
  • Client: Application that orchestrates proof generation and contract interaction

Configuration

The system is configured for Ethereum Sepolia testnet with the following deployed contract:

  • TradingSignal: T0x1B4274Fea65a7131A0Ccd538b780b239dFB35B60

Development

Build the project:

forge build && cargo build

Test:

forge test && cargo test

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors