DeFiFoundrySolidity
16,653 OP
View results
Submission Details
Severity: low
Invalid

Insufficient Validation of Claimable Balance in claimAndSwap Function Could Disrupt Keeper Operations

Summary

The claimAndSwap function in the strategyOp contract does not validate the claimable balance before executing the claim. If the requested _amountClaim exceeds the actual claimable balance, the claim will fail, causing disruptions in the operation of keepers, who rely on this function to manage funds efficiently.

Vulnerability Details

The claimAndSwap function in the StrategyOp contract fails to validate the requested _amountClaim against the claimable balance. This oversight means that if a keeper unintentionally attempts to claim an amount greater than what is available, the transaction will revert during the claim execution. This can lead to frustration for keepers who rely on successful claims to manage funds efficiently.

Affected Code Block:

This line allows for claims that exceed the available amount, leading to potential transaction failures

function claimAndSwap(uint256 _amountClaim, uint256 _minOut, IVeloRouter.route[] calldata _path) external onlyKeepers {
transmuter.claim(_amountClaim, address(this)); // No validation for claimable limits
....
}

Impact

  • Failed Claims: Keepers may encounter failures when attempting to claim amounts greater than the actual claimable balance, leading to transaction reverts.

  • Wasted Resources: Each failed claim transaction incurs gas costs, impacting the economic viability for keepers operating on tight margins.

  • Operational Delays: Disruptions in claiming could delay subsequent operations, affecting the overall efficiency and responsiveness of the protocol.

Tools Used

Manual Review

Recommendations

Add Validation: Implement a check for the claimable balance before calling the claim function.

For example:

function claimAndSwap(uint256 _amountClaim, uint256 _minOut, IVeloRouter.route[] calldata _path) external onlyKeepers {
uint256 claimableBalance = transmuter.getClaimableBalance(address(this));
require(_amountClaim <= claimableBalance, "Insufficient claimable balance");
transmuter.claim(_amountClaim, address(this));
....
}

This approach will ensure that keepers can only attempt to claim amounts that are actually available, preventing unnecessary transaction failures and enhancing the operational efficiency of the protocol

Updates

Appeal created

inallhonesty Lead Judge 8 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.