Programs

Programs Overview

HyperDex is composed of five Soroban smart contracts (called "programs" in Soroban terminology). They are deployed independently and call each other via cross-contract calls. Each program has a single clear responsibility.

pool_registry

Identity layer

The single source of truth for who is a registered maker and what their signing key is. All other contracts defer to this for maker lookups.

quote_verifier

Taker entry point

The only contract takers interact with directly. Verifies signatures, enforces invariants, orchestrates the maker_pool and fee_distributor.

maker_pool

Custody & swap execution

Per-maker inventory pool. The only contract that moves tokens between taker and maker. execute_swap is callable only by quote_verifier.

maker_pool_factory

Pool deployment

Deploys a dedicated maker_pool for each maker at registration, using a deterministic salt so the address is stable across simulation and execution.

fee_distributor

Fee accounting

Accumulates protocol fees per token. Provides an admin withdrawal function to extract fees to treasury.

HyperDex | Trade Without Limits