DeFiFoundry
60,000 USDC
View results
Submission Details
Severity: low
Valid

Withdrawals While Order is Pending Will Lead to Griefing

Summary

Collateral can be withdrawn while an order is pending. This will grief the keepers by having them attempt to execute orders that will fail due to insufficient collateral.

This also opens up the possibility for users to better time the settlement of an order by depositing the needed collateral right when they want an order to be settled.

Vulnerability Details

Alice opens a long position with a size of 100; the collateral required is 20.

In one transaction, Alice first calls createMarketOrder to place the valid order. Then she calls withdrawMargin to withdraw the margin so that settlement fails.

Alice repeats this, griefing the keepers over and over.

Likelihood is low; impact is medium. I would rate this as low.

Impact

Griefing.

Tools Used

Manual analysis.

Recommendations

Check that there are no pending orders when depositing and withdrawing.

Updates

Lead Judging Commences

inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

The Keeper can be griefed by a user who withdraw's the collateral when having a pending position

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.