PRODUCT MASTER PLAN · PHASE-1 EXECUTION DOSSIER

GreenX
Exchange

The vault was designed before the first deposit exists. The whole exchange planned once — the client rebuilt for every device, the cockpit staffed-ready, three chains feeding a custody core engineered to production standard.

PHASES 1 → 3 PLANNED
BUILD WINDOW 45 DAYS
CHAINS TRON · ETH · BSC
DOMAINS 9 · RESERVED R1–R8
SCROLL ↓
01
POSITION & THESIS

Not a feature project.
A change of ownership
over the machine itself.

GreenX Exchange runs today on a rented SaaS platform. Tomorrow it is a fully self-developed system GreenX owns down to the last key, table, and deploy pipeline — executed without interrupting the business already running on it. Three planning principles govern the program, fixed now and enforced architecturally forever.

PRINCIPLE 01

Own the machine, keep the logic

Years of proven business logic — accounts, asset flows, eco interoperation — are retained as the functional spec. The implementation beneath them is replaced with one GreenX controls. Not a redesign; a repossession.

PRINCIPLE 02

Security before trading

Phase 1 builds the asset-security and custody architecture to production standard first; the matching engine waits for Phase 2. An exchange survives a delayed feature. It does not survive a custody failure.

PRINCIPLE 03

Built, reserved, or planned

There is no fourth state. "Reserved" is a Phase-1 engineering obligation — interface cut, schema provisioned, tests pre-written. Never a slide-deck aspiration.

02
THE REBUILD DOCTRINE

Retain the logic.
Replace the machine.
Never interrupt the business.

Renting an exchange was right when speed mattered most. It is the wrong steady state for a platform that intends to matter. Four arguments, and they compound — watch what ownership changes:

ARGUMENT 01

Custody transparency

On SaaS, key generation and signing paths are a vendor's black box — GreenX carries liability for security it cannot inspect.

SAAS
OPAQUE
OWNED
AUDITED
ARGUMENT 02

The eco-account moat

The asset bridge to 3–5 GreenX apps is the genuine differentiator — exactly what multi-tenant SaaS can only half-support.

SAAS
NEGOTIATED
OWNED
FIRST-CLASS
ARGUMENT 03

Rent vs equity

SaaS fees purchase continuity, not equity: no codebase, no data asset, no compounding capability.

SAAS
SUNK
OWNED
COMPOUNDS
ARGUMENT 04

Uptime sovereignty

Multi-tenant platforms share incidents and upgrade windows across tenants. GreenX's uptime should be a function of GreenX's engineering.

SAAS
SHARED FATE
OWNED
SOVEREIGN
RETAIN THE LOGIC
REPLACE THE MACHINE
NEVER INTERRUPT
03
THE WHOLE-PRODUCT MODULE MAP

Nine domains. Three states.
Decided now.

The contract between phases. BUILT ships inside the 45-day window. RESERVED means the socket exists before the plug. PLANNED is roadmapped with explicit dependencies. Note the shape: on this program, the vault is BUILT and the engine is RESERVED — security before trading, made structural.

SHIPS IN 45 DAYS   SOCKET INSTALLED   ROADMAPPED
#DomainPhase-1 state
D1Product Planning & UI/UX Design SystemThe whole exchange drawn once · IA · flows · component system · prototype · handoffBUILT
D2Web App — User Center, KYC & Security (PWA)16 modules · OTP · eKYC state machine · WebAuthn · TOTP · web push · install-to-home-screenBUILT
D3Web App — Asset Center & Eco Account16 modules · multi-chain deposit/withdraw · internal transfers · eco out/return · unified statementsBUILT
D4Web App — Spot & Futures Trading UI16 modules · production display grade on third-party data · execution gated to Phase 2BUILT R1 SOCKET
D5Web3 Wallet Module8 modules · authorize + UID bind · eco→DApp transfers · create/import gated per briefBUILT
D6Admin Ops, Data & Reporting Cockpit20 modules · KYC desk · withdrawal desk · config · ETL · reconciliation · risk boardBUILT
D7Asset-Security & Custody Architecture14 modules · TRON/ETH/BSC · hot/cold gradient · multisig · approval workflows · the Phase-1 priorityBUILT · PROD STD
D8Matching Engine & Live Order ExecutionInterface pre-cut · quantitative core exists in Perp Solution v0.1RESERVED
D9Native Apps · More Chains · Fiat ChannelsSame API surface · R4/R7 shells · admitted by dependency chainPLANNED
04
PHASE-1 EXECUTION MODEL

