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

# Ownable2Step is preferred over Ownable

Low/Info · Three Sigma · Modular blockchain infrastructure · 27th January 2024

Finding 3S-TR-L05 of the Trestle wTIA Bridge security review.

- Report: /reports/trestle-wtia-bridge
- Source: https://github.com/0xsimao/audits/blob/main/Three%20Sigma/2024-01-27-trestle.pdf

---

### Description

Openzeppelin [Ownable2Step](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable2Step.sol) changes transferOwnership() to a 2 step procedure, which
means that to change an owner, first a pending owner is set and only then this account
must accept ownership. This means that it's impossible to set the wrong address as the
owner by mistake.

### Recommendation

Use Ownable2Step.

### Status

Acknowledged.

Disclosed by 0xSimao (https://0xsimao.com/).

---

Related findings:

- [Ownable2Step should be preferred over Ownable](https://0xsimao.com/findings/metazero-i-ownable2-step-preferred-ownable): MetaZero Omnichain NFTs
- [Ownable2Step is preferred over Ownable](https://0xsimao.com/findings/vertex-ownable2-step-preferred-ownable): Vertex
- [Ownable2Step is recommended over Ownable](https://0xsimao.com/findings/ostium-ownable2-step-recommended-ownable): Ostium
