This repository is a Soroban port of GMX Synthetics contracts. The open-source issue campaign produced useful work, but also left historical docs, stale claims, and non-Soroban artifacts in the tree. Use this file as the cleanup map before opening new implementation work.
| Area | Source |
|---|---|
| Architecture decisions | IMPLEMENTATION_PLAN.md |
| Operator docs | README.md, mx/README.md |
| Contributor rules | CONTRIBUTING.md |
| Security posture | SECURITY_REVIEW.md |
| Historical issue context | issues_v2.md |
| Actual implementation state | Rust code and cargo test --workspace |
- Requests and positions are stored locally in their handler contracts.
data_storeis for shared config, pool accounting, lists, and fee/accounting values, not for primary request/position structs.- User token movement enters through
exchange_router; handlers snapshot vault receipts instead of pulling arbitrary user balances. - The v1 oracle path is custom keeper signatures with ed25519 verification.
- Core storage and vault contracts are immutable unless the Rust code exposes an
upgradeentrypoint.
Upgradeable in the current Rust code:
deposit_handlerorder_handlerliquidation_handlerfee_handlerreferral_storagereaderexchange_router
Immutable in the current Rust code:
role_storedata_storeoraclemarket_factorymarket_tokendeposit_vaultwithdrawal_vaultorder_vaultwithdrawal_handleradl_handler
These directories are not workspace members and are written against MultiversX APIs, not Soroban:
libs/deposit_flowlibs/withdrawal_flowlibs/position_listlibs/storage_ttl
Do not copy patterns from these directories into Soroban contracts. The next cleanup PR should either delete them, move them under an explicit archive, or port any still-useful idea into active Soroban crates.
- Delete or archive the MultiversX artifacts listed above.
- Reconcile
issues_v2.mdinto a smaller live backlog with statuses:done,partial,deferred,obsolete,needs-audit. - Verify README manual deployment commands against generated contract specs or
stellar contract inspectoutput after a fresh build. - Run
cargo test --workspaceand record any failing crates as the real launch blocker list. - Add a small
docs/config-keys.mdcatalog generated fromlibs/keys. - Add a small
docs/events.mdcatalog from emitted event topics. - Decide whether immutable-but-stateful
withdrawal_handlerandadl_handlershould remain immutable for v1 or receive upgrade entrypoints before launch.
- No stale docs claiming all protocol state lives in
data_store. - No production path using test-only oracle price helpers.
- No role-gated public function without a negative authorization test.
- No custody contract upgradeability unless explicitly re-reviewed.
- No workspace-visible non-Soroban crates.
- No mainnet deployment without Stellar multisig admin custody.