Closed sherlock-admin2 closed 10 months ago
1 comment(s) were left on this issue during the judging contest.
auditsea commented:
It's protocol decision, dont have to be correct number though
1 comment(s) were left on this issue during the judging contest.
auditsea commented:
It's protocol decision, dont have to be correct number though
Invalid, this is purely an estimate since block count fluctuates in mainnet. Additionally, it can be adjusted by admin anyways as seen here.
0xnirlin
high
Wrong number for blocks in a week
Summary
In a week number of blocks mined on eth currently are around 49500
Vulnerability Detail
Code set number of blocks in week as following
diamondinit.sol
Which leads to wrong calculations in whole project.
And also we know this number can change in future with hardforks.
Impact
wrong calculation
Code Snippet
https://github.com/sherlock-audit/2023-12-ubiquity/blob/d9c39e8dfd5601e7e8db2e4b3390e7d8dff42a8e/ubiquity-dollar/packages/contracts/src/dollar/upgradeInitializers/DiamondInit.sol#L74
Tool used
smol cat
Recommendation
Set amount to right value .