File location:
'Stakeable' contracts use 'Ownable' which allows direct transfer of ownership without confirmation from the new owner. This may result in risks if the address entered is incorrect or cannot handle the ownership.
In a 'Stakeable' contract, ownership can be immediately transferred to a new address using the '_setOwner' function of 'Ownable'. However, if the address entered is incorrect or it is not possible to manage ownership (for example, due to a typo or incorrect address), then the contract will be in an unmanageable state. This may result in loss of control over the contract.
If the new address provided is incorrect or cannot handle ownership, the 'Stakeable' contract cannot be managed any more. This may result in loss of staked funds and loss of control over important contract functions, such as withdrawal or locking of funds.
Inspection manual
Solidity
Code snippet:
Fixed:
Replace ‘import "@openzeppelin/contracts/access/Ownable.sol";’ with ‘import "@openzeppelin/contracts/access/Ownable2Step.sol";’.
Replace ‘contract Stakeable is Ownable, IStakeable’ with ‘contract Stakeable is Ownable2Step, IStakeable’.
Replace ‘_setOwner(newOwner);’ dengan ‘_transferOwnership(newOwner);’ on constructor.
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.