Gas limits for Chainlink Functions are configurable but may need frequent updates as network conditions change, potentially leading to failed transactions or inefficient gas usage.
The contract uses configurable gas limits for Chainlink Functions and Automation:
However, these values require manual updates by the contract owner and don't automatically adjust to changing network conditions. If gas prices fluctuate significantly or network congestion occurs, the hardcoded limits may become inappropriate.
This PoC demonstrates three scenarios related to hardcoded gas limits:
Gas limit too low: The function requires more gas than the hardcoded limit, causing it to fail
Gas limit too high: The function uses significantly less gas than the limit, resulting in wasted gas
Network congestion: Changing network conditions increase gas requirements, making the hardcoded limit insufficient
These scenarios show how hardcoded gas limits can lead to transaction failures or inefficiencies under different conditions.
The hardcoded gas limits could lead to:
Failed transactions if gas limits are set too low during network congestion
Excessive gas costs if limits are set too high during normal conditions
Dependency on the owner to regularly monitor and update gas limits
Potential service disruptions if the owner is unavailable to update limits
Implement dynamic gas limit adjustment:
Consider implementing a gas price oracle integration to automatically adjust limits based on network conditions.
Add a buffer to gas limit calculations to account for unexpected variations in execution costs.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
View preliminary resultsAppeals are being carefully reviewed by our judges.
The contest is complete and the rewards are being distributed.