Cyfrin / 2023-07-foundry-defi-stablecoin

37 stars 32 forks source link

Contracts are vulnerable to fee-on-transfer-token-related accounting issues #1112

Open codehawks-bot opened 1 year ago

codehawks-bot commented 1 year ago

Contracts are vulnerable to fee-on-transfer-token-related accounting issues

Severity

Medium Risk

Summary

Without measuring the balance before and after the transfer, there's no way to ensure that enough tokens were transferred, in the cases where the token has a fee-on-transfer mechanic. If there are latent funds in the contract, subsequent transfers will succeed.

Tools Used

Manual Review