Open hats-bug-reporter[bot] opened 9 months ago
This is not a bug. Setting the owner of a contract during deployment is a common pattern and there is no need to force the owner to be the deployer. On the contrary, the owner will typically be a multisig whilst the deployer will not.
Github username: @0xsnowbear Twitter username: 0xsnowbear Submission hash (on-chain): 0xfe1a6090a2575c1b69c934c53b34168aab32c5161987097fb2575d67c937680e Severity: low
Description: Description\ In the
PoolDeposit::contructor()
, theowner
address is set in the parameter_owner
. During deployment, it should be the address of the deployer of the contract in congruence with theonlyOwner()
modifer logic.However, there is a possibility that this may be overlooked during deployment and mistakenly be set into a wrong address.
Impact\ If that happens, the protocol team will be obliged to re-deploy the contract. The occurence is in the following contracts namely:
Bfx::constructor()
,BfxVault::constructor()
andPoolDeposit::constructor()
.Below is the snippet of the occurence in
PoolDeposit::constructor()
.Mitigation\ To fix the issue, just set the
owner
as themsg.sender
in the constructor (shown below) and do it to the rest of the contracts affected.