_transferToken charges a governance fee from the amount to withdraw. This fee can easily be bypassed with a low decimal, high cost token like wbtc.
By splitting deposits into small chunks, and subsequently withdrawing the small chunks, even when a user is in profit, the calculation (amount - depositInfo[depositId].amount) * governanceFee will in more cases be less than BASIS_POINTS_DIVISOR and due to solidity's innate rounding down of division will always evaluate 0.
This will occur much easily with a token like WBTC which on average is very expensive and also has relatively low decimal count compared to other tokens. It's also possible with a token like USDC due to it's also low decimal count. Also, low gas costs on arbitrum and avalanche will make multiple small deposits relatively cheaper, compared to a chain like ethereum mainnet.
Round up fee calculations in favour of protocol.
Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelihood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.
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.