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

Incorrect parameter description

Informational Details

The description of the interestRate parameter in the Loan struct is incorrect. The description says that an interest rate must represent a value per second.

After investigating, I discovered that the actual rate must define a value per year, not per second.

struct Loan {
...
@> /// @notice the interest rate of the loan per second (in debt tokens)
uint256 interestRate;
...
}

https://github.com/Cyfrin/2023-07-beedle/blob/658e046bda8b010a5b82d2d85e824f3823602d27/src/utils/Structs.sol#L47

Impact

The incorrect description could confuse developers, auditors, or even users.

Tools Used

Manual Review

Recommendations

The actual rate must define a value per year, not per second. Thus, I recommend correcting the description to ensure clarity.

struct Loan {
...
- /// @notice the interest rate of the loan per second (in debt tokens)
+ /// @notice the interest rate of the loan per year (in debt tokens)
uint256 interestRate;
...
}

Support

FAQs

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