In the update_profit_max_unlock_time function of ScrvusdOracleV2.vy, the variable self.last_update is not updated with the latest block timestamp. This inconsistency may affect functions that rely on self.last_update for time-dependent calculations, potentially leading to incorrect price updates or profit unlock mechanisms.
The function update_profit_max_unlock_time is responsible for updating the profit_max_unlock_time value.
It performs an access control check and ensures that _block_number is valid.
However, unlike the update_price function, which updates self.last_update, this function fails to do so.
self.last_update is used in various calculations, particularly in _smoothed_price, which influences price updates and unlocking mechanisms.
As a result, any logic dependent on self.last_update may operate on outdated timestamps, leading to unexpected behavior.
Incorrect Unlock Time Calculation: The lack of self.last_update updates could result in stale timestamp values, affecting the smooth unlocking of profits.
Potential Exploit Opportunity: Attackers may leverage this issue to manipulate the unlocking mechanism, causing unintended delays or accelerating profit unlocking inconsistently.
Inconsistent State Updates: Other functions relying on self.last_update for time-based calculations may not reflect the correct time progression, leading to inaccurate price or supply values.
Ensure that self.last_update is updated to block.timestamp in the update_profit_max_unlock_time function, similar to how it's handled in update_price.
Modify the function as follows:
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.