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

Consistently check account balance before and after transfers for Fee-On-Transfer discrepancies

Summary

As it was mentioned many times that any ERC20 tokens can be used as collateral token but fee on transfer tokens are not compatiable with the protcol maintained incorrect order book due not checking balance before and after transfering tokens
all the token transfer place are affected by this
eg. https://github.com/Cyfrin/2023-07-foundry-defi-stablecoin/blob/main/src/DSCEngine.sol#L149

Vulnerability Details

See summary

Reference - https://solodit.xyz/issues/m-25-consistently-check-account-balance-before-and-after-transfers-for-fee-on-transfer-discrepancies-code4rena-vetoken-finance-vetoken-finance-contest-git

Impact

Incorrect orderbook of collateral so incorrect healthfactor and all other related things

Tools Used

Manual

Recommendations

Use the balance before and after the transfer to calculate the received amount instead of assuming that it would be equal to the amount passed as a parameter.

Support

FAQs

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