Migrate from UniswapV2
Guide on required changes if you come from UniswapV2
Router
andFactory
were combined in ourSwapOperations
contractuse
isPair
,getPair
,allPairs
to 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 usegetAmountsOut
andgetAmountsIn
token0
in each swap pair is always our stablecoinaUSD
we only have
swapTokensForExactTokens
andswapExectTokensForTokens
both 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