This check if (collateral == 0) revert ZeroCollateral(); should be moved above the Pool memory pool = pools[poolId]; line. In case the collateral is 0, the function will revert before initializing the pool variable and performing other checks on pool components.
This is especially important given that this happens within a for loop.
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.