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
IndexPoolAdded and PoolRemoved events to build the set of active pairs:
Liquidity
The maximum output for a pair is bounded by the target router’s token balance:Quote
Both quote functions areview — no gas, no state changes.
Swap
The caller mustapprove GhostExchange for tokenIn before calling.
Typical flow
Exact input — sell a known amount oftokenIn:
tokenOut:
Revert conditions
Related
- Stableswap on Solana — the same protocol as a native Solana program.
- Stableswaps via the API — the same liquidity through
a single
getActioncall.