Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy Lido contracts #36

Merged
merged 2 commits into from
Oct 17, 2024
Merged

Deploy Lido contracts #36

merged 2 commits into from
Oct 17, 2024

Conversation

naddison36
Copy link
Collaborator

@naddison36 naddison36 commented Oct 16, 2024

Deployment

The mainnet deploy script is script/deploy/mainnet/003_UpgradeLidoARMScript.sol.
This will update the contract addresses in build/deployments-1.json.

# set the PROVIDER_URL and DEPLOYER_PRIVATE_KEY environment variables in the .env file
make deploy

Deployed Contracts

Contract Address Deployment
CapManager Impl 0x8506486813d025C5935dF481E450e27D2e483dc9 new
CapManager Proxy 0xf54ebff575f699d281645c6F14Fe427dFFE629CF new
LidoARM Proxy 0x85B78AcA6Deae198fBF201c82DAF6Ca21942acc6 existing
LidoARM impl 0x3d724176c8f1F965eF4020CB5DA5ad1a891BEEf1 new
Zapper 0x01F30B7358Ba51f637d1aa05D9b4A60f76DAD680 new

Etherscan

# CapManager
forge verify-contract \
    --constructor-args $(cast abi-encode "constructor(address)" "0x85B78AcA6Deae198fBF201c82DAF6Ca21942acc6") \
    0x8506486813d025C5935dF481E450e27D2e483dc9 CapManager

# LidoARM
forge verify-contract \
    --constructor-args $(cast abi-encode "constructor(address,address,address,uint256)" "0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84" "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2" "0x889edC2eDab5f40e902b864aD4d7AdE8E412F9B1" 600 ) \
    0x3d724176c8f1F965eF4020CB5DA5ad1a891BEEf1 LidoARM

# ZapperLidoARM
forge verify-contract \
    --constructor-args $(cast abi-encode "constructor(address,address)" "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2" "0x85B78AcA6Deae198fBF201c82DAF6Ca21942acc6") \
    0x01F30B7358Ba51f637d1aa05D9b4A60f76DAD680 ZapperLidoARM

Governance

The following actions are in the governance tx:

  • approve the Lido ARM to transfer WETH
  • upgrade the existing AMM proxy to the Lido ARM
  • Initialize the Lido ARM with
    • token symbol ARM-WETH-stETH and name Lido ARM
    • Operator as the ARM Defender Relayer 0x39878253374355DBcc15C86458F084fb6f2d6DE7
    • 20% performance fee
    • Fee collector as the ARM BuyBack contract
  • set initial prices
  • set new owner as the Mainnet 5/8 multisig 0xbe2AB3d3d8F6a32b96414ebbd865dBD276d3d899
  • deposit an initial 10 WETH for mainnet testing

This is tx #8 in the AMM v1 2/5 multisig
https://app.safe.global/transactions/tx?id=multisig_0xC8F2cF4742C86295653f893214725813B16f7410_0x4453fde153491aa4ded5f4956d8e2cdd2a7bfce73b2fe2864c6b7a1035595d30&safe=eth:0xC8F2cF4742C86295653f893214725813B16f7410

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
- [ ] Contract constructors have correct arguments
- [ ] The transactions that interacted with the newly deployed contract match the deploy script.
- [ ] Multisig tx matches the deploy script

Copy link
Contributor

@clement-ux clement-ux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • All deployed contracts are listed in the deploy PR's description
    • CapManager Proxy
    • CapManager Imple
    • LidoARM Imple
    • Zapper
  • Deployed contract's verified code (and all dependencies) match the code in master
  • Contract constructors have correct arguments
    • CapManager Proxy - No constructor
    • CapManager Imple
    • LidoARM Imple
    • Zapper
  • The transactions that interacted with the newly deployed contract match the deploy script.
  • Multisig tx matches the deploy script

Code Diff (against nicka/lp branch)

  • Cap Manager Proxy
sol2uml diff 0xf54ebff575f699d281645c6F14Fe427dFFE629CF .,node_modules -n mainnet
(node:60988) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
Compared the "Proxy" contract with address 0xf54ebff575f699d281645c6F14Fe427dFFE629CF on mainnet
to local files under folders ".,node_modules"

match   src/Ownable.sol
match   src/Proxy.sol
  • CapManager
sol2uml diff 0x8506486813d025C5935dF481E450e27D2e483dc9 .,node_modules -n mainnet
(node:60939) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
Compared the "CapManager" contract with address 0x8506486813d025C5935dF481E450e27D2e483dc9 on mainnet
to local files under folders ".,node_modules"

match   lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol
match   src/CapManager.sol
match   src/Interfaces.sol
match   src/Ownable.sol
match   src/OwnableOperable.sol
  • Lido ARM Impl
sol2uml diff 0x3d724176c8f1F965eF4020CB5DA5ad1a891BEEf1 .,node_modules -n mainnet
(node:61071) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
Compared the "LidoARM" contract with address 0x3d724176c8f1F965eF4020CB5DA5ad1a891BEEf1 on mainnet
to local files under folders ".,node_modules"

match   lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol
match   lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/ERC20Upgradeable.sol
match   lib/openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol
match   lib/openzeppelin-contracts/contracts/interfaces/draft-IERC6093.sol
match   lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol
match   lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol
match   lib/openzeppelin-contracts/contracts/utils/math/SafeCast.sol
match   src/AbstractARM.sol
match   src/Interfaces.sol
match   src/LidoARM.sol
match   src/Ownable.sol
match   src/OwnableOperable.sol
  • Zapper
sol2uml diff 0x01F30B7358Ba51f637d1aa05D9b4A60f76DAD680 .,node_modules -n mainnet
(node:60861) ExperimentalWarning: The Fetch API is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
Compared the "ZapperLidoARM" contract with address 0x01F30B7358Ba51f637d1aa05D9b4A60f76DAD680 on mainnet
to local files under folders ".,node_modules"

match   src/Interfaces.sol
match   src/Ownable.sol
match   src/ZapperLidoARM.sol

@DanielVF
Copy link
Contributor

DanielVF commented Oct 17, 2024

  • All deployed contracts are listed in the deploy PR's description
  • Deployed contract's verified code (and all dependencies) match the code in master
  • Contract constructors have correct arguments
  • The transactions that interacted with the newly deployed contract match the deploy script.
  • Multisig tx matches the deploy script

@DanielVF DanielVF marked this pull request as ready for review October 17, 2024 19:07
@DanielVF DanielVF merged commit f330e03 into nicka/lp Oct 17, 2024
1 of 2 checks passed
@DanielVF DanielVF deleted the nicka/lp-deploy branch October 17, 2024 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants