How dhruvpatel6429/veririsk works
VeriRisk is a DeFi risk-operations platform. Protocol snapshots feed feature engineering and ML risk evaluation; the evaluator persists history and alerts, while APIs and a Next.js console expose monitoring and analysis. Separate branches provide what-if simulation, autonomous defense, threat intelligence, and Stellar-backed prediction proofs. The graph includes the documented major capabilities, but several subsystems were not excerpted; their links are included only where the README or source index supports them.
Main entry points: index.tsx Operations Console · risk_evaluator.py Risk Evaluation · scheduler.py Pipeline Scheduler · api_server.py REST API
Components 30
Data and Features
- Protocol Ingestion
backend/data_fetcher.py - Protocol Catalog
backend/protocols.py - Pipeline Scheduler
backend/scheduler.py - Hourly Snapshots
backend/jobs/hourly_snapshot.py - Time-Series Features
backend/features/basic_timeseries.py - Advanced Features
backend/features/advanced_features.py - Snapshot Storage
backend/database.py
Risk Intelligence
- Risk Model
backend/model_server.py - Risk Evaluation
backend/services/risk_evaluator.py - Explainability
backend/services/explainability_service.py - Risk History
backend/db_models/risk_history.py - Alert Records
backend/db_models/alert.py
Operations and Analysis
- REST API
backend/api_server.py - Crisis Simulation
backend/services/simulation_service.py - Risk Guardian
backend/agent/risk_guardian.py - Auto Defense
backend/auto_defense.py - Threat Intelligence
backend/threat_intelligence.py - Runtime Configuration
backend/config.py
Verification
- Proof Submission
backend/submit_to_chain.py - Stellar Adapter
backend/chain/stellar_adapter.py - Soroban Contracts
contracts/stellar/oracle/src/lib.rs
Web Console
- Operations Console
frontend/pages/index.tsx - Fetch Sync
frontend/hooks/useBackendFetchSync.ts - Dashboard Stats
frontend/components/GlobalStats.tsx - Alert Feed
frontend/components/LiveAlertFeed.tsx - Defense Panel
frontend/components/AutoDefensePanel.tsx - Model Transparency
frontend/components/ModelTransparencyPanel.tsx - Error Fallback
frontend/components/ErrorFallback.tsx - Loading Skeleton
frontend/components/LoadingSkeleton.tsx
Other components
- Protocol Operators
Connections 31
- Protocol Operators → Operations Console: monitor risks
README.md - Operations Console → REST API: requests data
README.md - Operations Console → Fetch Sync: polls status
frontend/pages/index.tsx - Operations Console → Dashboard Stats: renders
frontend/pages/index.tsx - Operations Console → Alert Feed: renders
frontend/pages/index.tsx - Operations Console → Defense Panel: renders
frontend/pages/index.tsx - Operations Console → Error Fallback: renders
frontend/pages/index.tsx - Operations Console → Loading Skeleton: renders
frontend/pages/index.tsx - Operations Console → Model Transparency: presents
README.md - Pipeline Scheduler → Protocol Ingestion: schedules fetching
backend/scheduler.py - Pipeline Scheduler → Hourly Snapshots: schedules snapshots
backend/scheduler.py - Pipeline Scheduler → Risk Evaluation: runs evaluation
backend/scheduler.py - Pipeline Scheduler → Auto Defense: runs defense
backend/scheduler.py - Hourly Snapshots → Protocol Catalog: uses catalog
backend/jobs/hourly_snapshot.py - Hourly Snapshots → Snapshot Storage: writes snapshots
backend/jobs/hourly_snapshot.py - Time-Series Features → Snapshot Storage: reads history
backend/features/basic_timeseries.py - Time-Series Features → Hourly Snapshots: reads snapshots
backend/features/basic_timeseries.py - Risk Evaluation → Risk Model: requests predictions
backend/services/risk_evaluator.py - Risk Evaluation → Risk History: stores assessments
backend/services/risk_evaluator.py - Risk Evaluation → Alert Records: creates alerts
backend/services/risk_evaluator.py - REST API → Risk Evaluation: routes risk calls
- REST API → Crisis Simulation: routes simulations
- REST API → Explainability: requests explanations
- Crisis Simulation → Risk Model: scores scenarios
backend/services/simulation_service.py - Risk Guardian → Risk Evaluation: investigates risk
backend/agent/risk_guardian.py - Risk Guardian → Auto Defense: triggers actions
backend/agent/risk_guardian.py - REST API → Threat Intelligence: exposes monitoring
- Pipeline Scheduler → Proof Submission: submits predictions
backend/scheduler.py - Proof Submission → Stellar Adapter: uses adapter
- Stellar Adapter → Soroban Contracts: writes proofs
README.md - Runtime Configuration → Snapshot Storage: configures database
backend/database.py