В функции _withdraw
только для открытой позиции >1x вызывается createDecreasePosition в которой проверяется достаточность обеспечения в случае вывода средств с помощь функции willPositionCollateralBeInsufficient
In _withdraw
, if a position is open and 1x, there is no check to see if it will be sufficiently secured upon withdrawal
However, it is checked for open positions >1x in createDecreasePosition
The lack of post-withdrawal collateral sufficiencychecks creates a risk of insufficient funds to cover the exchange of indexToken for collateralToken, which could result in losses for users.
Manual
Add a check for the 1x position
There is no real proof, concrete root cause, specific impact, or enough details in those submissions. Examples include: "It could happen" without specifying when, "If this impossible case happens," "Unexpected behavior," etc. Make a Proof of Concept (PoC) using external functions and realistic parameters. Do not test only the internal function where you think you found something.
There is no real proof, concrete root cause, specific impact, or enough details in those submissions. Examples include: "It could happen" without specifying when, "If this impossible case happens," "Unexpected behavior," etc. Make a Proof of Concept (PoC) using external functions and realistic parameters. Do not test only the internal function where you think you found something.
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.