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.
24 lines
537 B
TOML
24 lines
537 B
TOML
[package]
|
|
name = "synor-perps"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
authors = ["Synor Team <team@synor.cc>"]
|
|
description = "Perpetual futures trading contract with leverage up to 100x"
|
|
license = "MIT OR Apache-2.0"
|
|
|
|
[lib]
|
|
crate-type = ["cdylib", "rlib"]
|
|
|
|
[features]
|
|
default = []
|
|
|
|
[dependencies]
|
|
synor-sdk = { path = "../../crates/synor-sdk", default-features = false }
|
|
borsh = { version = "1.3", default-features = false, features = ["derive"] }
|
|
|
|
[profile.release]
|
|
opt-level = "z"
|
|
lto = true
|
|
codegen-units = 1
|
|
panic = "abort"
|
|
strip = true
|