open-index/open-npm huggingface dataset:
npm package: @swarmmarkets/smart-order-router
Description: Smart Order Router for liquidity pools
Author: ElvisKrop
Latest version: 0.1.2

<h1 align=center><code>Smart Order Router (SOR)</code></h1>

Smart Order Router, or SOR, is an off-chain linear optimization of routing orders across pools for best price execution.

SOR exists as a way to aggregate liquidity across all Swarm Markets pools.

## Overview Of Use And Example

There are two types of swap available:

**exactIn** - i.e. You want to swap exactly 1 WETH as input and SOR will calculate X amount of SMT you receive in return.  
or  
**exactOut** - i.e. You want to receive exactly 1 SMT and SOR will calculate X amount of WETH you must input.

The SOR will return totalReturn/totalInput as well as a list swaps to achieve the total.