- What this project does: IRIS is a decentralized, non-custodial AI protocol designed to assess portfolio risk, score tokens and wallets, and automatically protect digital assets using real-time on-chain signals.
- Its overall purpose: To provide DeFi users on the Solana blockchain with dynamic risk scoring, auto-swap emergency actions, and claimable Insurance NFTs to autonomously cover and protect against losses.
- Technology stack: The application utilizes a modern, multi-tiered stack including Next.js 15 / React 19 for the frontend interfaces, FastAPI / Python for the AI Risk Engine back-end, and Rust / Anchor for the Solana smart contracts.
- Maturity level: Prototype / MVP Stage. The application is in a closed testing phase. The UI and waitlist are built, but the DevOps pipeline (Docker, CI/CD) and full test coverages are incomplete.
- Key strengths: Excellent separation of concerns, utilization of cutting-edge frameworks, web3-native authentication via Civic/Supabase, and highly readable, modular smart contract definitions.
- High-level risks: Completely empty Docker configuration files, zero configured CI/CD pipelines, reliance on a centralized oracle for risk score signatures, and missing frontend test coverage.
iris-protocol/
├── anchor/ # Solana smart contracts
│ ├── Anchor.toml # Anchor workspace configuration
│ └── programs/
│ └── anchor/ # Rust smart contract source code
├── backend/ # AI Risk Engine API
│ ├── Dockerfile # (Currently Empty)
│ ├── docker-compose.yml # (Currently Empty)
│ ├── requirements.txt
│ └── app/ # FastAPI source code (api, core, data, models, test)
├── frontend/ # Main Web Application
│ ├── package.json
│ └── src/ # Next.js App Router (app, components, hooks, services)
└── waitlist/ # Landing Page / Waitlist Service
├── package.json
└── src/ # Next.js application
The system is built using a Microservices / Modular Monorepo Architecture:
frontend/: The main user-facing decentralized application (dApp).waitlist/: A separate marketing and waitlist generation site.backend/: A centralized Python Microservice serving the AI Risk logic, likely interfacing with OpenAI and Helius RPC.anchor/: The decentralized on-chain engine executing state changes and enforcing insurance mechanics.
- Frontend:
frontend/src/app/page.tsx&frontend/src/app/layout.tsx - Backend API:
backend/app/main.py - Smart Contract:
anchor/programs/anchor/src/lib.rs
- Framework: Next.js 15.3.1 (App Router)
- Language: TypeScript / React 19.0.0
- Styling: TailwindCSS 4, Radix UI primitives, Framer Motion
- Web3:
@solana/web3.js(^1.98.2),@solana/wallet-adapter-react,@civic/auth-web3 - Backend-as-a-Service: Supabase (
@supabase/supabase-js^2.49.4) - Package Manager: npm
- Framework: FastAPI (0.110.1)
- Language: Python 3.x
- Server: Uvicorn (0.29.0)
- Validation: Pydantic (2.7.1)
- Package Manager: pip (
requirements.txt)
- Framework: Anchor Framework
- Language: Rust
- Blockchain: Solana, SPL-Token
- Tooling:
ts-mochafor localnet testing,yarnas package manager for Anchor tooling.
- Major Dependencies: Next.js, React, FastAPI, Supabase, Solana Web3.js.
- Outdated Packages: No severely outdated packages. The project aggressively relies on bleeding-edge versions (Next.js 15, React 19, TailwindCSS 4).
- Unused Dependencies: Cannot statically determine unused packages without a full install, however, waitlist includes
@wallet-ui/reactcanary builds which are experimental. - Security Risk Assessment: Heavy reliance on beta/canary versions (e.g., Next 15) could introduce unstable behaviors or undiscovered zero-day vulnerabilities in the Node framework.
- Large/Heavy Dependencies:
@solana/web3.jsandframer-motionadd significant bundle weight.
- Code Organization: Excellent. The domain logic is tightly scoped within respective service directories. FastAPI uses clean architecture (
api,core,models,data). - Naming Conventions: Consistent PascalCase for React components and snake_case for Python / Rust implementations.
- Modularity / Separation of Concerns: Very high. The separation of the waitlist from the main app ensures the heavy main frontend bundle doesn't impact marketing SEO.
- Complexity Hotspots:
backend/app/models/llm.py: Contains heavy logic for prompt engineering and OpenAI interactions.anchor/programs/anchor/src/lib.rs: Manages multiple interdependent states (Subscriptions, Insurance NFTs, Governance Actions).
- Overall Code Quality Score: 8/10.
- Justification: The code is thoughtfully structured and uses best-in-class tools. However, points are deducted for empty DevOps configurations, lack of frontend testing, and some brittle env variable implementations (e.g., non-null assertions
!).
[ DeFi User ]
│
├──> (Web3 Auth via Civic) ──> [ Next.js Frontend ]
│ │
│ ├──> (REST API) ──> [ FastAPI Risk Engine ]
│ │ └──> [ OpenAI / Helius RPC ]
│ │
└──> (Wallet Signature) ──────────────┴──> [ Solana Blockchain (Anchor Contract) ]
- State Management: Frontend utilizes React Contexts, Hooks, and likely
Jotaifor the waitlist. Server-state is cached via@tanstack/react-query. - API Structure: Python backend exposes standard REST endpoints (
/api/v1/evaluate,/api/v1/explain). - Design Patterns:
- Dependency Injection: Used heavily within FastAPI routes.
- Provider Pattern: Standard in Next.js for Solana Wallet injection and Theme management.
- Coupling: The system is loosely coupled via API boundaries, which is an excellent architectural choice for scalability.
- Hardcoded secrets: 🟢 None found. Proper usage of
os.getenv()andprocess.env. - API Keys: 🟢 Safely retrieved from environment variables.
- Unsafe environment handling: 🔴 Detected in
frontend/src/app/api/supabase-notification/route.tsviaprocess.env.RESEND_API_KEY!. If this variable is missing in deployment, the Node instance will throw an unhandled exception. - Authentication: 🟢 Securely handled utilizing Civic web3 authentication passing JWTs to Supabase.
- Oracle Centralization: 🟡
anchorcontract relies heavily onverify_iris_signatureto trust off-chain risk scores. If the IRIS server is compromised, malicious scores can be injected.
- High: Lack of Docker/Deployment configurations prevents secure, reproducible deployments in production environments.
- Medium: Centralized Risk Oracle architecture in the Smart Contract.
- Low: Non-null assertions (
!) on environment variables.
- Potential Bottlenecks: Synchronous AI inference delays. The
evaluateendpoint in FastAPI relies on LLM models which can take several seconds to stream/return, potentially causing frontend timeout issues. - Memory Concerns: Python ML modeling (if loaded in memory dynamically instead of purely via external openAI calls) could bloat the Uvicorn workers.
- Unoptimized Assets: Next.js automatically optimizes images, but
framer-motionanimations should be lazily loaded where possible. - Async Handling Quality: The Python backend correctly implements
async deffor endpoints wrapper logiccall_next(request)middleware, ensuring Uvicorn can efficiently handle concurrent connections.
- Test coverage estimate: ~15% overall.
- Backend Tests: Standard
pytestconfigurations found (test_api.py,test_data.py,test_models.py). Good baseline. - Frontend & Waitlist Tests: No comprehensive unit testing (Jest/Vitest) or E2E testing (Cypress/Playwright) suites could be located.
- Smart Contract Tests:
Anchor.tomldefines ats-mochatesting command, but extensive test directories are not populated. - Quality: The existing python tests check logical API validations, but system-wide integration tests are missing.
- CI/CD setup: Missing.
.github/workflowsdoes not exist. - Docker configuration: Critically Deficient. Both
Dockerfileanddocker-compose.ymlin thebackend/directory are entirely empty (0 bytes). - Production readiness: Not Ready. The application cannot be safely built or deployed to a cloud environment without functional containerization and CI validations.
- Environment variables: Reliant on local
.envfiles. Ensure secrets managers (AWS Secrets, Vercel Env) are used in production.
- README quality: Exceptionally high. The core
README.mddetails context, architecture, team, use of funds, and links effectively. - Setup instructions: Minimal local environment setup instructions (e.g., missing "how to run the python server" in the root README).
- Code comments quality: Very clean.
lib.rshas strong docstring-equivalent comments above instructions (// Trigger a protection action...).
- Ease of onboarding: High. The boundaries between backend, frontend, and smart contract are clearly delineated. A developer can work on the UI without understanding Rust.
- Scalability potential: Very high. The backend can be scaled horizontally via Docker (once implemented) and the frontend deployed effectively on Vercel/CDN.
- Technical debt level: Low, though "DevOps Debt" is currently the system's largest hurdle.
| Risk | Impact | Likelihood | Severity | Recommendation |
|---|---|---|---|---|
| Empty Docker/DevOps Files | High | High | Critical | Immediately construct Dockerfile and docker-compose.yml for reproducible environments. |
| Missing CI/CD Pipelines | Medium | High | High | Implement GitHub Actions to run linters, type checks, and Python tests on every PR. |
| Brittle Env Handling | Medium | Low | Medium | Remove ! assertions in Next.js. Validate environment variables at startup (e.g., using zod). |
| Oracle Centralization | High | Low | Medium | Research decentralized consensus for reporting Risk Scores to the smart contract for V2. |
| No Frontend Tests | Low | High | Low | Introduce Cypress or Playwright to test the Web3 connection and swap user flows. |
- Write the
Dockerfilefor the Python backend withuvicornstartup instructions. - Fill out
docker-compose.ymlto orchestrate local development (e.g., pulling a local postgres/redis if needed). - Validate all environment variables in both Node and Python environments securely on startup rather than at runtime.
- Implement a GitHub Action (
.github/workflows/main.yml) that runsnpm run lintandpytest. - Add end-to-end (E2E) testing for the critical Web3 wallet connection workflows.
- Write test cases for the Rust Smart Contracts (
tests/iris.ts) to validate trigger protections logic limit checks.
- Evolve the anchored Python signature verification to a decentralized validator network or existing decentralized Oracle (like Switchboard) for higher trustlessness.
- Separate the UI-Kit into an independent monorepo workspace to share components between the waitlist and main application avoiding duplicate dependencies.
- Overall Score: 78 / 100
- Justification: The project shows incredible promise with clean architecture, modern tooling across a vast tech stack, and clear macro-scale design. It loses 22 points entirely on operational maturity: the lack of Docker configurations, automated deployment pipelines, and comprehensive end-to-end tests prevent it from being a production-ready system.
- Summary Verdict: A beautifully designed and architected MVP that needs a heavy dose of DevOps and Testing attention before Mainnet launch.