origin-dollar icon indicating copy to clipboard operation
origin-dollar copied to clipboard

[OETHb] Deploy 003 - Vault and Tokens

Open shahthepro opened this issue 1 year ago • 4 comments
trafficstars

Contracts

Contracts Address
OETHBaseProxy 0xdbfefd2e8460a6ee4955a68582f85708baea60a3
OETH (impl) 0x10b342e0205Fc20a0934D1A0F25e270520439989
WOETHBaseProxy 0x7fcd174e80f264448ebee8c88a7c4476aaf58ea6
WOETHBase (impl) 0xcc36F880264fDbA2A32E5d25e0678B836d922674
OETHBaseVaultProxy 0x98a0cbef61bd2d21435f433be4cd42b56b38cc93
OETHVault (impl) 0xe9f783e7d9fceb90988fdf89bbb2bc3e7092fd66
OETHBaseVaultCore (impl) 0x8a42e623b04258a006e455ed2244e490d492f255
OETHBaseVaultAdmin (impl) 0xd50f7d13632ccadcf24fb74676981099fe70d1a7

Governance

  • Transfer Ownership of OETHBaseProxy
  • Transfer Ownership of OETHBaseVaultProxy
  • Add WETH as supported asset
  • Unpause capital (to allow mints)
  • Upgrade wOETH to latest deployed implementation (the first deploy had a bug where it wasn't showing the symbol and name, so I had to fix it and do a manual deploy)
Execute the following actions using guardian safe:  [
  {
    sig: 'claimGovernance()',
    args: [],
    to: '0xDBFeFD2e8460a6Ee4955A68582F85708BAEA60A3',
    data: '0x5d36b190',
    value: '0'
  },
  {
    sig: 'claimGovernance()',
    args: [],
    to: '0x98a0CbeF61bD2D21435f433bE4CD42B56B38CC93',
    data: '0x5d36b190',
    value: '0'
  },
  {
    sig: 'supportAsset(address,uint8)',
    args: [ '0x4200000000000000000000000000000000000006', 0 ],
    to: '0x98a0CbeF61bD2D21435f433bE4CD42B56B38CC93',
    data: '0x6c7561e800000000000000000000000042000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000',
    value: '0'
  },
  {
    sig: 'unpauseCapital()',
    args: [],
    to: '0x98a0CbeF61bD2D21435f433bE4CD42B56B38CC93',
    data: '0x94828ffd',
    value: '0'
  },
  {
    sig: 'upgradeTo(address)',
    args: [ '0xcc36F880264fDbA2A32E5d25e0678B836d922674' ],
    to: '0x7FcD174E80f264448ebeE8c88a7C4476AAF58Ea6',
    data: '0x3659cfe6000000000000000000000000cc36f880264fdba2a32e5d25e0678b836d922674',
    value: '0'
  }
]

Deploy checklist

Two reviewers complete the following checklist:

- [ ] All deployed contracts are listed in the deploy PR's description
- [ ] Deployed contract's verified code (and all dependencies) match the code in master
- [ ] The transactions that interacted with the newly deployed contract match the deploy script.
- [ ] Governance proposal matches the deploy script
- [ ] Smoke tests pass after fork test execution of the governance proposal

shahthepro avatar Jul 31 '24 12:07 shahthepro

Codecov Report

Attention: Patch coverage is 0% with 9 lines in your changes missing coverage. Please review.

Project coverage is 59.31%. Comparing base (54ff726) to head (0b7ff7e).

Files Patch % Lines
contracts/contracts/token/WOETHBase.sol 0.00% 5 Missing :warning:
contracts/contracts/token/WOETH.sol 0.00% 4 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2160      +/-   ##
==========================================
- Coverage   59.46%   59.31%   -0.16%     
==========================================
  Files          70       71       +1     
  Lines        3496     3505       +9     
  Branches      687      910     +223     
==========================================
  Hits         2079     2079              
- Misses       1414     1423       +9     
  Partials        3        3              

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Jul 31 '24 12:07 codecov[bot]

Warnings
:warning: :eyes: This PR needs at least 2 reviewers

Generated by :no_entry_sign: dangerJS against 0b7ff7e6929624850141b3d57a27ad17a00818f4

github-actions[bot] avatar Aug 01 '24 12:08 github-actions[bot]

[OETHb] Deploy 003 - Vault and Tokens

Generated at commit: 0b7ff7e6929624850141b3d57a27ad17a00818f4

🚨 Report Summary

Severity Level Results
Contracts Critical High Medium Low Note Total 3 3 0 18 42 66
Dependencies Critical High Medium Low Note Total 0 0 0 0 0 0

For more details view the full report in OpenZeppelin Code Inspector

openzeppelin-code[bot] avatar Aug 01 '24 12:08 openzeppelin-code[bot]

  • [x] All deployed contracts are listed in the deploy PR's description
    • [x] OETHBaseProxy
    • [x] WOETHBaseProxy
    • [x] OETHBaseVaultProxy
    • [x] OETH
    • [x] WOETH
    • [x] OETHVault
    • [x] OETHBaseVaultCore
    • [x] OETHBaseVaultAdmin
  • [x] Deployed contract's verified code (and all dependencies) match the code in master
    • [x] OETHBaseProxy
    • [x] WOETHBaseProxy
    • [x] OETHBaseVaultProxy
    • [x] OETH
    • [x] WOETHBase (same on the shah/base-deploy-003 branch)
    • [x] OETHVault
    • [x] OETHBaseVaultCore
    • [x] OETHBaseVaultAdmin
  • [x] The transactions that interacted with the newly deployed contract match the deploy script.
    • [x] OETHbProxy.initialize
    • [x] OETHbVaultProxy.initialize
    • [x] wOETHbProxy.initialize
    • [x] OETHbVaultProxy.upgradeTo
    • [x] OETHbVault.setAdminImpl
    • [x] OETHbVaultProxy.transferGovernance
    • [x] OETHbProxy.transferGovernance
  • [ ] Governance proposal matches the deploy script
  • [ ] Smoke tests pass after fork test execution of the governance proposal

Contract diffs

WOETHBase

There are difference of WOETHBase against the master branch but not difference against the shah/base-deploy-003

Master

sol2uml diff  0xcc36F880264fDbA2A32E5d25e0678B836d922674 .,node_modules -n base
Changed contracts/token/WOETH.sol

Compared the "WOETHBase" contract with address 0xcc36F880264fDbA2A32E5d25e0678B836d922674 on base
to local files under folders ".,node_modules"

match   @openzeppelin/contracts/token/ERC20/ERC20.sol
match   @openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol
match   @openzeppelin/contracts/token/ERC20/IERC20.sol
match   @openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol
match   @openzeppelin/contracts/utils/Address.sol
match   @openzeppelin/contracts/utils/Context.sol
match   @openzeppelin/contracts/utils/math/SafeMath.sol
match   contracts/governance/Governable.sol
match   contracts/token/OETH.sol
match   contracts/token/OUSD.sol
changed contracts/token/WOETH.sol
removed contracts/token/WOETHBase.sol
match   contracts/utils/Initializable.sol
match   contracts/utils/InitializableERC20Detailed.sol
match   contracts/utils/StableMath.sol
match   lib/openzeppelin/contracts/token/ERC20/extensions/ERC4626.sol
match   lib/openzeppelin/interfaces/IERC4626.sol

shah/base-deploy-003

sol2uml diff  0xcc36F880264fDbA2A32E5d25e0678B836d922674 .,node_modules -n base
Compared the "WOETHBase" contract with address 0xcc36F880264fDbA2A32E5d25e0678B836d922674 on base
to local files under folders ".,node_modules"

match   @openzeppelin/contracts/token/ERC20/ERC20.sol
match   @openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol
match   @openzeppelin/contracts/token/ERC20/IERC20.sol
match   @openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol
match   @openzeppelin/contracts/utils/Address.sol
match   @openzeppelin/contracts/utils/Context.sol
match   @openzeppelin/contracts/utils/math/SafeMath.sol
match   contracts/governance/Governable.sol
match   contracts/token/OETH.sol
match   contracts/token/OUSD.sol
match   contracts/token/WOETH.sol
match   contracts/token/WOETHBase.sol
match   contracts/utils/Initializable.sol
match   contracts/utils/InitializableERC20Detailed.sol
match   contracts/utils/StableMath.sol
match   lib/openzeppelin/contracts/token/ERC20/extensions/ERC4626.sol
match   lib/openzeppelin/interfaces/IERC4626.sol

WOETHBaseProxy

sol2uml diff 0x7fcd174e80f264448ebee8c88a7c4476aaf58ea6 .,node_modules -n base
Compared the "WOETHBaseProxy" contract with address 0x7FcD174E80f264448ebeE8c88a7C4476AAF58Ea6 on base
to local files under folders ".,node_modules"

match   @openzeppelin/contracts/utils/Address.sol
match   contracts/governance/Governable.sol
match   contracts/proxies/InitializeGovernedUpgradeabilityProxy.sol
match   contracts/proxies/Proxies.sol

OETHBaseProxy

sol2uml diff 0xdbfefd2e8460a6ee4955a68582f85708baea60a3 .,node_modules -n base
Compared the "OETHBaseProxy" contract with address 0xDBFeFD2e8460a6Ee4955A68582F85708BAEA60A3 on base
to local files under folders ".,node_modules"

match   @openzeppelin/contracts/utils/Address.sol
match   contracts/governance/Governable.sol
match   contracts/proxies/InitializeGovernedUpgradeabilityProxy.sol
match   contracts/proxies/Proxies.sol

OETH

sol2uml diff 0x10b342e0205Fc20a0934D1A0F25e270520439989 .,node_modules -n base
Compared the "OETH" contract with address 0x10b342e0205Fc20a0934D1A0F25e270520439989 on base
to local files under folders ".,node_modules"

match   @openzeppelin/contracts/token/ERC20/IERC20.sol
match   @openzeppelin/contracts/utils/Address.sol
match   @openzeppelin/contracts/utils/math/SafeMath.sol
match   contracts/governance/Governable.sol
match   contracts/token/OETH.sol
match   contracts/token/OUSD.sol
match   contracts/utils/Initializable.sol
match   contracts/utils/InitializableERC20Detailed.sol
match   contracts/utils/StableMath.sol

OETHBaseVaultProxy

sol2uml diff 0x98a0cbef61bd2d21435f433be4cd42b56b38cc93 .,node_modules -n base
Compared the "OETHBaseVaultProxy" contract with address 0x98a0CbeF61bD2D21435f433bE4CD42B56B38CC93 on base
to local files under folders ".,node_modules"

match   @openzeppelin/contracts/utils/Address.sol
match   contracts/governance/Governable.sol
match   contracts/proxies/InitializeGovernedUpgradeabilityProxy.sol
match   contracts/proxies/Proxies.sol

OETHVault

sol2uml diff 0xe9f783e7d9fceb90988fdf89bbb2bc3e7092fd66 .,node_modules -n base
Compared the "OETHVault" contract with address 0xE9f783E7D9fcEB90988FDf89bBb2BC3e7092FD66 on base
to local files under folders ".,node_modules"

match   @openzeppelin/contracts/token/ERC20/IERC20.sol
match   @openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol
match   @openzeppelin/contracts/utils/Address.sol
match   @openzeppelin/contracts/utils/math/SafeMath.sol
match   contracts/governance/Governable.sol
match   contracts/interfaces/IBasicToken.sol
match   contracts/interfaces/IOracle.sol
match   contracts/interfaces/IStrategy.sol
match   contracts/interfaces/ISwapper.sol
match   contracts/interfaces/IVault.sol
match   contracts/token/OUSD.sol
match   contracts/utils/Helpers.sol
match   contracts/utils/Initializable.sol
match   contracts/utils/InitializableERC20Detailed.sol
match   contracts/utils/StableMath.sol
match   contracts/vault/OETHVault.sol
match   contracts/vault/Vault.sol
match   contracts/vault/VaultAdmin.sol
match   contracts/vault/VaultInitializer.sol
match   contracts/vault/VaultStorage.sol

OETHBaseVaultCore

sol2uml diff  0x8a42e623b04258a006e455ed2244e490d492f255 .,node_modules -n base
Compared the "OETHBaseVaultCore" contract with address 0x8A42E623b04258A006E455ed2244e490d492f255 on base
to local files under folders ".,node_modules"

match   @openzeppelin/contracts/token/ERC20/IERC20.sol
match   @openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol
match   @openzeppelin/contracts/utils/Address.sol
match   @openzeppelin/contracts/utils/math/SafeMath.sol
match   contracts/governance/Governable.sol
match   contracts/interfaces/IBasicToken.sol
match   contracts/interfaces/IGetExchangeRateToken.sol
match   contracts/interfaces/IOracle.sol
match   contracts/interfaces/IStrategy.sol
match   contracts/token/OUSD.sol
match   contracts/utils/Helpers.sol
match   contracts/utils/Initializable.sol
match   contracts/utils/InitializableERC20Detailed.sol
match   contracts/utils/StableMath.sol
match   contracts/vault/OETHBaseVaultCore.sol
match   contracts/vault/OETHVaultCore.sol
match   contracts/vault/VaultCore.sol
match   contracts/vault/VaultInitializer.sol
match   contracts/vault/VaultStorage.sol

OETHBaseVaultAdmin

sol2uml diff 0xd50f7d13632ccadcf24fb74676981099fe70d1a7 .,node_modules -n base
Compared the "OETHBaseVaultAdmin" contract with address 0xD50F7d13632ccadCF24fB74676981099fe70D1A7 on base
to local files under folders ".,node_modules"

match   @openzeppelin/contracts/token/ERC20/IERC20.sol
match   @openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol
match   @openzeppelin/contracts/utils/Address.sol
match   @openzeppelin/contracts/utils/math/SafeMath.sol
match   contracts/governance/Governable.sol
match   contracts/interfaces/IBasicToken.sol
match   contracts/interfaces/IOracle.sol
match   contracts/interfaces/IStrategy.sol
match   contracts/interfaces/ISwapper.sol
match   contracts/interfaces/IVault.sol
match   contracts/token/OUSD.sol
match   contracts/utils/Helpers.sol
match   contracts/utils/Initializable.sol
match   contracts/utils/InitializableERC20Detailed.sol
match   contracts/utils/StableMath.sol
match   contracts/vault/OETHBaseVaultAdmin.sol
match   contracts/vault/VaultAdmin.sol
match   contracts/vault/VaultStorage.sol

naddison36 avatar Aug 01 '24 14:08 naddison36

  • [x] Governance proposal matches the deploy script
    • [x] Claim Governance on OETHb
    • [x] Claim Governance on OETHbVault
    • [x] Allow minting with WETH
    • [x] Unpause Capital
    • [x] Upgrade wOETHb
  • [x] Smoke tests pass after fork test execution of the governance proposal

naddison36 avatar Aug 05 '24 07:08 naddison36

  • [x] All deployed contracts are listed in the deploy PR's description
  • [x] Deployed contract's verified code (and all dependencies) match the code in master (see output below)
  • [x] The transactions that interacted with the newly deployed contract match the deploy script.
  • [x] Governance proposal matches the deploy script
  • 🔴 [ ] Smoke tests pass after fork test execution of the governance proposal (some tests seem to be failing)

OETHBaseProxy

MacBook-Pro-3:contracts domen-privat$ npx sol2uml diff 0xdbfefd2e8460a6ee4955a68582f85708baea60a3 .,node_modules -n base
Compared the "OETHBaseProxy" contract with address 0xDBFeFD2e8460a6Ee4955A68582F85708BAEA60A3 on base
to local files under folders ".,node_modules"

match   @openzeppelin/contracts/utils/Address.sol
match   contracts/governance/Governable.sol
match   contracts/proxies/InitializeGovernedUpgradeabilityProxy.sol
match   contracts/proxies/Proxies.sol

OETHBase

MacBook-Pro-3:contracts domen-privat$ npx sol2uml diff 0x10b342e0205Fc20a0934D1A0F25e270520439989 .,node_modules -n base
Compared the "OETH" contract with address 0x10b342e0205Fc20a0934D1A0F25e270520439989 on base
to local files under folders ".,node_modules"

match   @openzeppelin/contracts/token/ERC20/IERC20.sol
match   @openzeppelin/contracts/utils/Address.sol
match   @openzeppelin/contracts/utils/math/SafeMath.sol
match   contracts/governance/Governable.sol
match   contracts/token/OETH.sol
match   contracts/token/OUSD.sol
match   contracts/utils/Initializable.sol
match   contracts/utils/InitializableERC20Detailed.sol
match   contracts/utils/StableMath.sol

WOETHBaseProxy

MacBook-Pro-3:contracts domen-privat$ npx sol2uml diff 0x7fcd174e80f264448ebee8c88a7c4476aaf58ea6 .,node_modules -n base
Compared the "WOETHBaseProxy" contract with address 0x7FcD174E80f264448ebeE8c88a7C4476AAF58Ea6 on base
to local files under folders ".,node_modules"

match   @openzeppelin/contracts/utils/Address.sol
match   contracts/governance/Governable.sol
match   contracts/proxies/InitializeGovernedUpgradeabilityProxy.sol
match   contracts/proxies/Proxies.sol

WOETHBase

MacBook-Pro-3:contracts domen-privat$ npx sol2uml diff 0xcc36F880264fDbA2A32E5d25e0678B836d922674 .,node_modules -n base
Compared the "WOETHBase" contract with address 0xcc36F880264fDbA2A32E5d25e0678B836d922674 on base
to local files under folders ".,node_modules"

match   @openzeppelin/contracts/token/ERC20/ERC20.sol
match   @openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol
match   @openzeppelin/contracts/token/ERC20/IERC20.sol
match   @openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol
match   @openzeppelin/contracts/utils/Address.sol
match   @openzeppelin/contracts/utils/Context.sol
match   @openzeppelin/contracts/utils/math/SafeMath.sol
match   contracts/governance/Governable.sol
match   contracts/token/OETH.sol
match   contracts/token/OUSD.sol
match   contracts/token/WOETH.sol
match   contracts/token/WOETHBase.sol
match   contracts/utils/Initializable.sol
match   contracts/utils/InitializableERC20Detailed.sol
match   contracts/utils/StableMath.sol
match   lib/openzeppelin/contracts/token/ERC20/extensions/ERC4626.sol
match   lib/openzeppelin/interfaces/IERC4626.sol

OETHBaseVaultProxy

MacBook-Pro-3:contracts domen-privat$ npx sol2uml diff 0x98a0cbef61bd2d21435f433be4cd42b56b38cc93 .,node_modules -n base
Compared the "OETHBaseVaultProxy" contract with address 0x98a0CbeF61bD2D21435f433bE4CD42B56B38CC93 on base
to local files under folders ".,node_modules"

match   @openzeppelin/contracts/utils/Address.sol
match   contracts/governance/Governable.sol
match   contracts/proxies/InitializeGovernedUpgradeabilityProxy.sol
match   contracts/proxies/Proxies.sol

OETHVault

MacBook-Pro-3:contracts domen-privat$ npx sol2uml diff 0xe9f783e7d9fceb90988fdf89bbb2bc3e7092fd66 .,node_modules -n base
Compared the "OETHVault" contract with address 0xE9f783E7D9fcEB90988FDf89bBb2BC3e7092FD66 on base
to local files under folders ".,node_modules"

match   @openzeppelin/contracts/token/ERC20/IERC20.sol
match   @openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol
match   @openzeppelin/contracts/utils/Address.sol
match   @openzeppelin/contracts/utils/math/SafeMath.sol
match   contracts/governance/Governable.sol
match   contracts/interfaces/IBasicToken.sol
match   contracts/interfaces/IOracle.sol
match   contracts/interfaces/IStrategy.sol
match   contracts/interfaces/ISwapper.sol
match   contracts/interfaces/IVault.sol
match   contracts/token/OUSD.sol
match   contracts/utils/Helpers.sol
match   contracts/utils/Initializable.sol
match   contracts/utils/InitializableERC20Detailed.sol
match   contracts/utils/StableMath.sol
match   contracts/vault/OETHVault.sol
match   contracts/vault/Vault.sol
match   contracts/vault/VaultAdmin.sol
match   contracts/vault/VaultInitializer.sol
match   contracts/vault/VaultStorage.sol

OETHBaseVaultCore

MacBook-Pro-3:contracts domen-privat$ npx sol2uml diff 0x8a42e623b04258a006e455ed2244e490d492f255 .,node_modules -n base
Compared the "OETHBaseVaultCore" contract with address 0x8A42E623b04258A006E455ed2244e490d492f255 on base
to local files under folders ".,node_modules"

match   @openzeppelin/contracts/token/ERC20/IERC20.sol
match   @openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol
match   @openzeppelin/contracts/utils/Address.sol
match   @openzeppelin/contracts/utils/math/SafeMath.sol
match   contracts/governance/Governable.sol
match   contracts/interfaces/IBasicToken.sol
match   contracts/interfaces/IGetExchangeRateToken.sol
match   contracts/interfaces/IOracle.sol
match   contracts/interfaces/IStrategy.sol
match   contracts/token/OUSD.sol
match   contracts/utils/Helpers.sol
match   contracts/utils/Initializable.sol
match   contracts/utils/InitializableERC20Detailed.sol
match   contracts/utils/StableMath.sol
match   contracts/vault/OETHBaseVaultCore.sol
match   contracts/vault/OETHVaultCore.sol
match   contracts/vault/VaultCore.sol
match   contracts/vault/VaultInitializer.sol
match   contracts/vault/VaultStorage.sol

OETHBaseVaultAdmin

MacBook-Pro-3:contracts domen-privat$ npx sol2uml diff 0xd50f7d13632ccadcf24fb74676981099fe70d1a7 .,node_modules -n base
Compared the "OETHBaseVaultAdmin" contract with address 0xD50F7d13632ccadCF24fB74676981099fe70D1A7 on base
to local files under folders ".,node_modules"

match   @openzeppelin/contracts/token/ERC20/IERC20.sol
match   @openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol
match   @openzeppelin/contracts/utils/Address.sol
match   @openzeppelin/contracts/utils/math/SafeMath.sol
match   contracts/governance/Governable.sol
match   contracts/interfaces/IBasicToken.sol
match   contracts/interfaces/IOracle.sol
match   contracts/interfaces/IStrategy.sol
match   contracts/interfaces/ISwapper.sol
match   contracts/interfaces/IVault.sol
match   contracts/token/OUSD.sol
match   contracts/utils/Helpers.sol
match   contracts/utils/Initializable.sol
match   contracts/utils/InitializableERC20Detailed.sol
match   contracts/utils/StableMath.sol
match   contracts/vault/OETHBaseVaultAdmin.sol
match   contracts/vault/VaultAdmin.sol
match   contracts/vault/VaultStorage.sol

sparrowDom avatar Aug 05 '24 10:08 sparrowDom

LGTM at some point we need to make it possible to simulate the governance transactions for the sake of tests.

sparrowDom avatar Aug 05 '24 11:08 sparrowDom

The transaction that sent some OETHb to a dead address. https://basescan.org/tx/0x09870388b4f5fe014c65da3c7097226a01bf544095c02e63f84a65224de6361f

(we do this to cancel any zero totalSupply / divide by zero issues)

sparrowDom avatar Aug 06 '24 07:08 sparrowDom