DeFiFoundry
60,000 USDC
View results
Submission Details
Severity: low
Invalid

error in encoding data

Summary

error in encoding data

Vulnerability Details

function performUpkeep(bytes calldata peformData) external override onlyForwarder {
uint128[] memory accountsToBeLiquidated = abi.decode(peformData, (uint128[]));
LiquidationKeeperStorage storage self = _getLiquidationKeeperStorage();
(IPerpsEngine perpsEngine) = (self.perpsEngine);
perpsEngine.liquidateAccounts(accountsToBeLiquidated);
}

The error is in the decoding of peformData. The function is decoding peformData as if it only contains an array of uint128, but based on the checkUpkeep function, peformData (or extraData as it was called there) actually contains two pieces of information:

  1. The array of account IDs to be liquidated

  2. The address of the contract itself

This error means that the function is not correctly extracting all the data passed to it, potentially leading to unexpected behavior or reverts if the data is not in the expected format.

Impact

This error means that the function is not correctly extracting all the data passed to it, potentially leading to unexpected behavior or reverts if the data is not in the expected format.

Tools Used

Manual Review

Recommendations

(uint128[] memory accountsToBeLiquidated, address) = abi.decode(peformData, (uint128[], address));

Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Error is in decoding of `peformData`

Support

FAQs

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