brinktrade / brink-core

Core smart contracts for Brink accounts
GNU General Public License v3.0
13 stars 7 forks source link

Make proxy owner constant #39

Closed mikec closed 3 years ago

mikec commented 3 years ago

changes the proxy owner address in Proxy.sol to a constant that is included in deployed bytecode. To get the proxy owner value, Account.sol reads the Proxy's deployed bytecode using extcodecopy.

Two reasons for this change - 1. the owner address becomes immutable, it can never be changed after proxy deployment, so it has no risk of being overwritten by a delegatecall to a bad verifier. and 2. it significantly reduces the gas cost of proxy deployment