transaction.
then how'd u calculate the price impacts to avoid getting frontrunned??
?
Could you share an example code?
amount = router.getAmountsOut(inputAmount,path]; amount = amount - amount * slippage%; And use that amount as amountOutMin
so you're subtracting amount with amount? amount - amount
Обсуждают сегодня