Inspiration

Modern financial markets generate an overwhelming volume of micro-events, yet early warning signs of risk remain fragmented and delayed. Critical hazards such as liquidity shocks, sentiment divergence, and event-driven volatility often go undetected until it’s too late.

AIMME transforms real-time events into hazard alerts and anchors them on-chain via Polygon Technology, creating a transparent and verifiable layer for market risk detection.

What it does

AIMME is an AI-powered market hazard detection platform that:

Ingests real-time market data and event probabilities

  • Detects anomalies and emerging risks
  • Generates hazard alerts with severity levels
  • Provides AI-driven explanations for each risk
  • Exposes signals via APIs and a live dashboard

Hazard Types Detected

  • Flash crash risk (price + volume anomalies)
  • Sentiment divergence (market vs prediction markets)
  • Event-driven volatility (macro triggers)
  • Liquidity risk (bid/ask imbalance)

On-chain attestations

  • Immutable hazard writes on Polygon via contracts/HazardRegistry.sol and web API routes

How we built it

We built AIMME as a dual-mode architecture for both local development and cloud deployment:

  • Data Layer

    • Real time Market data via https://massive.com/
    • Immutable audit trail of market risks using smart contract on Polygon
  • Polygon PoS & tooling

    • Solidity ^0.8.20
    • Hardhat
    • ethers.js v6
    • Polygonscan / Amoy Polygonscan
  • Cloud Architecture

    • Serverless backend on Amazon Web Services
    • API Gateway
    • AWS Lambda
  • DynamoDB (with streams)

    • AI Layer
    • Ultra-fast inference powered by Groq
  • Generates:

    • Risk classification
    • Confidence score
    • Natural language explanations
  • Frontend

    • Next.js dashboard deployed on Vercel
    • Real-time hazard alerts + visualization
  • Authentication

    • Google SSO via Firebase
    • Role-based access (Trader / Analyst / Ops )
  • Testing/tooling:

    • Postman collections
    • curl-based verification
    • playwrite end2end
    • cloudwatch monitoring

Challenges we ran into

  • Cloud deployment edge cases (resource creation and handler behavior)
  • Free Massive API for market data has limits
  • Bumping into Insufficient POL funds during testing
  • DynamoDB type constraints (float vs Decimal with boto3)
  • API route differences (/alert vs /alerts) causing confusing gateway errors

Accomplishments that we're proud of

  • Delivered a working end-to-end pipeline: ingest -> process -> signal -> alert -> UI -> on-chain Immutable record
  • Deployed a live production UI on Vercel integrated with AWS backend
  • Added compatibility/fallback logic across backend variants
  • Implemented secure proxy routing so browser calls stay same-origin
  • Improved observability and UX with request IDs, connection status, and time-series table behavior

What we learned

  • Maintaining consistent event contracts and data structures is essential in distributed pipelines.
  • Even small observability features like logging, metrics, and alerts can drastically reduce debugging time.
  • Server-side proxying enhances security and operational control for frontend apps.
  • Designing for both local and cloud environments early prevents costly integration rewrites.
  • Achieving product readiness requires balancing speed, reliability, and extensibility.
  • Early adoption of immutable logging improves traceability and auditability for AI-driven systems.

What's next for AI Market Microstructure Engine (AIMME)

  • Enhance analytics and explainability, including historical trend analysis for signals and alerts.
  • Monetization roadmap:
    • SaaS subscription tiers for professional users
      • API usage billing for programmatic access
      • Enterprise/private deployment packages with dedicated support

Built With

Share this project:

Updates