The protocol uses an uninitialized prices
value in the deposit function. The prices
value is used only in one specific case, but since it is not initialized, all price values will be zero. As a result, the formula will always revert due to division by zero, making the deposit function fail in 100% of cases.
Let's examine a section of the deposit function:
As we can see, an uninitialized prices
value is passed to the _mint
function, which is called here:
The problematic line is:
If we examine the _totalAmount
function, we see the following formula:
In the else
condition, prices
values are used in mathematical operations, including division. However, since prices.shortTokenPrice.min
is always 0
(due to prices
being uninitialized), the division will always revert. This causes the deposit function to fail, blocking execution until certain internal parameters (such as positionIsClosed
) are changed.
The deposit function becomes blocked and unusable.
Manual review.
Ensure that even if an uninitialized prices
value is used, the formula does not result in division by zero.
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.