Closed code423n4 closed 1 year ago
https://github.com/code-423n4/2023-05-venus/blob/8be784ed9752b80e6f1b8b781e2e6251748d0d7e/contracts/WhitePaperInterestRateModel.sol#L17
Incorrect calculation of critical parameters like baseRatePerBlock.
baseRatePerBlock
The constant blocksPerYear is incorrectly set
blocksPerYear
uint256 public constant blocksPerYear = 2102400; // @audit 15 seconds per block
However, for Binance Smart Chain the blocks are being produced every 3 seconds.
[-] uint256 public constant blocksPerYear = 2102400; [+] uint256 public constant blocksPerYear = 5 * 2102400;
Error
0xean marked the issue as duplicate of #559
0xean marked the issue as satisfactory
0xean changed the severity to 2 (Med Risk)
0xean changed the severity to 3 (High Risk)
Lines of code
https://github.com/code-423n4/2023-05-venus/blob/8be784ed9752b80e6f1b8b781e2e6251748d0d7e/contracts/WhitePaperInterestRateModel.sol#L17
Vulnerability details
Impact
Incorrect calculation of critical parameters like
baseRatePerBlock
.Proof of Concept
The constant
blocksPerYear
is incorrectly setHowever, for Binance Smart Chain the blocks are being produced every 3 seconds.
Recommended
Assessed type
Error