Skip to content

Repository files navigation

ZenithFi

Hyper-personalized, non-custodial DeFi wealth manager on Cardano, powered by multi-agent collaboration via Masumi Network

πŸ† AI Agents on Cardano

ZenithFi is a production-ready DeFi wealth management platform that combines:

  • Non-custodial architecture: Users retain full control of their funds
  • AI-powered strategy: Multi-agent collaboration for personalized DeFi automation
  • Cardano native: Built on Cardano with Aiken smart contracts
  • Masumi integration: Agent identity, payments, and decision logging via Masumi Network

πŸ—οΈ Architecture

Multi-Agent System

  1. Analyst Agent: Monitors on-chain/off-chain signals, produces insight packets
  2. Strategist Agent: Generates personalized strategy plans, executes user-approved plans
  3. Auditor Agent: Verifies execution, triggers performance-based fees

Tech Stack

  • Frontend: Next.js + React + TypeScript + CIP-30 wallet connectors
  • Backend: NestJS + TypeScript + PostgreSQL
  • Agents: Python 3.10+ + FastAPI + CrewAI + Masumi SDK
  • Smart Contracts: Aiken (Cardano validators)
  • Infrastructure: Docker + Docker Compose + PostgreSQL
  • Network: Cardano Preprod Testnet + Masumi Network

πŸ“¦ Monorepo Structure

ZenithFi/
β”œβ”€β”€ apps/
β”‚   β”œβ”€β”€ frontend/          # Next.js dApp
β”‚   └── backend/           # NestJS API server
β”œβ”€β”€ agents/
β”‚   β”œβ”€β”€ analyst/           # Analyst Agent (Python + FastAPI)
β”‚   β”œβ”€β”€ strategist/        # Strategist Agent (Python + FastAPI)
β”‚   └── auditor/           # Auditor Agent (Python + FastAPI)
β”œβ”€β”€ packages/
β”‚   β”œβ”€β”€ shared-types/      # Shared TypeScript types
β”‚   β”œβ”€β”€ cardano-utils/     # Cardano transaction utilities
β”‚   └── masumi-client/     # Masumi API client wrapper
β”œβ”€β”€ contracts/
β”‚   β”œβ”€β”€ strategy-executor/ # Aiken validator for strategy execution
β”‚   └── audit-enforcer/    # Aiken validator for fee enforcement
β”œβ”€β”€ docker/                # Docker configurations
└── docs/                  # Documentation

πŸš€ Quick Start

Prerequisites

  • Node.js >= 18.0.0
  • pnpm >= 8.0.0
  • Python >= 3.10, < 3.13
  • Docker & Docker Compose
  • PostgreSQL 15+
  • Aiken CLI

Installation

  1. Clone and install dependencies:
git clone <repository-url>
cd ZenithFi
pnpm install
  1. Set up environment:
cp .env.example .env
# Edit .env with your configuration
  1. Start infrastructure:
docker-compose up -d postgres
  1. Install Python dependencies for agents:
cd agents/analyst
python -m venv venv
.\venv\Scripts\Activate.ps1
pip install -r requirements.txt
  1. Start development servers:
# Terminal 1: Backend
cd apps/backend
pnpm dev

# Terminal 2: Frontend
cd apps/frontend
pnpm dev

# Terminal 3: Analyst Agent
cd agents/analyst
python main.py

# Terminal 4: Strategist Agent
cd agents/strategist
python main.py

# Terminal 5: Auditor Agent
cd agents/auditor
python main.py
  1. Access applications:

πŸ“‹ Development Phases

βœ… Phase 1 (Week 1): Onboarding + Simple Strategy

  • User onboarding with wallet connection (CIP-30)
  • Basic profile management
  • Simple ADA staking strategy
  • Masumi agent registration

🚧 Phase 2 (Week 2): Multi-protocol Strategies

  • Analyst Agent with on-chain data
  • Multi-pool LP strategies
  • Agent-to-agent payments via Masumi
  • Strategy review UI

πŸ“… Phase 3 (Week 3): Audit & Fee System

  • Auditor Agent implementation
  • Performance-based fee trigger
  • Decision logging on-chain
  • Audit UI dashboard

πŸ“… Phase 4 (Week 4): Production Hardening

  • Multi-user support
  • Security hardening
  • E2E testing
  • Testnet deployment

πŸ§ͺ Testing

# Run all tests
pnpm test

# Test specific package
pnpm --filter @zenithfi/backend test

# E2E tests
pnpm test:e2e

πŸ”’ Security

  • Non-custodial: All wallet interactions via CIP-30; no private key handling
  • Smart contract validation: Aiken validators enforce strategy constraints
  • Agent identity: Masumi Registry verification for all agents
  • Audit trail: Immutable on-chain logs via Cardano metadata

πŸ“š Documentation

🀝 Contributing

This is a hackathon project. For post-hackathon contributions, please see CONTRIBUTING.md.

πŸ“„ License

MIT License - see LICENSE file for details

πŸ”— Resources


About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages