Part 2

Zaros
PerpetualsDEXFoundrySolidity
70,000 USDC
View results
Submission Details
Severity: low
Invalid

Missing Vault Existence Check in `Vault::updateVaultSwapStrategy` Function

Summary

The Vault::updateVaultSwapStrategy function lacks a check to verify the existence of the vault before attempting to update the vault swap strategy. This could lead to issues where the function tries to access or modify data for a non-existent vault.

Vulnerability Details

In the current implementation, the function updateVaultSwapStrategy retrieves the Data for a specific vault via the load(vaultId) call. However, there is no validation to ensure that the vault identified by vaultId exists in the system before attempting to update the swap strategy. Without this check, a non-existent vault ID could lead to unexpected behavior or errors.

Impact

  1. The lack of a vault existence check could allow the function to operate on an invalid or non-existent vault, potentially causing incorrect state updates or failure during execution.

  2. It can lead to Unintended vaults creation which can result to security.

  3. Users may unknowingly interact with a vault that was never initialized.

  4. vulnerabilities or data corruption in the contract.

Recommendations

Implement a validation step to check for the existence of the vault before updating the swap strategy.

Updates

Lead Judging Commences

inallhonesty Lead Judge 6 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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