40,000 USDC
View results
Submission Details
Severity: medium
Valid

Fee on transfer tokens

Summary

Fee on transfer tokens make project not to work as expected

Vulnerability Details

Certain fee on transfer tokens take a fee when they are transferred. This may result in project expecting x tokens but actually receiving x-a tokens where a is a fee. This impacts logic parts of contract, for example below

  1. Escrow.sol line 44
    if (tokenContract.balanceOf(address(this)) < price) revert Escrow__MustDeployWithTokenBalance();
    Above will always revert in the case fee on transfer token results in reduced balance of tokens in the contract therefore
    tokenContract.balanceOf(address(this)) will always be less than price and revert

Impact

  1. Gas wastage for buyer who will have to redeploy contracts with other token as such type of fee on transfer token will always revert

Tools Used

Manual Analysis

Recommendations

It is recommended they are not allowed by implementing a whitelist of allowable tokens

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.