Closed c4-bot-6 closed 8 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#L614-L617
Vulnerability details
Impact
PrizeVault::claimYieldFeeShares
can only be called by theyieldFeeRecipient
to claim the fees. TheyieldFeeRecipient
can specify the exact amount of shares he wants to claim, however this is a problem because theyieldFeeBalance
is reset every time, no matter how many shares theyieldFeeRecipient
claimed.Proof of Concept
We can see that first the
yieldFeeBalance
is stored in_yieldFeeBalance
and then subtracted with the same amount even if theyieldFeeRecipient
doesn't claim all the fees.This leaves unclaimed fees and affects the
_totalDebt
since it would return less than it actually is.Tools Used
Manual Review
Recommended Mitigation Steps
Subtract the shares from
yieldFeeBalance
instead of reseting it.Assessed type
Other