_payoutToken[s]() is not compatible with tokens with missing return value
The payout functions call ERC20 transfer inside a require statement that expects a boolean return value. For tokens that do not return a boolean, the transfer reverts even when successful, so payouts are blocked and tokens remain stuck in the contract.
Submitted by d3e4, also found by 141345, 2997ms, ballx, Bnke0x0, brgltd, brgltd, cccz, cccz, chaduke, d3e4, Dinesh11G, Jeiwan, joestakey, Lambda, martin, pashov, RedOneN, Trust, V_B, and vv7
Payout is blocked and tokens are stuck in contract.
Proof of Concept
PA1D._payoutToken() and PA1D._payoutTokens() call ERC20.transfer() in a require-statement to send tokens to a list of payout recipients.
Some tokens do not return a bool (e.g. USDT, BNB, OMG) on ERC20 methods. But since the require-statement expects a bool, for such a token a void return will also cause a revert, despite an otherwise successful transfer. That is, the token payout will always revert for such tokens.
Recommended Mitigation Steps
Use OpenZeppelin’s SafeERC20, which handles the return value check as well as non-standard-compliant tokens.
alexanderattar (Holograph) commented:
Low priority, but can be updated to ensure compatibility with all ERC20 tokens.
alexanderattar (Holograph) linked a PR:
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
The code assumes every ERC20 token returns a boolean from transfer, but some widely used tokens return nothing, causing the require check to revert.
Impact
Payouts for tokens with a missing return value always revert, leaving the tokens stuck in the contract.
What the attacker needed
Payout token lacks a boolean return value
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.
Some older tokens, such as USDT, do not send back a yes/no answer when you ask them to transfer money. The contract insists on getting that answer, so it treats a successful transfer as a failure and cancels the whole payout. As a result, the money stays trapped in the contract.
What is DoS?
A request that exhausts resources or crashes a component. Many programs forbid testing it; reports usually show it from code, not by attacking.