52439 sc high dust accumulation in batched yield payouts leaves tokens stranded
Description
Brief / Intro
Vulnerability Details
if (startIndex == 0) {
yToken.safeTransferFrom(msg.sender, address(this), totalAmount);
}
...
// computed once per call, for all holders
uint256 effectiveTotalSupply = ... // sum of eligible balances
// for each holder in this batch only
uint256 share = (totalAmount * holderBalance) / effectiveTotalSupply;
yToken.safeTransfer(holder, share);
amountDistributed += share;
...
if (nextIndex == 0) {
emit YieldDistributed(totalAmount, yieldTokenAddr);
}Impact Details
Proof of Concept
References
Previous50951 sc high inconsistent streak count usage between jackpot and raffle ticket calculationsNext49705 sc medium two vectors for unbounded gas consumption due to the normal raffle operations
Was this helpful?