Open c4-bot-10 opened 8 months ago
gzeon-c4 marked the issue as insufficient quality report
unlikely for "claim slippage" to exists and the protocol should record claimed amount lack poc to show exploit
gzeon-c4 marked the issue as primary issue
JustDravee marked the issue as unsatisfactory: Insufficient proof
JustDravee marked the issue as unsatisfactory: Invalid
Hey @JustDravee, The PT contract is built on top of the ERC4626 vault and the whole idea of it, is that rates are subject to volatility, so the claim slippage will exist. redeem function of the PT contract has slippage protection and it does exactly the same action as two of the function described here. Could you please take another look?
yanisepfl (sponsor) disputed
yanisepfl marked the issue as disagree with severity
Hello @kazantseff and @JustDravee,
While the issue reported is a good catch that we will tackle, it only points out an inconsistency in our code. The standards that we follow do not necessitate to have slippage protection, and we consider it as a good-to-have feature.
Therefore, we rather consider it as a low severity issue.
Thanks for the report!
JustDravee removed the grade
JustDravee changed the severity to QA (Quality Assurance)
JustDravee marked the issue as grade-b
JustDravee marked the issue as grade-a
Lines of code
https://github.com/code-423n4/2024-02-spectra/blob/383202d0b84985122fe1ba53cfbbb68f18ba3986/src/tokens/PrincipalToken.sol#L369-L374 https://github.com/code-423n4/2024-02-spectra/blob/383202d0b84985122fe1ba53cfbbb68f18ba3986/src/tokens/PrincipalToken.sol#L329-L337
Vulnerability details
Bug description
claimFees()
function allows the fee collector set by the protocol to claim fees in IBT. claimFees()claimYield()
allows users to claim their yield in IBT. claimYield()As can be seen, both these functions redeem ibts from the ERC4626 vault, but they lack
minAssets
check. To protect users or feeCollector from receiving less assets for their amount of ibts,minAssets
parameter should be used.Impact
The entire amount of ibts can be lost.
Recommended Mitigation
claimYield()
claimFees()
Assessed type
Other