changeDAO() updatesDAO address in one-step. If an incorrect address is mistakenly used (and voted upon) then future administrative access or recovering from this mistake is prevented because onlyDAO modifier is used for changeDAO(), which requiresmsg.senderto be the incorrectly usedDAOaddress (for which private keys may not be available to sign transactions). See finding #6 from Trail of Bits audit of Hermez Network.
Recommend using a two-step process where the old DAO address first proposes new ownership in one transaction; and then, accepts ownership from the newly proposed DAO address in a second transaction. A mistake in the first step can be recovered by granting with a new correct address again before the new DAO address accepts ownership. Ideally, there should also be a timelock enforced before the new DAO takes effect.
strictly-scarce (vader) confirmed:
dmvt (judge) commented:
