I'm able to do swap transactions using
exactInputSingle functions on both Uniswap v3 and Pancakeswap v3. However, I have no idea how would I be able to set the slippage. The v2 routers has a
getAmountsOut function, which makes it possible to set slippage because I would know what is the exact exchange between two tokens in a pool. As for v3, there's no way to check the price and set the slippage.
I saw there's a
checkOracleSlippage function on the "read contract" tab of the Pancakeswap Smart Router v3, but I have no any idea how to use it. I couldn't find any documentations about it either.