synor/contracts/oracle
Gulshan Yadav 688d409b10 feat(dex): add Phase 15 - DEX Ecosystem with Perpetuals Trading
Implements comprehensive DEX infrastructure:

- contracts/perps (81KB WASM):
  - Long/Short positions with 2x-100x leverage
  - Funding rate mechanism (keeps price anchored to spot)
  - Liquidation engine with insurance fund
  - Mark price (EMA) vs index price (oracle)
  - Maintenance margin (0.5%) and initial margin (1%)

- contracts/oracle (80KB WASM):
  - Multi-source price aggregation (median)
  - TWAP (Time-Weighted Average Price)
  - Stale price detection
  - Confidence intervals

- contracts/aggregator (94KB WASM):
  - Cross-chain liquidity routing via IBC
  - Best price discovery across multiple DEXs
  - Split routing for large orders
  - Zero-capital model (aggregation fees only)

This enables dYdX/GMX-style trading without requiring capital.
2026-01-19 19:22:02 +05:30
..
src feat(dex): add Phase 15 - DEX Ecosystem with Perpetuals Trading 2026-01-19 19:22:02 +05:30
Cargo.toml feat(dex): add Phase 15 - DEX Ecosystem with Perpetuals Trading 2026-01-19 19:22:02 +05:30