Multi-Pool Routing 🆕

Multi-Pool Routing

Multi-pool routing is a mechanism used by DEXs such as in Uniswap. For each order matching block, AMM orders will be generated for a specific market using the aggregate liquidity of all intermediate pools.

Put simply, in a multi-pool market, there are multiple liquidity pools that each contain different pairs of assets, and users can trade between any two assets by routing their trades through one or more of these pools.

By using liquidity from all viable liquidity pools (instead of just one), multi-pool routing brings about better liquidity efficiency.

Here's how multi-pool routing works some more detail:

  1. Asset Pairs: Each liquidity pool in the multi-pool DEX contains a pair of assets, such as $ETH/$USDâ’¼. The ratio of the assets in the pool is determined by a constant product formula, which maintains a fixed ratio between the two assets based on the total value of each asset in the pool.

  2. Swap Execution: When a user wants to trade between two assets, they can do so by executing a swap transaction through one or more of the liquidity pools. For example, if a user wants to trade $ETH for $USDâ’¼, they can route their trade through the $ETH/$SWTH -> $SWTH/$USDâ’¼ pools.

  3. Automatic Route Selection: To obtain the best route for a trade, a pathfinding algorithm, that considers the liquidity and price impact of each pool, will utilize all relevant paths to get the lowest slippage (i.e., the smallest difference between the expected and actual price of the assets).

On Carbon, this is all done by the protocol, and no solver is neccessary. All available liquidity even via multi-hops are displayed on the markets' order books.

Note that multiple liquidity pools with the same token pair (but of different parameters) can also participate on the orderbook at the same time as depicted in the diagram below.

Use cases

Consolidation of USDâ’¼ quoted markets

By integrating this module, Carbon's spot markets that utilize $USDâ’¼ as their quote token will experience increased liquidity, generated through SWTH liquidity pool routes.

Example This module allows the $ETH/$USDâ’¼ spot market to enjoy enhanced liquidity provision by utilizing the ETH-SWTH-USDâ’¼ liquidity pool route, which combines liquidity from both the $ETH/$SWTH and $SWTH/$USDâ’¼ liquidity pools.

This brings about multiple benefits to users:

  • Stable value: $USDâ’¼ is a grouped token on Carbon representing a basket of US dollar-backed stablecoins, meaning its value is pegged to the US dollar. This provides traders with a stable value for their transactions and reduces the risk of price volatility.

  • Easy conversion: $USDâ’¼ can be easily converted into other US Dollar-backed stablecoins, making it easier for traders to move funds in and out of the market. This can reduce transaction costs and increase liquidity.

  • Ease of trading: The US dollar is a widely accepted currency and traders are accustomed to conducting transactions using it. Since the value of $USDâ’¼ is maintained at around parity with the US dollar, the use of $USDâ’¼ as a standard makes computing trade quantities a simple process.

Consolidation of Liquidity Rewards to $SWTH holders

By focusing liquidity rewards of $SWTH liquidity pools,

  • Liquidity rewards can persist as a means of motivating $SWTH liquidity providers (such as those of the $SWTH/$ETH and $SWTH/$USDâ’¼ liquidity pools)

  • Less liquidity rewards are being leaked to mercenary liquidity pools

With $SWTH serving as the primary token in liquidity pool routes, traders can carry on with trading in established and liquid $USDâ’¼-quoted markets (such as the $ETH/$USDâ’¼ spot market) that they are accustomed to.

Last updated