Open Perps for everyone. The whole product, decided before the first line of code — a venue in 45 days, an engine already derived, a franchise already mapped.
GreenX Dex is a perpetual futures venue with a Web3-native identity layer: wallet in, Hyperliquid-benchmark order book, USDT settlement. No email. No password. No friction. The program is governed by three planning principles — fixed now, enforced architecturally forever.
Every module the end-state product will ever contain is architected before Phase 1 begins. Later phases extend through interfaces reserved in advance — nothing is ever rebuilt.
Matching, liquidation and market making are the last components to self-operate, not the first. Phase 1 stands on institutional-grade external risk machinery while the in-house designs mature.
There is no fourth state. "Reserved" is a Phase-1 engineering obligation — interface cut, schema provisioned, tests pre-written. Never a slide-deck aspiration.
The category produced three archetypes. Hyperliquid and dYdX proved the order book wins — at the cost of purpose-built chains, years, and token treasuries spent renting liquidity. GMX-lineage pools bootstrap fast and stay capital-capped forever. GreenX takes the third door with a pre-cut exit: route-through execution now, with the order-book-native end state already specified and an engine swap that is a routing decision, not a rewrite.
// the lesson the leaders converged on, adopted here as module R6 no market ships without funded liquidity behind it — governance as an inequality, not a slogan
Hyperliquid · dYdX — purpose-built chains, years, token treasuries.
GMX lineage — fast bootstrap, capital-capped forever.
GreenX Phase 1 — own the client, identity, custody, revenue. Exit ramp pre-cut (R1).
The contract between phases. BUILT ships inside the 45-day window. RESERVED means the socket exists before the plug — interface, data model and extension point constructed in Phase 1. PLANNED is roadmapped with a defined dependency chain.
| # | Domain | Phase-1 state |
|---|---|---|
| D1 | Trading DApp — wallet-login web client32 modules · connect ×3 · SIWE · book ladder · TradingView · full order lifecycle | BUILT |
| D2 | Admin Operations Cockpit20 modules · treasury · fees · risk display · audit-trailed everything | BUILT |
| D3 | Execution LayerBroker-grade routing core behind the R1 interface | BUILT R1 RESERVED |
| D4 | Market Data Layer12 modules · L2 mirror with checksums · private streams · fan-out | BUILT |
| D5 | Custody & Treasury15 modules · ETH+BSC scanners · double-entry ledger · hot/cold gradient | BUILT |
| D6 | In-house Matching, Risk & Liquidation EngineFully specified in Perp Solution v0.1 — mathematics finished | RESERVED |
| D7 | DMM & Hedging EngineAvellaneda–Stoikov quoting + delta hedge, dimensioned | RESERVED |
| D8 | Advanced Order SuiteTP/SL · conditional · cross-margin — schema fields dormant in Phase 1 | RESERVED |
| D9 | Mobile Apps & Additional MarketsSame API surface · admitted under the R6 gate | PLANNED |
One deliberate decision makes it possible: execution routes through the Binance Link broker program. Every user maps to a segregated venue sub-account; margin, brackets, mark price, funding and liquidation run on battle-tested machinery and mirror to the user in real time. What GreenX builds — and owns:
Wallet connect, SIWE auth, the full trading interface, assets, deposits, withdrawals. The routing substrate is invisible — the experience is GreenX end to end.
Auto-provisioned UIDs bound to wallet signatures, mapped 1:1 to sub-accounts, with key issuance, scoping, rotation and revocation under GreenX custody.
ETH + BSC deposit detection, double-entry ledger with conservation invariants, master↔sub orchestration, hot-wallet watermarks, cold storage, dual-approval withdrawals.
Fee/markup at ledger level plus broker-rebate ingestion and reconciliation — two audited revenue captures per trade.
The venue is operable by GreenX staff on day one, no engineering intervention required.
The display-and-distribution half of an exchange — built once, serving Phase 1's mirror and Phase 2's native engine unchanged.
// revenue per executed trade of notional N — ledger-native, reconciled daily Revenue(trade) = m_p · N + r · f_v · N // platform markup + broker rebate
One interface, two implementations: BinanceLinkVenue now, GreenXNativeEngine next. The engine swap is per-market, reversible, shadow-testable.
Tiers, bands, caps and brackets as versioned data from day one — venue-synced in Phase 1, native-engine-consumed in Phase 2. Zero schema change.
Dormant trigger, TP/SL and TIF fields ship in the Phase-1 model. Advanced orders activate columns; they never migrate tables.
Journal classes for insurance fund, MM inventory and funding settlement pre-cut. Retro-fitting a ledger is the costliest venue mistake — GreenX never will.
Clients consume a normalized internal schema, never venue payloads. When the native engine becomes the producer, clients notice nothing.
Every market creation passes a hedgeability gate — advisory in Phase 1, binding in Phase 2. The industry's hardest-won rule, pre-wired.
A policy evaluation point in the auth path from day one. Tightening jurisdiction rules is configuration, not surgery.
Every sequenced event doubles as an analytics fact. Phase-3 BI consumes the log Phase 1 writes — zero re-instrumentation.
Branded, operable, revenue-generating perpetuals platform. Two markets, full custody, complete operational control. Weeks 1–7 sequenced with exit criteria; interface freeze in week one.
The DMM and hedging engine activate on routed markets first — inventory limits, hedge reconciliation and PnL attribution built into muscle memory under the safest possible conditions.
In-house matching, risk and liquidation per the finished mathematics below. Market-by-market cutover, shadow-run validated, insurance fund funded, invariants I1–I6 fully armed.
Mobile apps on the existing API surface, new markets admitted under the hedgeability score, cross-margin on the R3 schema, professional API tiering.
State_t = f( State_0, e_1, e_2, …, e_t )
Every monetary state change is an append-only, totally ordered log entry. A regulator's question is answered by re-running history. The Phase-2 engine is validated by consuming the same stream in parallel and diffing against venue truth for weeks before it takes a single live order. Confirmation policy, likewise, is a probability statement — not a folk custom:
// and the ledger never stops asserting conservation — invariant I3, live from day one: Σ balances + fees + treasury float = Σ deposits − Σ withdrawals
Watch a single order traverse the Phase-1 pipeline. Green is inside GreenX — microseconds. Red is the venue leg — milliseconds. Every station is idempotent: retries collapse onto the same journal entry by construction.
// venue rate budgets enforced as a token-weight ledger per API key a(t) = min( B, a(t₀) + r·(t − t₀) ) admit ⇔ a(t) ≥ w_c t_retry = t₀·2^k + U(0, j) // exponential backoff + jitter under 429/418
Deposits concentrate down a one-way gradient — user addresses, watermarked hot wallet, cold multisig. The only road back runs through a two-of-N approval gate. Watch the plant run: the gauge fills toward the watermark W*, then sweeps to cold.
// confirmations are a probability statement, not a folk custom P(reorg ≥ k) ≈ (q/p)^k k(V) = ⌈ log(ε/V) / log(q/p) ⌉ // scale with value at risk // hot-wallet watermark — a newsvendor bound on compromise exposure W* = μ_out·T + z_ε·σ_out·√T stockout ≤ ε · exposure ≤ W*
The reserved engine's triggers are closed-form. With entry E, leverage L, tiered maintenance m and taker fee f_t (m′ = m + f_t — the forced close pays fees too):
Long: P_liq = E · (1 − 1/L) / (1 − m′) Short: P_liq = E · (1 + 1/L) / (1 + m′) Bankruptcy: P_bkr = E · (1 ∓ 1/L) Partial: x* = (ρ|Q|P − Eq) / (|Q|P(ρ − c))
A live sandbox of the §18 mathematics. You have $1,000 of margin. Choose a side, choose leverage — and the same closed-form liquidation line the engine computes will hunt your position across a random-walking market. Green line: your entry. Red line: where the whistle blows.
// index: MAD-filtered, volume-weighted median — 50% breakdown point reject i if |pᵢ − p̃| > κ·MAD(t), κ = 5 B_t = λ·B_{t−Δt} + (1−λ)·(mid − P_idx), λ = e^(−Δt/60s) P_mark = P_idx + clip( B_t, ±0.5%·P_idx ) // funding: impact-price premium, TWAP over 8h — manipulation cost ∝ time-integral of displacement prem(t) = [ max(0, ImpactBid − P_idx) − max(0, P_idx − ImpactAsk) ] / P_idx F = P̄ + clip( 0.01% − P̄, ±0.05% ), |F| ≤ 0.75%, Σ transfers ≡ 0 // peer-to-peer, zero-sum
The reserved DMM quotes around an inventory-adjusted reservation price (Avellaneda–Stoikov), and its stale-quote risk is a function of refresh latency — which is why the sub-millisecond internal budget exists in Phase 1, before the desk does.
r_t = s_t − q·γ·σ²·(T−t) δ_a + δ_b = γσ²(T−t) + (2/γ)·ln(1 + γ/k) p_pickoff = 2·Φ( −(δ/2) / (σ_$·√Δt) ) // spread must scale as √latency
// hedging economics — every fill netted 250 ms, fired as one IOC on the reference venue E[PnL_rt] = δ_eff − 2f_m − c_hedge − E[adverse] Var[PnL_gap] = q_f²·σ_$²·Δt_h VaR_α = z_α·σ_$·√Δt·|Δ_net| W* = μ_out·T + z_ε·σ_out·√T // hot-wallet watermark H = w₁·ln(D_imp) − w₂·s_ref − w₃·(σ/σ_BTC) ≥ H_min OI_max = φ·D_imp // listing gate, R6 quantified
// matching envelope, M/M/1 — measured μ = 5×10⁵ ev/s, design load λ = 5×10⁴/s ρ = λ/μ = 0.1 E[W] = 1/(μ−λ) ≈ 2.2 µs // p99 lives in fsync + fan-out, not matching
Health probes detect; opens halt, cancels queue, banner shows.
Feed-age SLO breach gates quote-consuming features, discloses degraded mode.
Heartbeat lapse pauses crediting — the platform never credits blind.
Reconciliation alarms; hard-halts the account above threshold.
Watermark and outflow monitors freeze withdrawals, isolate keys.
Quorum re-elects; the log is the single source of truth.
It requires only the turning of keys that Phase 1 installs. The module map fixes what exists; the reservation doctrine fixes how it grows; the mathematics fixes how it behaves under stress; the invariants fix what it will never permit.