I’m developing a solidity contract that needs to swap between ETH and Stable coins like USDC. I’m having trouble finding an appropriate, production ready, setting for sqrtPriceLimitX96. All documentation that I have found use 0 stating that for production it needs to be handled differently, without specifying how. Can someone help me on how to set this parameter appropriately for a production ready contract?
UniswapV3 sqrtPriceLimitX96 – How to Set the Parameter Correctly
uniswapv3
Best Answer
In typescript:
Pass the human readable price and it will return the square root price.