Overview
Having looked at how Nexus LP pools support self-custodial, price-range-based liquidity, we now turn to the core of the system: the swap execution engine.
The section below explains how DotSwap’s engine pulls liquidity from Nexus-run CLMM nodes and custodial CPMM pools, builds efficient multi-party PSBTs, and finalizes trades directly on Bitcoin Layer 1.
DotSwap’s engine coordinates the entire trade process for assets on Bitcoin. It gathers pricing from different liquidity sources, plans the trade route, and completes the swap without taking custody of user funds. At the center is the Nexus Engine, which gathers trade depth from multiple providers, including CPMM and CLMM types, and combines them into the best available swap plan.
When a user sends a trade request (market or limit), the engine:
Combines Prices from Nexus Nodes and the DotSwap LP into a unified order book.
Finds the Best Route by spreading the swap across different makers to reduce slippage and fees.
Builds a PSBT, adding outputs for slippage protection, fees, and optional UTXOs for high-frequency traders.
Handles Signatures by sending draft PSBTs to each Maker for signing, then returning the final version to the Taker.
Broadcasts the Transaction to the Bitcoin network once fully signed.
This approach removes counterparty risk, uses Bitcoin’s built-in PSBT and multi-sig features, and delivers execution quality close to centralized exchanges. Traders keep full custody of their funds and access reliable liquidity with protections against slippage and double spends.
Last updated