Function for rescuing tokens in an emergency has no restrictions, opening possibilities for malicious acts or accidents that can drain all tokens, including unclaimed vested amounts.
In the VestedAirdrop::rescue_tokens
function, the owner can move tokens out of the contract at any time and at any amount with no restrictions:
This implementation lacks any checks and governance control for restricting its functionality.
Any amount of tokens can be moved out of the contract at any time by the owner. This could put all tokens at risk if owner acts maliciously or their private information is compromised. Requires complete trust in the owner, undermining the trustless nature of blockchain contracts.
Manual inspection, copilot and moccasin.
Alternative implementations where allowing only excess tokens to be rescued, enabling a timelock mechanism or disabling rescue after claims start would provide stronger protection while still allowing legitimate rescues of the excess tokens, e.g.:
The `owner` is trusted and the function `rescue_tokens` can be called only by the owner and only in case of emergency. This means the owner will not act maliciously and will not call the function without need. Also, issues realated to the malicious admin actions are invalid according to the CodeHawks documentation: https://support.cyfrin.io/en/articles/10059196-findings-validity
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.