New answers tagged

0 votes

How to get the virtual and real reserves from a Uniswap V3 pair?

To get the real reserves you can use the pool's balance0 and balance1 functions or the pool tokens' balanceOf function. Mind that these will also include unclaimed fees and removed liquidity that does ...
kfx's user avatar
  • 1,516
1 vote

How multiplication and division works in solidity?

When it comes to the order of precedence of operators, according to the Solidity documentation, multiplication, division and modulo are evaluated before addition and substraction. On the other hand, ...
Gabriel Stoica's user avatar
-1 votes

How multiplication and division works in solidity?

Could you please point out which refer link to According to solidity precedence, multiplication has precedence against division? As my know, because solidity don't have float, and it will be run from ...
CT95's user avatar
  • 396
1 vote

How to prevent division before multiplication precision loss?

If you want to keep the last 6 decimals, then it's not actually downscaling from 24-decimal format to 18-decimal format, instead it's keeping it the same. And that, you can simply achieve by getting ...
SYED ASAD KAZMI's user avatar

Top 50 recent answers are included