Using two-step ownership transfer is recommand when amin role palys a critical role in the contract.
Current implemantation of the transferAdmin function allows the admin to be changed in a single step.
admin role is used in function setNFTDescriptor
, which plays a critical role in the contract.
once newAdmin
is wrongly set, function setNFTDescriptor
can be called by the wrong admin, which can lead to a critical vulnerability.
function setNFTDescriptor
can be called by the wrong admin
manual
use two-step ownership transfer to avoid the vulnerability.
refer:
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable2Step.sol
https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-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.