stake.link

stake.link
DeFiHardhatBridge
27,500 USDC
View results
Submission Details
Severity: low
Invalid

Avoid Unnecessary state changes to save gas

The setMaxLINKFee function sets the maximum LINK fee that can be paid for outgoing CCIP messages. We can optimize this function to check if the new fee is different from the current maxLINKFee before proceeding with the state update. This prevents unnecessary state changes and gas usage when the new fee is the same as the current one.

function setMaxLINKFee(uint256 _maxLINKFee) external onlyOwner {
require(_maxLINKFee != maxLINKFee, "New fee is the same as current fee");
maxLINKFee = _maxLINKFee;
}
Updates

Lead Judging Commences

0kage Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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