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.
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.
-
Install RISC Zero:
curl -L https://risczero.com/install | bash rzup install -
Set up environment variables using the template:
cp .env.example .env # Edit .env with your actual values -
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
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
The system is configured for Ethereum Sepolia testnet with the following deployed contract:
- TradingSignal:
T0x1B4274Fea65a7131A0Ccd538b780b239dFB35B60
Build the project:
forge build && cargo buildTest:
forge test && cargo test