The setRouter
function lacks basic safeguards for router address validation and approval management. While protected by onlyManagement
, implementing additional checks would follow security best practices and prevent potential misconfigurations.
The function allows setting any address as router and does not revoke previous approvals, which deviates from security best practices for token approval management.
If management mistakenly sets an incorrect router address, they would need to perform an additional transaction to correct it
Previous router approvals remain active unnecessarily, slightly increasing the protocol's trust surface
Add basic safety checks and cleanup for router management:
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.