If I understand correctly vaultGov needs factory address and factory needs vaultGov
so right now from deployment script flow is
deploy vaultGov
deploy factory (vaultGov address)
Initilize in vaultGov (factory address)
we can avoid this 3rd step, by predicting address of factory before deployment
using signer and nonce
this is fair, as this are deployed only once and by protocol itself
This is going to save gas cost for 1 tx per type of vault (1 * 5) and
gas cost for checking this
require(initialized, ExceptionsLibrary.INITIALIZATION);
in each deployVault of vault governance
Handle
0x421f
Vulnerability details
If I understand correctly vaultGov needs factory address and factory needs vaultGov so right now from deployment script flow is deploy vaultGov deploy factory (vaultGov address) Initilize in vaultGov (factory address)
we can avoid this 3rd step, by predicting address of factory before deployment using signer and nonce this is fair, as this are deployed only once and by protocol itself
This is going to save gas cost for 1 tx per type of vault (1 * 5) and gas cost for checking this require(initialized, ExceptionsLibrary.INITIALIZATION); in each deployVault of vault governance