Skip to content

Repository files navigation

Aegis Yield Dynamic Portfolio Vault

A sophisticated DeFi yield optimization platform leveraging AI/ML for dynamic portfolio rebalancing across multiple protocols on Base L2.

Architecture Overview

Aegis Yield is built as a monorepo containing three distinct technology stacks:

  • Solidity Smart Contracts - ERC-4626 vault with upgradeable strategies on Base
  • Go/Rust Backend - High-performance keeper bot and optimization engine
  • Python ML Engine - LSTM-based yield prediction and risk modeling

Project Structure

aegis/
 contracts/          # Solidity smart contracts (Foundry)
 backend/           # Go/Rust keeper bot and API
 ml-engine/         # Python ML models and data pipelines
 scripts/           # Deployment and automation scripts
 test/              # End-to-end integration tests

Quick Start

Prerequisites

  • Foundry - For Solidity development
  • Go 1.21+ or Rust 1.75+ - For backend services
  • Python 3.10+ - For ML engine
  • Node.js 18+ - For tooling

Installation

# Clone the repository
git clone https://github.com/builds-toqyo/aegis.git
cd aegis

# Install Foundry dependencies
cd contracts && forge install

# Install backend dependencies
cd backend && go mod download  # or cargo build

# Install ML engine dependencies
cd ml-engine && pip install -r requirements.txt

Development

# Run Solidity tests
cd contracts && forge test

# Run backend keeper
cd backend && go run keeper-bot/main.go

# Train ML model
cd ml-engine && python scripts/train.py

Security

  • All contracts use OpenZeppelin's audited libraries
  • UUPS upgradeable pattern for future improvements
  • Multi-signature governance controls
  • Comprehensive test coverage (>90%)

Key Features

  • ERC-4626 Compliant Vault - Standard tokenized vault interface
  • Multi-Strategy Architecture - Aave, Lido, and Delta-neutral strategies
  • AI-Driven Rebalancing - LSTM predictions for optimal allocation
  • Cross-Chain Bridge Support - L1 Lido integration via Base bridge
  • Real-Time Risk Management - Chainlink oracles and custom risk metrics

Technology Stack

Smart Contracts

  • Solidity 0.8.20+
  • Foundry (Forge, Cast, Anvil)
  • OpenZeppelin Contracts (UUPS, AccessControl, ERC4626)

Backend

  • Go 1.21+ / Rust 1.75+
  • Web3 libraries (go-ethereum / ethers-rs)
  • REST API (Gin / Axum)

ML Engine

  • Python 3.10+
  • TensorFlow / PyTorch
  • Pandas, NumPy, Scikit-learn
  • Flask / FastAPI

License

MIT License - See LICENSE file for details

Contributing

Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.

Contact

For questions and support, please open an issue in the repository.

About

No description, website, or topics provided.

Resources

Contributing

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages