Discussions
Bug in the V4 locker for Base chain
Hello Go Plus team, first of all wanted to say you have an amazing ecosystem and your protocol is very easy to integrate with. While working on our token deployment platform, we noticed a bug in your V4 Base locker: 0xf5CDAdD3cB89A69Ab72da3CFD93c505c1B9Fcca1 Specifically, the collect function doesn't work for Uniswap V4 pools that trade against native ETH. Uniswap V4 requires native eth, not WETH, this means when the locker contract tries calling IERC20(token0).balanceOf(address(this)) when token0 could be address(0), it reverts, because you can't call this on the native address on base. So while this would work for a V4 pool that trades 2 ERC 20 tokens, most V4 pools are going to be against native ETH. The solution is to just add special handling for when one of the tokens is address(0) as this means its native eth.
You can do a cast run on this tx and see the exact revert: https://basescan.org/tx/0x69e1ea301b794f5b1debd30131619776af77770cb04c57e8c28e0fae00a9d490