20,000 USDC
View results
Submission Details
Severity: gas
Valid

[I-6] Constants in comparisons should appear on the left side

Summary

Doing so will prevent typo bugs

Vulnerability Details

Instances (11):

File: src/Lender.sol
​
85: if (_fee > 5000) revert FeeTooHigh();
​
93: if (_fee > 500) revert FeeTooHigh();
​
184: if (amount == 0) revert PoolConfig();
​
200: if (amount == 0) revert PoolConfig();
​
212: if (maxLoanRatio == 0) revert PoolConfig();
​
244: if (collateral == 0) revert ZeroCollateral();
​
File: src/Staking.sol
​
63: if (totalSupply > 0) {
​
67: if (_diff > 0) {
​
69: if (_ratio > 0) {
​
83: if (_supplied > 0) {
​
87: if (_delta > 0) {
​

Impact

Tools Used

Recommendations

Support

FAQs

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

Give us feedback!