Open hats-bug-reporter[bot] opened 1 month ago
Thank you for your detailed report on the incorrect error revert in the _matchNettedFlows() function. We've reviewed your submission and agree that this is a valid low-severity issue.
You've correctly identified that the error definition and the actual revert statement have the matrixNettedFlow and streamNettedFlow values swapped. This inconsistency, while not affecting the functionality of the code, could potentially lead to confusion during debugging or error handling.
We appreciate your attention to detail in spotting this discrepancy. Your report helps us maintain consistency and clarity in our error handling, which is crucial for effective debugging and system maintenance.
Thank you for your valuable contribution to improving the quality and reliability of our codebase.
Github username: -- Twitter username: -- Submission hash (on-chain): 0x1ba3e28bee5090b61d7a9fc379a6ec1de3218c283307c6d43ad9f1588a22f411 Severity: low
Description: Description\ In
_matchNettedFlows()
ofHub.sol
:When streamsNettedFlow is not equal to matrixNettedFlow, the error
CirclesHubNettedFlowMismatch
is reverted.The issue is that, error
CirclesHubNettedFlowMismatch()
is incorrectly implemented and it is not correct. errorCirclesHubNettedFlowMismatch()
inErrors.sol
is implemented as:Here, in
_matchNettedFlows()
function, the values ofmatrixNettedFlow
andstreamNettedFlow
are interchanged and wont be correctly returned while the error would be reverted due to incorrect implementation. Due to this issue, the function caller would be mislead with incorrect values of matrix and stream netted flow.Recommendations\ Correct the error
CirclesHubNettedFlowMismatch()
revert implementation as below: