When accounting the positive PNL, the price of USDz is assumed to be pegged to 1 dollar
When a position has positive PNL and executes a market order, it accounts this PNL by giving margin to the position with USDz tokens. This USDz token is intended to be pegged to 1$.
As we can see the amount of USDz accounted to the position's margin is in dollars because of the PNL. This means that the PNL accounting will only work when the USDz token is pegged to 1$. So in a scenario where the token depegs, users will receiver less funds from their positive PNL and the protocol will not work as intended.
The impact of this issue is high if it happens. However, it is pretty rare that the token depegs, so a medium severity should be good.
Manual review
Fetch the price of the USDz token in terms of USD and account the PNL accordingly to the price of the tokens, so in a scenario of a token depeg, the protocol would work properly.
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.