Migrate from UniswapV2
Guide on required changes if you come from UniswapV2
RouterandFactorywere combined in ourSwapOperationscontractuse
isPair,getPair,allPairsto check out SwapPairsbesides a fixed 0.3% swap fee, we have an additional dynamic fee on swaps, that move peg away from oracle price.
don't use
quote, as it wont include dynamic fee, so only usegetAmountsOutandgetAmountsIntoken0in each swap pair is always our stablecoinaUSDwe only have
swapTokensForExactTokensandswapExectTokensForTokensboth functions have a different signature from UniswapV2, which is the additionnal parameter
bytes[] memory priceUpdateData. Just prrovide an empty array as we already update the PYTH oracle in regular intervals.
Last updated