The collectProtocolRevenue
function lacks a zero address validation check for the to
parameter. This could lead to permanent loss of protocol revenue if an admin accidentally provides address(0) as the destination address.
If the admin mistakenly passes address(0) as the to
parameter:
The function will execute without reverting
The protocol revenue will be reduced to 0: protocolRevenue[token] = 0
The tokens will be transferred to the zero address
These tokens will be permanently lost as the zero address is inaccessible
Add a zero address validation check at the beginning of the function
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.