Open mds1 opened 3 years ago
Uniswap recently released the Auto Router for Uniswap V3. This is now preferred over the method linked in the above comment
If we also support V2 swaps (https://github.com/dcgtc/dgrants/discussions/263), we should use Uniswap's V2 routing algorithm in that case
In #110 we hardcoded swap paths for known liquid token pairs. This is not ideal/robust/scalable, so a smarter pathfinding algorithm should be implemented.
The easiest way to do this is likely to use this method from the Uniswap interface
useMemo
and addchainId
as an input