import React from 'react'; import { Settings, X } from 'lucide-react'; interface CryptoBlueprintModalProps { isOpen: boolean; onClose: () => void; } export default function CryptoBlueprintModal({ isOpen, onClose }: CryptoBlueprintModalProps) { React.useEffect(() => { const handleKeyDown = (e: KeyboardEvent) => { if (e.key === 'Escape') { onClose(); } }; if (isOpen) { window.addEventListener('keydown', handleKeyDown); } return () => { window.removeEventListener('keydown', handleKeyDown); }; }, [isOpen, onClose]); if (!isOpen) return null; return (
{/* Modal Header */}

Crypto Bayes Module - Operational Blueprint

System User Manual & Interface Mechanics

{/* Modal Body */}

System Inputs & Signals

Operational breakdown of key indicators used by the multi-model pipeline.

{/* Core Indicators */}

1. Funding Rates (Leverage Skew)

Reflects periodic payments exchanged between long and short traders. Extremely positive funding rates signal retail over-leverage and high risk of long liquidation squeezes (bearish indicators). Negative rates signal retail panic and potential short squeezes (bullish indicators).

2. Open Interest Change (Capital Velocity)

Measures the net speed at which new contracts are being opened or closed. A sharp increase in Open Interest accompanied by price moves confirms a strong momentum transition, indicating institutional volume entry.

3. Retail Skew (Contrarian Filter)

Calculates the proportion of long contracts held by retail accounts. The system operates under a contrarian framework: when retail long positioning is at extreme bullishness (e.g. Retail Skew > 1.50), the system dampens bullish forecast probabilities.

4. Whale Inflows (Accumulation Vectors)

Tracks large volume transactions moving from spot exchanges to private cold storage. Accumulation inflows decrease available supply on exchanges, establishing a spot-supply mismatch that supports upward spot pricing pressure.

{/* Interface Legend */}

Interface Layout & Metrics Legend

Expected Value (E: %)

Calculated as the Posterior Expected Value E = alpha / (alpha + beta) based on successes (alpha) and failures (beta). A value of e.g. **E: 85.5%** suggests that the estimator-horizon combination is highly calibrated.

Raw Trackers ("62/14")

Represents the absolute counts of success and failure outcomes: **62** successfully resolved direction predictions (alpha) and **14** false alarms or incorrect directional forecasts (beta).

Horizon Forecasts

Displays direction (▲ UP / ▼ DOWN) and probability forecast for BTC, ETH, or SOL at horizons T+1 (24h), T+5 (5d), and T+10 (10d).

{/* Operational Dynamics */}

Simulator & Ingestion Loops

Posterior Calibration Simulator: Clicking **"+1 Success (All)"** or **"+1 False Alarm (All)"** simulates model feedback loops. It increments the success or failure count across all 15 independent trackers, storing updated states immediately in `localStorage` to evaluate how expected accuracies drift when models perform well or poorly.

Background Evaluation Loop: When a user logs a manual forecast, the app registers predictions for all 15 trackers. In dev mode, the targets resolve quickly: T+1 in 60 seconds, T+5 in 5 minutes, and T+10 in 10 minutes. A background worker queries `/api/finance?region=crypto` to resolve the actual price change, updates the trackers in `localStorage`, and displays the success rates.

); }