Steadefi

Steadefi
DeFiHardhatFoundryOracle
35,000 USDC
View results
Submission Details
Severity: medium
Valid

It is possible to reopen a deposit after being closed

Summary

Close vault should be one way action, which should permanently stop the vault. However, due to lack of checks inside emergencyPause the vault could be reopened.

Vulnerability Details

The vault could be reopened using following actions:
{The vault is being closed} => emergencyClose() (Will set vault's state from "Closed" to "Paused") => emergencyResume() (Will change state from "Paused" to "Open")

Impact

Business logic error

Tools Used

Manual Review

Recommendations

On emergencyPause() check wether the whether the vault is closed:

function emergencyPause(
GMXTypes.Store storage self
) external {
if(self.status == GMXTypes.Status.Closed) revert TheVaultIsClosed(self);
Updates

Lead Judging Commences

hans Lead Judge almost 2 years ago
Submission Judgement Published
Validated
Assigned finding tags:

Vault can be opened again after close

Support

FAQs

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