sellToken. They also should approve the
allowanceTarget(typically the Exchange Proxy) to spend at least the same amount for that token.
eth_estimateGasRPC call returns. Adding a 20-50% buffer to the estimated gas is recommended. Any unused gas will be refunded to the transaction submitter.
slippagePercentagequery parameter, and is denominated such that
1 = 100%,
0.01 = 1%(the name is misleading). By default this value is
0.01 = 1%. This is the maximum amount the price is allowed to drift during settlement, which can happen as other transactions interact with on-chain liquidity. The transaction will revert if this threshold is exceeded.
slippagePercentagevalues until the transaction succeeds, but understand that this also exposes your swap to potentially settling at what may no longer be considered a fair price.
slippagePercentageto accommodate the transfer fee, but your mileage may vary.