The issue occurs when the number of periods is capped by max_v2_duration
in _obtain_price_params
, but _unlocked_shares
still calculates unlocked shares based on the full time difference (ts - last_profit_update)
. This discrepancy leads to an overestimation of unlocked shares, causing an incorrect total supply calculation and distorting the reported price.
The function _obtain_price_params
caps the number of periods at max_v2``duration
, but unlockedshares
does not account for this cap when calculating unlocked shares. This can leads to an overestimation of unlocked shares, reducing the total supply incorrectly and inflating the calculated price when the ts
is really away from the adjusted last_profit
_update
when obtaining prices.
Excessive Share Unlocking – ts - last_profit_update
could be significantly larger than profit_max_unlock_time
, leading to more shares being unlocked than intended.
Incorrect Price Calculation – Since _unlocked_shares
directly affects _total_supply
, the excessive unlocking skews the price calculation, potentially causing incorrect oracle updates.
Manual Review
A solid fix will be to set unlocked_shares = balance_of_self
if ts - last_profit_update
exceeds profit_max_unlock_time
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.