@elvis-krop/smart-order-router
v0.1.37
Published
Smart Order Router for liquidity pools
Downloads
80
Readme
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.