First Flight #12: Kitty Connect

First Flight #12: Kitty Connect
Beginner FriendlyFoundryNFTGameFi
100 EXP
View results
Submission Details
Severity: low
Invalid

Missing event emission in `KittyBridge::updateGaslimit` function impacting on transparency and monitoring

Summary

The function KittyBridge::updateGaslimit modifies the gas limit without emitting an event. This deviation from best practices could potentially hinder transparency and tracking of gas limit changes.

Vulnerability Details

Events serve as a crucial mechanism for informing external contracts and applications about state changes within a smart contract. In this context, emitting an event upon altering the gas limit in the function KittyBridge::updateGaslimit would enhance transparency and facilitate monitoring of gas-related modifications.

Impact

Failure to emit an event when changing the gas limit might obscure important state transitions, potentially leading to confusion or oversight in monitoring gas-related activities. While the immediate impact might seem minimal, maintaining transparency and clarity in contract interactions is fundamental for robust and secure smart contract systems.

Tools Used

Slither

Recommendations

To mitigate this issue, it is recommended to implement an event emission within the KittyBridge::updateGaslimit function. By emitting an event with relevant information whenever the gas limit is modified, transparency and auditability of gas-related operations will be significantly improved. This enhancement will not only aid in tracking gas limit changes but also contribute to the overall comprehensibility and security of the smart contract system.

Here's one way this could be implemented

+ event GasLimitUpdated(uint256 gasLimit);
function updateGaslimit(uint256 gasLimit) external onlyOwner {
gaslimit = gasLimit;
+ emit GasLimitUpdated(gaslimit);
}
Updates

Lead Judging Commences

inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
seeu Submitter
over 1 year ago
inallhonesty Lead Judge
over 1 year ago
inallhonesty Lead Judge about 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.