Everything to production standard —
except the one thing deferred on purpose.

The brief's own principle, taken seriously rather than apologetically: matching and live execution are Phase 2. What that discipline buys in 45 days:

A finished product surface

Users see and touch the entire exchange — onboarding, security, assets, eco flows, markets, wallet — indistinguishable in polish from a live venue.

Custody that is real from day one

Deposits, balances, transfers and withdrawals are production systems holding real assets under the D7 architecture. The most dangerous subsystem ships first and hardest.

An operations organization, not just software

The cockpit plus runbooks mean the platform is operable — staffed reviews, reconciliations, alerts — before trading volume arrives to stress it.

A clean Phase-2 runway

The floor consumes a normalized internal schema and the ledger already carries trading journal classes — switching on the engine changes the producer of events, not the consumers.

ONBOARDING, END TO END — LIVE
05
THE EXTENSION DOCTRINE

Eight sockets,
installed before the plugs exist.

R1

Execution Core Socket

The floor consumes one normalized market-data and order-state schema. Phase 1's producer is the feed relay; Phase 2's is the in-house engine. A producer swap — clients notice nothing.

R2

Order & Trade Schema Forward-Compat

Order, trade and position tables ship complete — populated by display states now, activated by the engine later. Live trading activates columns; it never migrates tables.

R3

Ledger Universality

Trade-settlement, fee and margin journal classes pre-cut; trading and eco accounts share one ledger and one conservation invariant from birth.

R4

Custody Chain Abstraction

Every chain integrates through one adapter contract — derivation, scanning, broadcasting, finality policy. Chain N+1 is an adapter plus configuration, not a project.

R5

Eco Interop Contract

The 3–5 eco apps connect through a versioned adapter API — auth, intents, callbacks, idempotency, quotas. Onboarding app N+1 becomes registration, not development.

R6

Compliance & KYC-Tier Hook

Limits, features and jurisdictions key off KYC tier at the auth and withdrawal choke points from day one. An RWA tier is configuration, not surgery.

R7

Client Shell Neutrality

PWA and future native apps are shells over one API surface; WebAuthn maps to biometrics, Web Push to FCM/APNs. Phase 3 inherits everything, re-implements nothing.

R8

Data & BI Substrate

Every ledger and operational event doubles as an analytics fact through the cockpit's ETL. Phase-3 BI consumes the log Phase 1 writes.

06
MIGRATION & CONTINUITY

A rebuild that drops the business
is a failure. So it can't.

Parallel-track doctrine: the SaaS platform keeps serving users for the whole window; logic parity is signed off before improvement; data migration is a rehearsed, replayable event; and cutover proceeds by cohort with the old system as fallback. Watch a cohort move:

SAAS PLATFORMLEGACY · SERVING THROUGHOUT
GREENX SELF-DEVELOPEDMIGRATED · 0%
COHORT 1
COHORT 2
COHORT 3
COHORT 4
COHORT 5
EVERY COHORT REVERSIBLE · RECONCILIATION REPORT PER WAVE · NO SINGLE DAY BETS THE COMPANY
07
ROADMAP

Every phase boundary is an activation,
not a construction site.

PHASE 1 · DAY 0–45

The Framework

The complete self-developed exchange — client, cockpit, custody, eco fabric — operable and holding real assets, with trading display-complete. Seven weeks, exit criteria per week, interfaces frozen in week one.

PHASE 2A

The Engine

In-house matching and live execution — spot first, then futures — activated behind the existing floor with shadow validation against the reserved schemas, per the quantitative core already written.

PHASE 2B

The Wallet

Create/import and the full DApp runtime graduate from "coming soon" gates to production, extending the eco fabric on-chain.

PHASE 3

The Franchise

Native apps on the R7 shell, additional chains through R4 adapters, fiat channels, deeper BI on R8, and RWA listings under the R6 policy machinery.

