Deposits don’t work with fee-on transfer tokens
The deposit function assumes the full amount is transferred, but fee-on-transfer tokens deduct a fee, causing a mismatch and transaction revert. This prevents the protocol from supporting such tokens.
Submitted by cmichel.
There are ERC20 tokens that may make certain customizations to their ERC20 contracts. One type of these tokens is deflationary tokens that charge a certain fee for every transfer() or transferFrom(). Others are rebasing tokens that increase in value over time like Aave’s aTokens (balanceOf changes over time).
Impact
The PrizePool._depositTo() function will try to supply more _amount than was actually transferred. The tx will revert and these tokens cannot be used.
Recommended Mitigation Steps
One possible mitigation is to measure the asset change right before and after the asset-transferring routines
asselstine (PoolTogether) acknowledged:
We don’t plan on incorporating fee-on-transfer tokens, so I think we can safely ignore this.
Alex the Entreprenerd (judge) commented:
The sponsor acknowledges the finding, simple mitigation is to not use
feeOnTransfertokens in the protocol
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 deposit logic does not account for tokens that deduct a fee on transfer, so it credits the full amount instead of the actual received amount.
Impact
Fee-on-transfer tokens cannot be deposited because the transaction reverts.
What the attacker needed
Fee-on-transfer token used
The fix
The protocol should measure the actual balance change before and after the transfer to credit the correct amount.
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 tokens take a small fee when you send them, so the receiver gets less than you sent. The deposit function here expects the full amount, so it fails and the transaction is cancelled. This means those tokens can't be used with this protocol.
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.