Protocol Deployment
Protocol Deployment
Confirm Governor address.
Confirm Treasury address.
Deploy MapleGlobalsV2 implementation address and verify on Etherscan.
Deploy MapleGlobalsV2 proxy address and verify on Etherscan, declaring the Governor and implementation address.
Deploy the Pool Deployer contract, declaring the MapleGlobalsV2 address.
Set values in the MapleGlobalsV2 contract with the Governor address (revisit this):
globals.setMapleTreasury(treasury);
globals.setMigrationAdmin(migrationAdmin);
globals.setSecurityAdmin(securityAdmin);
globals.setValidPoolAsset(USDC, true); (Do for all assets)
globals.setPriceOracle(USDC, 1e8); (Do for all assets
globals.setValidPoolDeployer(address(deployer), true);
globals.setDefaultTimelockParameters(1 weeks, 2 days);
Deploy all proxy factories, implementations, and initializers, passing in MapleGlobalsV2 to the factories:
Liquidator
LoanManager
PoolManager
WithdrawalManager
Ignore Loan since it has already been deployed.
Register implementations for all factories and set default versions:
Liquidator - 100
LoanManager - 100
PoolManager - 100
WithdrawalManager - 100
Ignore Loan to avoid accidental deployments of V4 loans prior to migration.
Allowlist all factories in Maple Globals:
Liquidator
Loan
LoanManager
PoolManager
WithdrawalManager
Transfer ownership of MapleGlobalsV2 to the governor.
globals.setPendingGovernor(governor);
globals.acceptGovernor();
At this stage, the following is true:
MapleGlobalsV2 is deployed and controlled by the governor
All factories are ready to deploy protocol contracts.
Allowed Assets are ready to be used in the protocol.
Oracles are configured.
Migration and Security admins are configured.
Last updated