P1 · THE FRAMEWORK
2A · THE ENGINE
2B · THE WALLET
P3 · THE FRANCHISE
08
ARCHITECTURE · LEDGER CORE

Money is a log.
Everything else is a view.

State_t = f( State_0, e_1, e_2, …, e_t )          // every posting strictly double-entry
Σ balances (trading + eco) + fees + treasury float  =  Σ deposits − Σ withdrawals
§11 — bit-identical replay · exactly-once economics · shadow validation for the Phase-2 engine

Every monetary state change — credit, transfer, eco movement, fee, withdrawal — is one sequenced journal event, debiting one account class and crediting another. Conservation is asserted continuously, not audited quarterly. Watch the journal breathe:

$ greenx ledger --tail --assert-conservation
09
ARCHITECTURE · THE CUSTODY PLANT

Three chains in.
One gradient down.
Approval back up.

The Phase-1 centerpiece, running live: TRON, Ethereum and BNB Chain feed reorg-safe scanners; the hot wallet fills toward the watermark W*, then sweeps to cold multisig. The only road back runs through machine risk checks and a 2-of-N approval gate.

TRONTRC20 · 12/19 CONF
ETHEREUMERC20 · 7/12 CONF
BNB CHAINBEP20 · 9/15 CONF
SCANNERSREORG-SAFE · NEVER CREDIT BLIND
HOT WALLET
W*
WATERMARKED
COLD STORAGEMULTISIG · CEREMONY · OFFLINE
⟵ WITHDRAWALS
2-OF-N
APPROVAL
// keys are governed, not kept
KMS envelope keys · role separation · scheduled rotation · single-call revocation
every control is cryptographic, double-entry, or dual-control
// no security property rests on one honest human
§12, §17 — compromise exposure bounded by W* · everything above it lives behind the ceremony
10
ARCHITECTURE · THE ECO FABRIC

The moat is not a feature.
It's an accounting theorem.

Every movement between the exchange and a GreenX eco application posts as a paired journal — debit here, credit there — so conservation extends across the whole ecosystem. An eco app can never mint, strand, or double-spend platform assets without tripping the invariant. Try it yourself:

ECO-ACCOUNT TRANSFER — LIVE LEDGER
EXCHANGE900,000.00
ECO APP100,000.00
1,000,000.00Σ CONSERVED (I3)
$ greenx eco --tail --paired-journals
Σ exchange balances + Σ eco-app balances = Σ deposits − Σ withdrawals
// per asset · continuously asserted
adapter contract: per-app keys · transfer intents · idempotency · quotas · quarantine switch
§14 — onboarding eco app N+1 is registration in the cockpit, not bespoke development
11
MATHEMATICS · CONFIRMATION POLICY

Confirmations scale
with value at risk.

P(reorg ≥ k) ≈ (q/p)^k          k(V) = ⌈ log(ε/V) / log(q/p) ⌉
// per chain · per tier · never one magic number
§18 — the deposit UX shows policy progress n / k(V), never a false universal constant
k(V) — CONFIRMATION SCHEDULE — INTERACTIVE
$10,000
TRON · TRC20
k = 14
ETHEREUM · ERC20
k = 10
BNB CHAIN · BEP20
k = 12
ILLUSTRATIVE (q/p, ε) PARAMETERS · REVIEWED AS CHAIN CONDITIONS EVOLVE
12
MATHEMATICS · WITHDRAWAL RISK ENGINE

Every request is scored
before it is routed.

S(w) = Σᵢ βᵢ·xᵢ(w)
xᵢ ∈ { amount/tier-limit · velocity(1h·24h·7d) · address novelty · device/geo drift · KYC tier }
route:   S < θ₁ → auto-approve
         θ₁ ≤ S < θ₂ → dual-approval review
         S ≥ θ₂ → block + alert
§20 — thresholds (β, θ) are cockpit-configured, versioned, effective-dated · risk policy is data, never a redeploy
RISK SCORE ROUTER — INTERACTIVE
35%
20%
10%
AUTO-APPROVE
DUAL REVIEW
BLOCK + ALERT
28RISK SCORE S(w)
AUTOROUTE
13
MATHEMATICS · TREASURY & THE KYC FUNNEL

