Skip to content

Repository files navigation

AURIS — USD+EUR Basket Stablecoin Platform

Production-grade stablecoin risk monitoring with crisis simulations and ML-driven analytics.

AURIS Platform Python Next.js License

Overview

AURIS is a research simulator for a hypothetical USD+EUR basket stablecoin. It features:

  • Real FRED Data: All computations use actual Federal Reserve Economic Data
  • ML Model Suite: TCN (regime detection), TFT (volatility), LSTM (redemptions), XGBoost (slippage)
  • Monte Carlo Engine: Student-t shock simulation with path-dependent dynamics
  • Bloomberg-grade UI: Golden ratio design system, institutional aesthetics

⚠️ Important Notes

  1. NO DUMMY DATA: Every chart and KPI is computed from real FRED series
  2. Research Tool: This is a simulation, not a production stablecoin
  3. Transparency: All assumptions are documented in the UI

Data Sources (FRED)

Series Description Frequency
DEXUSEU USD/EUR Exchange Rate Daily
DFF Effective Federal Funds Rate Daily
STLFSI4 St. Louis Fed Financial Stress Index Weekly

Crisis Windows

Three fixed historical periods for analysis:

  • crisis_2008: 2008-07-01 → 2008-12-31 (Financial Crisis)
  • crisis_2020: 2019-12-01 → 2020-05-31 (COVID-19)
  • crisis_recent: 2022-10-01 → 2023-03-31 (Rate Shock)

Getting Started

Prerequisites

Backend Setup

cd backend

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Configure environment
cp env.template .env
# Edit .env and add your FRED_API_KEY

# Run the server
uvicorn app.main:app --reload --port 8000

Frontend Setup

cd frontend

# Install dependencies
npm install

# Run development server
npm run dev

Access the application at http://localhost:3000

Architecture

├── backend/
│   ├── app/
│   │   ├── data/           # FRED client, dataset builder
│   │   ├── features/       # Feature engineering
│   │   ├── models/         # TCN, TFT, LSTM, XGBoost
│   │   ├── simulation/     # Monte Carlo, deterministic sim
│   │   ├── database.py     # SQLite/PostgreSQL models
│   │   ├── config.py       # Configuration
│   │   └── main.py         # FastAPI endpoints
│   └── requirements.txt
│
├── frontend/
│   ├── src/
│   │   ├── app/            # Next.js pages (App Router)
│   │   ├── components/     # React components
│   │   └── lib/            # API client, utilities
│   ├── tailwind.config.js  # Golden ratio design system
│   └── package.json
│
└── README.md

API Endpoints

Endpoint Method Description
/api/windows GET List crisis windows
/api/run POST Create computation run
/api/run/{id}/summary GET Get run KPIs
/api/run/{id}/series GET Get time series data
/api/run/{id}/models/tcn GET TCN model data
/api/run/{id}/models/tft GET TFT model data
/api/run/{id}/models/lstm GET LSTM model data
/api/run/{id}/models/xgboost GET XGBoost model data
/api/run/{id}/mc POST Run Monte Carlo
/api/crises/raw GET Raw FRED data

Generating Runs

  1. Start both backend and frontend servers
  2. Navigate to Live Peg Monitor (/live)
  3. Select a crisis window (2008, 2020, or recent)
  4. Click New Run to trigger computation

The backend will:

  1. Fetch FRED data
  2. Align to business days
  3. Train all four models
  4. Run deterministic simulation
  5. Store results in SQLite

Design System

AURIS uses a Golden Ratio (φ ≈ 1.618) based design:

  • Spacing: 8, 13, 21, 34, 55, 89px (Fibonacci)
  • Typography: 1.25 ratio scale
  • Layout: Main content ~61.8% width
  • Cards: 21-34px padding, 14-18px radius
  • Numbers: Tabular-nums for aligned decimals

Model Details

TCN (Regime Detection)

  • Dilated causal convolutions
  • 60-day lookback
  • Quantile-based proxy labels

TFT (Volatility & Tail Risk)

  • Temporal Fusion Transformer (simplified)
  • Quantile loss for volatility
  • Binary tail event prediction

LSTM (Redemption Pressure)

  • 2-layer LSTM
  • Stress-driven behavioral targets
  • Bounded [0, 1] output

XGBoost (Slippage)

  • Gradient boosted trees
  • Non-linear stress interactions
  • SHAP feature importance

Environment Variables

FRED_API_KEY=your_key_here
DATABASE_URL=sqlite+aiosqlite:///./auris.db
REDIS_URL=redis://localhost:6379  # Optional

Production Deployment

For Railway/Render deployment:

  1. Set DATABASE_URL to PostgreSQL connection string
  2. Ensure FRED_API_KEY is configured
  3. Build frontend: npm run build
  4. Start backend: uvicorn app.main:app --host 0.0.0.0 --port $PORT

Contributing

This is a research project. Contributions welcome for:

  • Additional stress scenarios
  • Model improvements
  • UI enhancements
  • Documentation

License

MIT License - See LICENSE file for details.


AURIS — Precision Risk Analytics for Stablecoin Research

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages