Investor can’t claim the last tokens (via claim() )
The claim() function in InvestorDistribution.sol contains a require statement that reverts when the remaining claimable amount is zero, preventing an investor from claiming their last tokens. An attacker cannot steal funds, but the availability of the investor's tokens is compromised because the normal claim path fails.
Suppose you are an investor and want to claim the last part of your claimable tokens (or your entire set of claimable tokens if you haven’t claimed anything yet). Then you call the function claim() of InvestorDistribution.sol, which has the following statement: require(investors\[msg.sender].amount - claimable != 0); This statement will prevent you from claiming your tokens because it will stop execution.
Note: with the function claimExact() it is possible to claim the last part.
I just noticed it’s different files. The AirdropDistrbution.sol and InvestorDistribution.sol contracts were built on the same base, with slight changes.
Downgrading to medium risk as an alternative path does exist for claiming the drop. Funds are not lost, but the availability of them is compromised. Per Docs:
2 — Med: Assets not at direct risk, but the function of the protocol or its availability could be impacted, or leak value with a hypothetical attack path with stated assumptions, but external requirements.
3 — High: Assets can be stolen/lost/compromised directly (or indirectly if there is a valid attack path that does not have hand-wavy hypotheticals).
The original report as published on Code4rena, by gpersoon. 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.
Generating the AI write-up for this report.
This usually takes about 30 seconds. You can read the original meanwhile; this page updates itself.
Writing the technical write-up
Writing the version for beginners
Checking every passage against the original
How it worked
Root cause
Likely the require statement incorrectly rejects a zero remaining balance instead of allowing the final claim.
Impact
The availability of the investor's tokens is compromised because the normal claim path fails, though funds are not lost and an alternative path exists.
What the attacker needed
An investor with claimable tokens; calling claim() for the last part
The fix
The require statement should be removed so the final claim can succeed.
How it was found
An investor calls claim() to collect the last part of their claimable tokens.
The require statement evaluates the remaining amount and reverts because it is zero.
The investor cannot claim the last tokens through claim().
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.
Generating the AI write-up for this report.
This usually takes about 30 seconds. You can read the original meanwhile; this page updates itself.
Writing the technical write-up
Writing the version for beginners
Checking every passage against the original
A smart contract lets investors collect tokens over time. The function meant to collect them has a check that stops the transaction when the remaining amount is zero, so the last part cannot be collected through that function. Another function exists that can still collect the tokens.
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.