The DInterest.deposit function takes a depositAmount parameter but this parameter is not the actual transferred amount for fee-on-transfer / deflationary (or other rebasing) tokens.
Impact
The actual deposited amount might be lower than the specified depositAmount of the function parameter.
This would lead to wrong interest rate calculations on the principal.
Recommended Mitigation Steps
Transfer the tokens first and compare pre-/after token balances to compute the actual deposited amount.
Handle
cmichel
Vulnerability details
Vulnerability Details
The
DInterest.deposit
function takes adepositAmount
parameter but this parameter is not the actual transferred amount for fee-on-transfer / deflationary (or other rebasing) tokens.Impact
The actual deposited amount might be lower than the specified
depositAmount
of the function parameter. This would lead to wrong interest rate calculations on the principal.Recommended Mitigation Steps
Transfer the tokens first and compare pre-/after token balances to compute the actual deposited amount.