Part 2

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

Swap Requests Can Be Initiated For Vaults That Are Not Live

Summary

Currently swap requests follow the given workflow:

  1. A swap request is initiated through initiateSwap

  2. After this there are two choices:

    • Fulfil request through fulfillSwap

    • Refund request through refundSwap

The problem is that a swap can be initiated for a vault that is not live but can be fulfilled only for a vault that is live leaving the user forced to refund the request and pay fees.

Vulnerability Details

Swap requests can be initiated with vaults that are not live which will lead to the user being forced to pay fee on refund and not be able to fulfil the swap. This is due to the vault being loaded using load in initiateSwap but loadLive in fulfillSwap.

Impact

Users paying fee for a request that was never possible in the concrete situation. This will lead to trust issues with protocol.

Tools Used

Manual Review

Recommendations

Add a check whether the given vault is live when a user is initiating a swap request and revert if it is not.

Updates

Lead Judging Commences

inallhonesty Lead Judge 6 months ago
Submission Judgement Published
Validated
Assigned finding tags:

`initiateSwap` allows users to initiate swap even when the vault is paused

Support

FAQs

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