Part 2

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

The refundSwap function does not enforce authorisation in the StabilityBranch contract

Summary

An access control vulnerability exists in the refundSwap(uint128,address) function of the StabilityBranch contract. The function does not enforce the onlyRegisteredSystemKeepers modifier, allowing any user to invoke the refund process. This can enable malicious actors to trigger unwanted or premature refunds of swap requests, potentially interfering with normal user operations and system integrity.

Vulnerability Details

Impact

By exploiting the missing modifier, a malicious user could:

  1. Disrupt Active Swaps: Force refunds of valid, in‐progress swap requests.

  2. Cause Financial or Operational Damage: If refunds are executed unexpectedly, users could lose opportunities to execute favorable swaps, and the system might behave unpredictably.

  3. Undermine Trust in the Platform: Users rely on the expectation that only authorized entities (keepers or administrators) can process certain sensitive functions. This vulnerability breaks that assumption.

Tools Used

  • Manual Code Review: The absence of an access control modifier was identified through direct inspection of refundSwap.

Recommendations

Restrict Access

  • Apply the onlyRegisteredSystemKeepers modifier (or a similarly restrictive modifier) to the refundSwap function.

  • Example:

    function refundSwap(uint128 requestId, address engine)
    external
    onlyRegisteredSystemKeepers
    {
    ...
    }

    This ensures that only privileged entities (trusted keepers) can execute this sensitive action.

Updates

Lead Judging Commences

inallhonesty Lead Judge
7 months ago
inallhonesty Lead Judge 6 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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