Open code423n4 opened 3 years ago
gpersoon
The value of BLOCK_TIME = 132e17 // 13.2 seconds, which is not straightforward read. In solidity it can also be written as: 13.2e18, which is easier to read.
https://github.com/code-423n4/2021-09-wildcredit/blob/main/contracts/InterestRateModel.sol#L17 uint private constant BLOCK_TIME = 132e17; // 13.2 seconds
Replace uint private constant BLOCK_TIME = 132e17; // 13.2 seconds with uint private constant BLOCK_TIME = 13.2e18; // 13.2 seconds
Handle
gpersoon
Vulnerability details
Impact
The value of BLOCK_TIME = 132e17 // 13.2 seconds, which is not straightforward read. In solidity it can also be written as: 13.2e18, which is easier to read.
Proof of Concept
https://github.com/code-423n4/2021-09-wildcredit/blob/main/contracts/InterestRateModel.sol#L17 uint private constant BLOCK_TIME = 132e17; // 13.2 seconds
Tools Used
Recommended Mitigation Steps
Replace uint private constant BLOCK_TIME = 132e17; // 13.2 seconds with uint private constant BLOCK_TIME = 13.2e18; // 13.2 seconds