In AuraMinter.sol the comment defines that tokens should not be able to unlock until "after 4 years have passed" #363
Labels
bug
Something isn't working
disagree with severity
Sponsor confirms validity, but disagrees with warden’s risk assessment (sponsor explain in comments)
duplicate
This issue or pull request already exists
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
In AuraMinter.sol the comment defines that tokens should not be able to unlock until "after 4 years have passed" ( https://github.com/code-423n4/2022-05-aura/blob/4989a2077546a5394e3650bf3c224669a0f7e690/contracts/AuraMinter.sol#L9-L10).
Impact
The impact of this fault, would be that the dao address could mint prior to the supposed '4' year lockup as stated by the comment
(https://github.com/code-423n4/2022-05-aura/blob/4989a2077546a5394e3650bf3c224669a0f7e690/contracts/AuraMinter.sol#L9-L10)
Currently, the code checks the inception block_timestamp and sets a mint lock to + 156 weeks (3 years)
-> 52 weeks in 1 year, 156/52=3.
(https://github.com/code-423n4/2022-05-aura/blob/4989a2077546a5394e3650bf3c224669a0f7e690/contracts/AuraMinter.sol#L23)
So currently, the unlock and inflation will begin in the first week of the 4th year:
Proof of Concept
date = 22/05/2022 (1st year currently in progress),
date + 52 weeks = 21/05/2023 (one year has passed, now into second year),
date + 104 weeks = 19/05/2024 (two years has passed, now into third year),
date + 156 weeks = 18/05/2025 (three years have passed, now into fourth year),
date + 208 weeks = 17/05/2026 (4 years have now 'passed').
At this point, minter can mint Aura tokens, whilst users may believe it could not be done for 1 more year hence by calling:
https://github.com/code-423n4/2022-05-aura/blob/4989a2077546a5394e3650bf3c224669a0f7e690/contracts/AuraMinter.sol#L26-L35
Mitigation steps
Discussion with the team confirmed there is a mismatch between their expectation, and the comment - they were expecting 3 year lockup, not 4 years.
Mitigation step would be to change the comment to reflect this notion.
The text was updated successfully, but these errors were encountered: