I'm currently developing a smart contract with access to Uniswap V3's QuoterV2 contract. I'm interested in obtaining the most accurate price of tokenB
in terms of tokenA
:
quoter.quoteExactInputSingle(IQuoterV2.QuoteExactInputSingleParams(
tokenA,
tokenB,
amountA,
uint24(feeRate),
uint160(SQRT_PRICE_LIMIT_X96)));
All parameters are clear to me but as I know, there are 3 fee rates on Uniswap V3:
- 0.05%
- 0.30%
- 1%
I can select any of these rates freely and I will get some exchange rate. How can I determine which of these rate is the most accurate? Does proper rate depend on the types of tokens (i.e. for stablecoins pair there will be a small fee rate of 0.05%, for pair like ETH-USDC there will be another, like 0.30% or 1%)?