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

The expected behavior of fee on transfer tokens will not be observed

Summary

Record keeping on DSC will be adversely affected by integrating a fee on transfer token.

Vulnerability Details

Verifying the sender's account balance is important when there is a fee on token transfer in Solidity. This ensures that the fee has been appropriately deducted from the sender's balance. However, the existing implementation of the DSC protocol does not support collateral tokens with fee-on-transfer functionality. DSCEngine does not verify if the amount of tokens received matches the amount sent. This can lead to an accounting error. This oversight can result in an inflated collateral value for depositors, causing problems with accurate record keeping.

Impact

In the context of the depositCollateral function in DSCEngine, instead of recording the received amountCollateral, the contract only records the provided amount.

Tool Used

Manual code analysis

Recommendation

Make sure to verify the account balances both before and after conducting any transfer that incurs fees so as to maintain accurate records.

Support

FAQs

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