Record keeping on DSC will be adversely affected by integrating a fee on transfer token.
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.
In the context of the depositCollateral
function in DSCEngine, instead of recording the received amountCollateral
, the contract only records the provided amount.
Manual code analysis
Make sure to verify the account balances both before and after conducting any transfer that incurs fees so as to maintain accurate records.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.