Commit graph

2 commits

Author SHA1 Message Date
Gulshan Yadav
3df4ba0752 feat(oracle): add advanced oracle features for DeFi
Add 6 major oracle enhancements:
- Chainlink-style decentralized oracle with stake-weighted aggregation
- Circuit breakers for flash crash protection with cascade triggers
- Cross-chain price feeds via IBC from Ethereum, Cosmos, etc.
- ML-based anomaly detection using Isolation Forest algorithm
- DeFi liquidation oracles with health factor monitoring
- Black-Scholes options pricing with Greeks and perpetual swaps
2026-01-19 22:26:58 +05:30
Gulshan Yadav
17f0b4ce4b feat(economics): add Phase 12 - Economics & Billing infrastructure
Complete economics service implementation with:

- Price Oracle with TWAP (Time-Weighted Average Price)
  - Multi-source price aggregation
  - Configurable staleness thresholds
  - Exponential, SMA, and standard TWAP strategies

- Metering Service for L2 usage tracking
  - Storage: GB-months, retrieval bandwidth
  - Hosting: bandwidth, custom domains
  - Database: queries, vector searches
  - Compute: CPU core-hours, GPU hours, memory
  - Network: bandwidth, requests

- Billing Engine
  - Invoice generation with line items
  - Payment processing (crypto/fiat)
  - Credit management with expiration
  - Auto-pay from prepaid balance

- Pricing Tiers: Free, Standard, Premium, Enterprise
  - 0%, 10%, 20%, 30% usage discounts
  - SLA guarantees: 95%, 99%, 99.9%, 99.99%

- Cost Calculator & Estimator
  - Usage projections
  - Tier comparison recommendations
  - ROI analysis

- Docker deployment with PostgreSQL schema

All 61 tests passing.
2026-01-19 21:51:26 +05:30