hats-finance / Catalyst-Exchange-0x3026c1ea29bf1280f99b41934b2cb65d053c9db4

Other
1 stars 2 forks source link

Use Ownable2Step rather than Ownable #27

Open hats-bug-reporter[bot] opened 8 months ago

hats-bug-reporter[bot] commented 8 months ago

Github username: @saidqayoumsadat Twitter username: saqsadat143 Submission hash (on-chain): 0xc35ff36c88677acf554f3830f0b084e6b277a49726208551bfe4eef5dcd0e515 Severity: low

Description: Description

Ownable2Step and Ownable2StepUpgradeable prevent the contract ownership from mistakenly being transferred to an address that cannot handle it (e.g. due to a typo in the address), by requiring that the recipient of the owner permissions actively accept via a contract call of its own.

  1. Proof of Concept (PoC) File
file: /src/CatalystChainInterface.sol

28  contract CatalystChainInterface is ICatalystChainInterface, Ownable, Bytes65 {

https://github.com/catalystdao/catalyst/blob/27b4d0a2bca177aff00def8cd745623bfbf7cb6b/evm/src/CatalystChainInterface.sol#L28C1-L28C79

file: /src/CatalystFactory.sol

20   contract CatalystFactory is Ownable, ICatalystV1Factory {

https://github.com/catalystdao/catalyst/blob/27b4d0a2bca177aff00def8cd745623bfbf7cb6b/evm/src/CatalystFactory.sol#L20C1-L20C58

reednaa commented 8 months ago

Duplicate.