velodrome-finance / sugar

Sugar makes Velodrome devs life sweeter 🍭
Other
47 stars 26 forks source link

fix: subtract fees from total balance to get reserves #63

Closed pedrovalido closed 6 months ago

pedrovalido commented 7 months ago

Current value being returned by reserves in cl pools is IERC20 balance of the pool address. This is not entirely accurate as the pool also holds some fees. We need to subtract the fees from each token0/token1 before returning reserves.