<!-- canonical: https://0xsimao.com/findings/metazero-i-ownable2-step-preferred-ownable -->

# Ownable2Step should be preferred over Ownable

Low/Info · Three Sigma · Omnichain RWA tokenisation · 27th January, 2024

Finding 3S-MetaZero-L03 of the MetaZero Omnichain NFTs security review.

- Protocol: https://metazero.gg/
- Report: /reports/metazero-i
- Source: https://cdn.sanity.io/files/qoqld077/production/1b1ab4ff365756fe1d86767f1e06744407570f5a.pdf

---

### Description

[Ownable](https://github.com/threesigmaxyz/metazero-issues-external/blob/master/src/ONFTV2-721C.sol#L15C59-L15C71) performs a simple ownership transfer by setting the owner to a new address. This
is dangerous and could result in an invalid owner being set. [Ownable2Step](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable2Step.sol) performs
additional checks by setting a pending owner which has then to accept the ownership.
Consider using it instead.

### Status

Acknowledged

---

Related findings:

- [Ownable2Step is recommended over Ownable](https://0xsimao.com/findings/ostium-ownable2-step-recommended-ownable): Ostium
