Open Term Loan Deployment
Phase 1 - Deploy New Contracts
Deploy and verify the following contracts using a single forge script:
New PoolDeployer
New PoolDeployer pointing to existing mapleGlobalsProxy
Globals and PoolManager Upgrade Contracts
Globals v2.0.0 implementation
PoolManager v2.0.0 implementation
Fixed Term Loan Upgrade Contracts
MapleLoan v5.0.1 implementation
MapleLoanInitializer for v5.0.0 deployments
MapleLoanMigrator for v4.0.0 -> v5.0.0 upgrades
LoanManager v3.0.1 implementation
Open Term Loan Manager Contracts
LoanManagerFactory
LoanManagerImplementation v1.0.0 implementation
LoanManagerInitializer for v1.0.0 deployments
Open Term Loan Contracts
MapleLoanFactory
MapleLoanInitializer for v1.0.1 deployments
MapleLoanImplementation v1.0.1 implementation
MapleRefinancer for v1.0.1 deployments
Phase 2 - Configuration of Protocol by Governor
This phase will be set up by the smart contracts team with JSONs and Gnosis Safe. This set of transactions will be simulated on Tenderly and validated. This will include three main actions:
Upgrade Globals
Allowlist all relevant contracts in Globals
Configure factories with newest contract versions
Upgrade all PoolManager and LoanManager contracts
Set canDeploy for all existing borrowers
Details are outlined below.
Upgrade Globals
Allowlist All Contracts
Configure Factories
Register PoolManager Version v2.0.0 and v1.0.0 -> v2.0.0 Upgrade
Register FixedTermLoan Version v5.0.1 and v4.0.0 -> v5.0.1 Upgrade
Register FixedTermLoanManager Version v3.0.1 and v2.0.0 -> v3.0.1 Upgrade
Register OpenTermLoan Version v1.0.1
Register OpenTermLoanManager Version v1.0.0
Upgrade all PoolManagers
Upgrade all (currently 8) outstanding PoolManager contracts.
Upgrade all Fixed Term LoanManagers
Upgrade all (currently 8) outstanding LoanManager contracts.
This procedure contains a significant amount of function calls, so it will need to determined if it can all be performed in one transaction or will require multiple.
Phase 3 - Security Admin Upgrades all Loans
This step will also be done with a JSON fed into a Gnosis Safe multisig, which will be simulated against Tenderly and validated by the smart contracts team before being performed on mainnet. The number of function calls will depend on the number of outstanding loans at deployment.
Key Deprecation in Globals
Once the smart contracts team has deemed it safe, all old keys used for allowlisting can be set to false.
Remove Contracts from Old Allowlist
Post-Upgrade
Adding Open Term Loan Managers
After the protocol has been deployed, the PoolDelegates can call:
to add a new OpenTermLoanManager to their Pools if they would like to fund new Open Term Loans.
Last updated