INFLATION_PROTECTION_TIME can not be up to a year as intended because it is hardcoded to 1749120350
#247
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
M-04
primary issue
Highest quality submission among a set of duplicates
satisfactory
satisfies C4 submission criteria; eligible for awards
selected for report
This submission will be included/highlighted in the audit report
sponsor acknowledged
Technically the issue is correct, but we're not going to resolve it for XYZ reasons
sufficient quality report
This report is of sufficient quality
Lines of code
https://github.com/code-423n4/2024-07-loopfi/blob/4f508781a49ffa53511e7e5ed6cda0ff0eb5bdc5/src/vendor/AuraVault.sol#L66
https://github.com/code-423n4/2024-07-loopfi/blob/main/src/vendor/AuraVault.sol#L301-L307
Vulnerability details
Impact
AURA rewards will be distributed at a lesser time than a year.
Infact if the
AuraVault.sol
contract is deployed 295 days after the completion of this audit contest, No aura rewards will be distributed. This is because theINFLATION_PROTECTION_TIME
is hardcoded to1749120350
Proof of Concept
The Aura rewards is to be distributed within a year which is specified with the
INFLATION_PROTECTION_TIME
constant. However, theINFLATION_PROTECTION_TIME
constant is hardcoded in theAuraVault.sol
contract to1749120350
.And there is a validation check to distribute reward only before this
1749120350
timestamp. At the time of writting this report there is 310 days left and after the contest there will be less than 295 days left for Aura distribution based on the hardcoded1749120350
INFLATION_PROTECTION_TIME
constant.If this
AuraVault.sol
is deployed 295days from the time of writting this report, no AURA rewards will be distributed.The issue lies in the fact that
INFLATION_PROTECTION_TIME
constant is hardcoded to1749120350
which is already decreasing the duration of rewards from a year to zero.Tools Used
Manual review
Recommended Mitigation Steps
Consider setting the
INFLATION_PROTECTION_TIME
in the constructor instead of hardcoding it.Assessed type
Timing
The text was updated successfully, but these errors were encountered: