Closed sherlock-admin closed 6 months ago
1 comment(s) were left on this issue during the judging contest.
nirohgo commented:
Not a real issue. getUncollectedFees calculates owed fees without updating (changing state) whereas updateSwapFees causes univ3 to update the feeGrowthInside01Last values and move the owed fees to a separate accounting. In any case the resulting fees are the same.
hash
medium
Bunni liquidityReserves doesn't count owed fees
Summary
owed fees is not included in Bunni's protocol owned liquidity reserves
Vulnerability Detail
The
getProtocolOwnedLiquidityReserves
function returns the (liquidity reserves + uncollected fees)But since Bunnihub has a function to account the owed fees, it is possible for token amounts to be present as positions owed token amounts. This amount will not be reported by the
_getReservesWithFees
function.Impact
Underreporting of the total token amounts available for a bunni token.
Code Snippet
https://github.com/sherlock-audit/2023-11-olympus/blob/9c8df76dc9820b4c6605d2e1e6d87dcfa9e50070/bophades/src/modules/SPPLY/submodules/BunniSupply.sol#L417-L425
Tool used
Manual Review
Recommendation
Include the owed token amounts
Duplicate of #49