Closed mudgen closed 3 years ago
You already reported this https://github.com/Uniswap/uniswap-v2-core/issues/96
Oh, sorry, I didn't realize that.
can you explain us ??
can somebody explain why the value is not changing, even after block.timestamp % 2**32
?? i know it is use for overflow but how ?
can somebody explain why the value is not changing, even after
block.timestamp % 2**32
?? i know it is use for overflow but how ?
This may help https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-September/018172.html
can somebody explain why the value is not changing, even after
block.timestamp % 2**32
?? i know it is use for overflow but how ?This may help
https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2020-September/018172.html
Thanks i got it
The
update
function in UniswapV2Pair.sol has this line of code:In case of uint32 overflow the following return the same value:
So why do this
block.timestamp % 2**32
?It looks like the code is requiring the gas cost of doing a modulus operation for no reason.
Or is it done to show that overflow is okay?