Swap Simulation

some simple examples of swapQuery module

In this tutorial, we will try to pre compute (not calling quoter) exchange amount of tokenIn and tokenOut.

In this tutorial, we mainly talk about swapX2Y mode, other modes (swapX2YDesireY, swapY2X, swapY2XDesireX) are similar to this.

If you are unfamiliar with those 4 swap… modes, you can quickly refer to this page