Skip to article Rheafinance

Rheafinance: RHEA DEX swaps without a direct pool

Updated:

RHEA DEX, RHEA Finance’s exchange on NEAR, can swap tokens without a direct pool when other pools form a usable path. Its smart router compares available combinations to seek maximum output for the swap.

Routing inputs
Pool liquidity depth and the swap fee configured for each pool.
Path selection
Linked pools can connect tokens; the router may also split a swap across multiple pool paths.
Output-defined swaps
RHEA DEX supports selecting an output amount and calculating the input required to obtain it.

How a connected pool path works

A direct pool contains the two tokens being exchanged. A linked path uses intermediate tokens to connect pools between those assets. Each pool’s output becomes the next pool’s input, so the route requires usable liquidity in every pool along it.

Each pool creator sets its pool’s swap fee. Smart routing tracks fee configuration and liquidity depth, then simulates the requested swap across available pool combinations.

Linked routes and split swaps

A route can contain several pools, while a split swap divides the requested amount across several paths. Smart routing can select a combination of paths to pursue higher output for the swap. A direct pool, when present, can be part of the available choices.

The selected combination depends on the requested amount and the pool conditions used in the simulation. Changes in liquidity or fee configuration can change which paths the router selects.

Visual summary: Rheafinance - Linked routes and split swaps

View full-size image

Amount limits alongside route selection

RHEA DEX supports setting a minimum swap-out amount or maximum swap-in amount to limit slippage. A minimum swap-out sets a floor for tokens received; a maximum swap-in caps tokens spent.

For an output-defined swap, the exchange calculates the input needed to obtain the specified output. Comparing that required input answers a different question from maximizing output for a given input amount.

Pool routing and cross-chain quotes

Chaining pools on the NEAR DEX is distinct from RHEA Finance’s cross-chain service built on NEAR Intents. That service aggregates quotes from solvers that compete to fulfill a requested outcome. A verifier contract checks the fill and settles it on NEAR.

Checks for a routed NEAR swap

  • If no direct pool exists, establish whether connected pools provide a usable path between the tokens.
  • When comparing pool combinations, include each pool’s configured fee and assess the complete simulated output.
  • If the received amount must be specified, compare the input required for the output-defined swap.
  • Use the applicable minimum output or maximum input setting to define acceptable swap amounts.