Beginner FriendlyFoundryDeFiOracle
100 EXP
View results
Submission Details
Severity: low
Valid

getCalculatedFee can be 0

Summary

getCalculatedFee can be as low as 0

Vulnerability Details

Any value up to 333 for "amount" can result in 0 fee based on calculation

function testFuzzGetCalculatedFee() public {
AssetToken asset = thunderLoan.getAssetFromToken(tokenA);
uint256 calculatedFee = thunderLoan.getCalculatedFee(
tokenA,
333
);
assertEq(calculatedFee ,0);
console.log(calculatedFee);
}

Impact

Low as this amount is really small

Tools Used

Foundry, Manual review

Recommendations

A minimum fee can be used to offset the calculation, though it is not that important.

Updates

Lead Judging Commences

0xnevi Lead Judge
almost 2 years ago
0xnevi Lead Judge almost 2 years ago
Submission Judgement Published
Validated
Assigned finding tags:

very small flashloans can be free

Support

FAQs

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