Skip to content
Business logic Audit finding Advanced

[Perennial Self Review] Incorrect price used during liquidation calculation

Protocol Team Follow

Originally disclosed on Sherlock

Source: https://github.com/sherlock-audit/2023-09-perennial-judging/issues/59

Found by

Protocol Team Fixed by https://github.com/equilibria-xyz/perennial-v2/pull/108

Discussion

panprog

Fixed but when combined with #9, the liquidation will revert due to the fix (#9 will make oracle.latest().price = 0 and this will be used by the fix, while the correct Market process will use the latest valid oracle price in this case). The probability of this situation is very low, but still possible.

kbrizzle

Noted: we made this intentional decision since liquidations are generally predicated on posting a valid non-requested price anyways.

jacksanford1

Based on @kbrizzle's comment, Sherlock will consider this issue as acknowledged due to a very low but still possible potential for reverting.

The original report as published on Sherlock, by Protocol Team. Images and videos are our own copies; raw HTML is shown as text. View it on Sherlock.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

What is known

A medium-severity business logic bug in Perennial V2 Update #1. Sherlock made it public on 27 September 2023. Found in the 112 audit contest (finding M-7).

About Business logic

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

More by Protocol Team

View all

8 more disclosed reports, best first.

More from Perennial V2 Update #1

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.