Hold enough to serve.
Not one coin more.

// hot-wallet watermark — a newsvendor bound on compromise exposure
// the same construction sizes each chain's gas float
W* = μ_out·T + z_ε·σ_out·√T
minimize  c_risk·E[hot] + c_fee·N_sweeps      s.t.  P(stockout) ≤ ε
§19 — threshold-triggered sweeps, not timers · exposure_α = W* + pending + in-flight, alarmed on excursion

And onboarding is a funnel whose product is conversion — every stage instrumented, vendor SLOs monitored, appeal a first-class state:

CAPTURE
p₁ = .96
DOCUMENT QUALITY
p₂ = .91
LIVENESS
p₃ = .94
VENDOR VERIFY
p₄ = .95
P(COMPLETE) = Π pᵢ ≈ 78.0% · DECISION P90 ≤ 5 MIN · DEGRADING VENDOR = DASHBOARD FACT BEFORE COMPLAINT FACT
14
THE RESERVED ENGINE & THE BUDGETS

The Phase-2 engine is
already written.

// the matching core is already specified — GreenX DEX Perp Solution v0.1
// spot matching is a strict subset · it activates first
M/M/1 envelope:  ρ = λ/μ = 0.1  at  μ = 5×10⁵ ev/s, λ = 5×10⁴/s   ⇒   E[W] = 1/(μ−λ) ≈ 2.2 µs
§23 — the R1/R2/R3 sockets in this platform are shaped to that specification · two documents, one program
PWA · LCP (P75 MOBILE)
≤ 2.5 s
PWA · INP (P75)
≤ 200 ms
GATEWAY API P50 / P99
30 / 120 ms
MARKET-DATA STALENESS P99
≤ 500 ms
SCANNER LAG (STEADY, PER CHAIN)
≤ 2 blocks
ECO ROUND-TRIP (EX APP DWELL)
≤ 5 s
15
INVARIANTS & FAILURE DOCTRINE

What the system
will never permit.

Note what is different from a trading-first program: all six invariants are live on day one — because Phase 1's product is the money machine. The trading invariants arrive with their engine, tests already written.

$ greenx invariants --assert --continuous
I1 ✓ Σ debits = Σ credits double-entry · every event, atomically [PHASE 1 →]
I2 ✓ bal + fees + float = dep − wd funds conservation · halts wd on breach [PHASE 1 →]
I3 ✓ Σ exchange + Σ eco = dep − wd cross-boundary conservation [PHASE 1 →]
I4 ✓ credited ≤ sealed − k(V) scanner monotonicity · no blind credits [PHASE 1 →]
I5 ✓ tier policy at choke points no sensitive action without evaluation [PHASE 1 →]
I6 ✓ replay(log) ≡ state bit-identical determinism [PHASE 1 →]
+ trading invariants (ΣQ=0 · PnL zero-sum · book uncrossed) [PHASE 2 · pre-written]
FAILURE

Chain RPC outage

Adapter probes pause that chain's lane only; deposits show "delayed", withdrawals queue.

→ failover endpoint · catch-up scan
FAILURE

Scanner stall

Heartbeat lapse pauses crediting — the platform never credits blind.

→ resume from sealed block, idempotent
FAILURE

eKYC vendor down

Submissions queue, manual-review lane widens, status banner shows.

→ drain on recovery · no state lost
FAILURE

Ledger↔chain↔wallet drift

Reconciliation alarms; freezes the affected lane above threshold.

→ log replay · dual-signed correction
FAILURE

Hot-wallet anomaly

Watermark and outflow monitors freeze withdrawals, isolate keys.

→ ceremony re-key · post-mortem
FAILURE

Eco app misbehaving

Quota or I3 trips quarantine that adapter — that app's lane only.

→ reconcile paired journals · re-admit after review

The vault was designed before the first deposit exists.

The module map fixes what exists; the reservation doctrine fixes how it grows; the custody mathematics fixes what any incident can cost; the invariants fix what the system will never permit. Phase 2 requires only the turning of keys that Phase 1 installs.

GREENX EXCHANGE — SELF-DEVELOPED · SOVEREIGN · CONSERVED