Skip to main content
On EVM, Swaps’ stableswap protocol is integrated through the GhostExchange contract — a single-chain swap interface built on paired CrossCollateralRouter pools, with built-in quoting, slippage protection, and deadline enforcement. It is designed to slot into a DEX aggregator’s routing graph as a standard quote-and-swap venue.

Deployments

Integration is permissionless at default rates. The recipient parameter on quotes is used for fee lookup: recipients with custom pricing configured by Swaps quote at their negotiated rates. Reach out to us to arrange custom pricing for your integration.

Discover available pairs

Index PoolAdded and PoolRemoved events to build the set of active pairs:
To confirm a specific pair on-chain:
A non-zero return means the pair is tradeable. Pairs are bidirectional.

Liquidity

The maximum output for a pair is bounded by the target router’s token balance:

Quote

Both quote functions are view — no gas, no state changes.

Swap

The caller must approve GhostExchange for tokenIn before calling.

Typical flow

Exact input — sell a known amount of tokenIn:
Exact output — buy a known amount of tokenOut:

Revert conditions