Closed c4-bot-3 closed 7 months ago
raymondfam marked the issue as sufficient quality report
raymondfam marked the issue as duplicate of #10
raymondfam marked the issue as duplicate of #59
hansfriese changed the severity to 3 (High Risk)
hansfriese marked the issue as satisfactory
Lines of code
https://github.com/code-423n4/2024-03-pooltogether/blob/main/pt-v5-vault/src/PrizeVault.sol#L611-L622
Vulnerability details
Impact
YieldFeeRecipient could lose part of his yield fee
Proof of Concept
https://github.com/code-423n4/2024-03-pooltogether/blob/main/pt-v5-vault/src/PrizeVault.sol#L611-L622
Lets say
yieldFeeBalance
is 100 and the yield fee recipient wants to claim 50. TheyieldFeeBalance
becomes 0 but themsg.sender
gets minted only 50. The other 50 shares will be lost since the yield fee recipient won't be able to claim them.Tools Used
Manual Review
Recommended Mitigation Steps
Change
yieldFeeBalance -= _yieldFeeBalance;
toyieldFeeBalance -= _shares;
Assessed type
Math