The initiateSwap function in StabilityBranch.sol accepts and transfers user tokens for multiple vaults without validating their active status. When a vault is paused, the keeper's fulfillSwap operation for that specific request will revert, leaving those tokens stuck until the refund deadline.
The vulnerability stems from mismatched validation between initiateSwap and fulfillSwap:
In initiateSwap:
In fulfillSwap (called by keeper for each request individually):
Example Scenario:
User initiates a swap with multiple vaults: [Vault1(live), Vault2(paused), Vault3(live)]
initiateSwap accepts all transfers:
Transfer for Vault1: 100 tokens
Transfer for Vault2 (paused): 50 tokens
Transfer for Vault3: 75 tokens
Keeper processes each request separately:
Vault1 request: Succeeds, tokens swapped
Vault2 request: Reverts due to loadLive check, 50 tokens stuck
Vault3 request: Succeeds, tokens swapped
Result:
Vault1 & Vault3: Successfully processed
Vault2: 50 tokens stuck until refund deadline
Tokens sent to paused vaults become temporarily locked. Users must wait for deadline expiry to reclaim tokens via refundSwap and incur base fee on redeem.
Manual Review
Validate all vault statuses for liveness before performing any token transfers
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.