52285 sc high incorrect dust handling in yield distribution leads to permanent fund lock
Description
Brief/Intro
Vulnerability Details
// In distributeYield() - lines 448-457
if (holderCount > 0) {
address lastHolder = $.holders.at(lastProcessedIndex);
if (_isYieldAllowed(lastHolder)) {
uint256 lastShare = amount - distributedSum;
if (lastShare > 0) {
yToken.safeTransfer(lastHolder, lastShare);
distributedSum += lastShare;
}
}
// BUG: If lastHolder is restricted, lastShare is never distributed
}Impact Details
References
Proof of Concept
Conclusion
Previous52870 sc low cooldown extension logic may lead to locked fundsNext52572 sc high a legitimate arc token holder can be denied his yield
Was this helpful?