DeFiHardhat
21,000 USDC
View results
Submission Details
Severity: high
Invalid

Missing `initialGasLeft` in the `incentivize`

Summary

A careful review of function incentivize, reveals that the value of the essential parameter initialGasLeft has been omitted from the body of the function. The omission obstructs the function's intended behavior, potentially leading to erroneous calculations or runtime failures.

Vulnerability Details

The vulnerability hinges on the exclusion of the initialGasLeft parameter from the incentivize function's signature. This oversight deprives the function of accessing critical input data necessary for its operation. Consequently, the function's logic, presumably reliant on initialGasLeft, cannot execute as intended, risking functional breakdown or runtime errors.

Impact

Without initialGasLeft, the incentivize function may produce erroneous results or fail outright, impeding its intended purpose.

Tools Used

Manual

Recommendations

Code Snippet
function incentivize(
address account,
uint256 initialGasLeft,
LibTransfer.To mode
) private returns (uint256) {
+ uint256 initialGasLeft = gasleft();
// the rest of the function codes
.....
}
</details>
Updates

Lead Judging Commences

giovannidisiena Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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