Start

Architecture

HyperDex is a hybrid off-chain/on-chain system. The division of responsibilities is strict: everything that can be done off-chain is done off-chain (pricing, competition, selection), and everything that must be trustless is done on-chain (signature verification, atomic token transfer, fee collection).

1. request quote2. sealed RFQ3. signed quote2. sealed RFQ3. signed quote4. winning quote5. execute_quote(quote, sig)get_makerexecute_swapfeetoken_outTaker(Wallet)HyperDex BackendRFQ Router · Price BookMaker A(SDK)Maker B(SDK)quote_verifierpool_registrymaker_pool(per maker)fee_distributor
Steps 1–4 happen off-chain and cost nothing. Only step 5 touches the ledger, and it either settles atomically at the signed price or reverts.

Why this split?

Putting pricing on-chain would mean every price update costs gas and is publicly visible — giving arbitrageurs a free look at market intent. Keeping pricing off-chain means makers can react to real-world market conditions in milliseconds, with no gas cost, while the on-chain layer only sees the final signed commitment.

The on-chain contracts do exactly one thing: verify that a registered maker cryptographically committed to a price, then atomically execute it. There is no room for manipulation between the quote and the settlement.

Component Summary

ComponentLocationWhy it exists
BackendOff-chain serverCoordinates the auction: broadcasts RFQs to makers, collects bids, selects best, serves result to frontend
Maker SDKOff-chain (each maker)Prices swaps using oracle data, signs quotes with ed25519, submits bids to backend
FrontendBrowserTaker UI — connects any Stellar wallet via Wallets Kit, starts auctions, shows results, submits the signed quote on-chain
pool_registrySoroban contractStores which addresses are registered makers and what their hot signing keys are
quote_verifierSoroban contractTaker calls this — verifies ed25519 signature, checks expiry, calls the maker_pool and fee_distributor
maker_poolSoroban contract (one per maker)Custodies that maker’s token inventory; executes the atomic token swap on instruction from quote_verifier
maker_pool_factorySoroban contractDeploys a dedicated maker_pool per maker at registration (deterministic salt)
fee_distributorSoroban contractAccumulates protocol fees per token; admin-controlled withdrawal to treasury
HyperDex | Trade Without Limits