https://github.com/Cyfrin/2024-07-zaros/blob/main/src/external/chainlink/ChainlinkUtil.sol#L41-L57
Within ChainlinkUtil.sol
, the formatting of the try-catch block causes it to always revert with Errors.InvalidSequencerUptimeFeedReturn()
instead of intended error messages.
In the ChainlinkUtil.sol
contract, the try-catch block is used to handle errors from the sequencerUptimeFeed.latestRoundData()
function. However, the current implementation will always catch any revert within the try block and subsequently revert with Errors.InvalidSequencerUptimeFeedReturn()
. This behavior overrides more specific error messages that provide better context for debugging and error logging.
Functionally, the impact on the protocol is minimal since the operation will still revert. However, this issue can hinder future debugging and error logging efforts because it obscures the specific cause of the error by replacing it with a more generic message.
The following code demonstrates the issue:
In this scenario, any revert within the try block will trigger the catch block, which will then revert with Errors.InvalidSequencerUptimeFeedReturn()
, masking the original error message.
Manual Review
Remove Try-Catch Block: Eliminate the try-catch block entirely. Instead, allow the function to revert with the original, more descriptive error messages.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.