Potential for Inefficient Error Handling in WithdrawalPool.getWithdrawals
The getWithdrawals
function in the WithdrawalPool
contract does not handle invalid withdrawal
IDs gracefully. While Solidity 0.8.15 provides automatic bounds checking for array access, preventing out-of-bounds reads, the current implementation will cause the entire transaction to revert if any single withdrawal ID is invalid.
Low. This issue does not pose a direct security risk but may lead to a suboptimal user experience and increased gas costs for users when querying withdrawal information.
vscode
Consider implementing a more robust error handling mechanism that can process valid withdrawal IDs even when some IDs in the input array are invalid. This can be achieved by checking if each ID is within the valid range and returning a default or null value for invalid IDs.
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.