In the function _depositRecordData of DInterest.sol, interestAmount is lowered with feeAmount.
If by accident feeAmount happens to be larger than interestAmount an error occurs and the execution stops, without an error message.
This might make troubleshooting this situation more difficult.
Proof of Concept
DInterest.sol:
function _depositRecordData(..) {
...
interestAmount -= feeAmount;
Tools Used
Editor
Recommended Mitigation Steps
Perhaps add something like:
require(interestAmount >= feeAmount,"DInterest: fee too large");
Handle
gpersoon
Vulnerability details
Impact
In the function _depositRecordData of DInterest.sol, interestAmount is lowered with feeAmount. If by accident feeAmount happens to be larger than interestAmount an error occurs and the execution stops, without an error message. This might make troubleshooting this situation more difficult.
Proof of Concept
DInterest.sol: function _depositRecordData(..) { ... interestAmount -= feeAmount;
Tools Used
Editor
Recommended Mitigation Steps
Perhaps add something like: require(interestAmount >= feeAmount,"DInterest: fee too large");