Skip to content

Avoid Divide by 0 in compute Deviation Ratio#271

Open
brandoniles wants to merge 1 commit intomainfrom
perp-zero-tvl-check
Open

Avoid Divide by 0 in compute Deviation Ratio#271
brandoniles wants to merge 1 commit intomainfrom
perp-zero-tvl-check

Conversation

@brandoniles
Copy link
Member

In the case where perp's tvl is zero, for example if all notes are redeemed, the divide by zero would revert other user functions.

@brandoniles brandoniles requested a review from aalavandhan March 2, 2026 23:44
@openzeppelin-code
Copy link

Avoid Divide by 0 in compute Deviation Ratio

Generated at commit: 6bd5755f51d2b316086d6111fa2f3e141c1bd157

🚨 Report Summary

Severity Level Results
Contracts Critical
High
Medium
Low
Note
Total
1
0
0
3
24
28
Dependencies Critical
High
Medium
Low
Note
Total
0
0
0
0
0
0

For more details view the full report in OpenZeppelin Code Inspector

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant