Skip to content
Business logic Audit finding Intermediate

Dust Token Balances Cannot Be Claimed By An admin Account

Small reward claims may be too costly to claim due to gas fees, causing dust balances to accumulate. The report suggests allowing an admin to skim these unclaimed tokens after a period of inactivity.

leastwood Follow

Originally disclosed on Code4rena

Submitted by leastwood, also found by 0x0x0x

Impact

Users who have a small claim on rewards for various promotions, may not feasibly be able to claim these rewards as gas costs could outweigh the sum they receive in return. Hence, it is likely that a dust balance accrues overtime for tokens allocated for various promotions. Additionally, the _calculateRewardAmount calculation may result in truncated results, leading to further accrual of a dust balance. Therefore, it is useful that these funds do not go to waste.

Proof of Concept

https://github.com/pooltogether/v4-periphery/blob/b520faea26bcf60371012f6cb246aa149abd3c7d/contracts/TwabRewards.sol#L162-L191

Recommended Mitigation Steps

Consider allowing an admin account to skim a promotion’s tokens if it has been inactive for a certain length of time. There are several potential implementations, in varying degrees of complexity. However, the solution should attempt to maximise simplicity while minimising the accrual of dust balances.

PierrickGT (PoolTogether) confirmed

The original report as published on Code4rena, by leastwood. Images and videos are our own copies; raw HTML is shown as text. View it on Code4rena.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the reward calculation truncates amounts and users are disincentivised by gas costs, leading to unclaimable dust.

Impact

Dust balances accumulate and cannot be claimed by users, potentially locking funds indefinitely.

What the attacker needed

Small reward amounts; high gas costs

The fix

Consider allowing an admin account to skim a promotion’s tokens if it has been inactive for a certain length of time.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

When rewards are very small, the cost to claim them (gas fees) can be higher than the reward itself, so people don't claim them. These tiny amounts pile up as 'dust'. The report suggests letting an admin recover these funds after some time.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More by leastwood

View all

70 more disclosed reports, best first.

More from PoolTogether

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.