DeFiLayer 1Layer 2
14,723 OP
View results
Submission Details
Severity: medium
Invalid

Incorrect Profit Unlocking Logic in _obtain_price_params()

Summary

In _obtain_price_params() function of ScrvusdOracleV2.vy file.

The condition if params.last_profit_update + period >= parameters_ts skips the profit unlocking logic when params.last_profit_update + period == parameters_ts. This can lead to delayed profit unlocking, causing incorrect price calculations.

Vulnerability Details

if params.last_profit_update + period >= parameters_ts:
return params

When params.last_profit_update + period == parameters_ts , return old params.

Impact

The price calculation will not reflect the fully unlocked profits at the exact moment the unlocking period ends, leading to inaccurate prices.

Tools Used

Manual

Recommendations

Change the condition to if params.last_profit_update + period > parameters_ts to ensure profits are unlocked at the correct timestamp.

So need to modify as following.

if params.last_profit_update + period > parameters_ts:
return params
Updates

Lead Judging Commences

0xnevi Lead Judge
3 months ago
0xnevi Lead Judge 2 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.