The TempleGoldStaking::recoverToken
function does not include a check to ensure that the _to
address is not the zero address (address(0)
), which could result in tokens being burned when attempting to recover them. This renders the recovery call ineffective.
The recoverToken
function allows elevated access to recover tokens that are neither staking tokens nor reward tokens. However, there is no validation to ensure that the recipient address (_to
) is not the zero address (address(0)
). If _to
is address(0)
, the safeTransfer
function will burn the tokens instead of transferring them to a valid recipient.
Without a check for address(0)
, tokens can be inadvertently burned, making the recovery attempt futile and potentially resulting in the loss of tokens that are meant to be recovered and utilized elsewhere.
Manual Review
Add a check to ensure that the _to
address is not address(0)
before proceeding with the token transfer.
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.