The total fees accrued by the protocol can be withdrawn using the withdrawFees function where it transfer the totalFees from the orderbook contract to a to
adddress provided by the onlyOwner
. However, in the withdrawFeess
function, the totalFees
is reset to zero after the external safeTransfer
interaction which is contrary to the Checks Effects Interactions principle.
`withdrawFees()` function performs an external transfer using `iUSDC.safeTransfer()` before resetting totalFees. This breaks the `Checks-Effects-Interactions (CEI)` pattern and can lead to incorrect internal state if the transfer fails for any reason.
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.