Uniswap / v3-periphery

🦄 🦄 🦄 Peripheral smart contracts for interacting with Uniswap v3
https://uniswap.org
GNU General Public License v2.0
1.18k stars 1.1k forks source link

PositionValue may suffer from underflow in 0.8 version #383

Open jes16jupyter opened 5 months ago

jes16jupyter commented 5 months ago

Hi, according to https://github.com/Uniswap/v3-periphery/issues/198, the solc version of PositionValue is restricted below 0.8.0, as fee calculation code relies on unchecked math that is expected to overflow. Current implementation is pragma solidity >=0.6.8 <0.8.0;.

But in 0.8 branch, PositionValue has no unchecked nor the code is altered, but the version 0.8.0 is included.

Thus unexpected revert will happen as I am understanding it correctly.