Maple
  • Welcome to Maple
  • Maple for Lenders
    • Introduction
    • Lending
    • Defaults and Impairments
    • Margin Calls and Liquidations
    • Risk
    • Withdrawal Process
  • syrupUSDC for Lenders
    • Powered by Maple
    • Lending in syrupUSDC and syrupUSDT
    • Commitments
    • Drips Rewards
    • Withdrawals
    • Monthly Updates
    • Pendle Integration
  • SyrupUSDC Rewards Prize Draw Program Summary
  • FAQ
  • Maple for Borrowers
    • Introduction
    • Loan Management
  • Maple for Token Holders
    • Introduction to SYRUP
      • MPL to SYRUP Conversion
      • FAQs
    • SYRUP Tokenomics
      • Staking
      • Staking Smart Contract Details
    • Governance and Voting
    • Drips Rewards
    • Research and Media
      • Podcasts
      • News Articles
      • TV Segments
      • Research Reports
      • Data Dashboards
    • Additional Resources
  • Technical Resources
    • Protocol Overview
      • Background
      • Protocol Actors
      • Smart Contract Architecture
      • Glossary
      • Smart Contract Addresses
      • Fees
      • Composability
      • Proxies and Upgradeability
    • Security
      • Security
      • List of Assumptions
      • External Entry Points
      • Emergency Protocol Pause
      • Protocol Invariants
      • Test Report
    • Loans
      • Loans
      • Fixed Term Loans
      • Open Term Loans
      • Refinancing
      • Impairments
      • Defaults
    • Pools
      • Pools
      • Pool Creation
      • PoolManager
      • PoolDelegateCover
      • Accounting
        • Pool Accounting
        • Pool Exchange Rates
    • Strategies
      • Fixed Term Loan Manager
        • Overview
        • Claims
        • Advance Payment Accounting
        • Accounting Examples
      • Open Term Loan Manager
      • DeFi Strategies
    • Withdrawal Managers
      • WithdrawalManager (Cyclical)
      • WithdrawalManager (Queue)
    • Singletons
      • Globals
      • MapleTreasury
      • Oracles
      • Pool Permission Manager
    • Admin Functions
      • Governor Admin Actions
        • Operational Admin Actions
      • Pool Delegate Admin Actions
      • Timelocks
    • Operations
      • Protocol Deployment
      • Open Term Loan Deployment
      • December 2023 Deployment & Upgrade Procedure
      • Strategies Release Deployment Procedure
    • Interfaces
      • FixedTermLoan
      • FixedTermLoanFactory
      • FixedTermLoanFeeManager
      • FixedTermLoanInitializer
      • FixedTermLoanManager
      • FixedTermLoanManagerFactory
      • FixedTermLoanManagerInitializer
      • FixedTermLoanRefinancer
      • Globals
      • Liquidator
      • LiquidatorFactory
      • LiquidatorInitializer
      • OpenTermLoan
      • OpenTermLoanFactory
      • OpenTermLoanInitializer
      • OpenTermLoanManager
      • OpenTermLoanManagerFactory
      • OpenTermLoanManagerInitializer
      • OpenTermLoanRefinancer
      • Pool
      • PoolDelegateCover
      • PoolDeployer
      • PoolManager
      • PoolManagerFactory
      • PoolManagerInitializer
      • PoolPermissionManager
      • WithdrawalManager (Cyclical)
      • WithdrawalManagerFactory (Cyclical)
      • WithdrawalManagerInitializer (Cyclical)
      • WithdrawalManager (Queue)
      • WithdrawalManagerFactory (Queue)
      • WithdrawalManagerInitializer (Queue)
    • SYRUP Token
      • Architectural Overview
      • Base ERC20 Structure
      • Upgradability
      • Modules
      • Time Locks
      • Recapitalization Module
      • Emergency Module
      • Deployment and Migration Procedure
    • GraphQL API
    • SDK
      • Introduction
      • Installation
      • Protocol Actors
      • Usage Guide
  • Troubleshooting & Support
    • Intercom
  • Maple 1.0
    • Access to deprecated Maple 1.0
  • Legal
    • Borrower MLA
    • KYC
    • Interface Terms of Use
    • Privacy Policy
    • syrupUSDC and syrupUSDT - Risks
    • syrupUSDC and syrupUSDT - Defaults and Impairments
    • syrupUSDC and syrupUSDT - Available Jurisdictions
    • Interface Terms of Use [syrupUSDC and syrupUSDT]
    • Interface Terms of Use [Syrup.fi/convert/ and Syrup.fi/stake/]
    • syrupUSDC and syrupUSDT- Privacy Policy
    • SyrupUSDC Rewards Prize Draw Terms & Conditions
Powered by GitBook
On this page
  • 1. Deploy All New Contracts
  • 2. Upgrade Globals
  • 3. Enable Globals Keys
  • 4. Add Delay to Oracles
  • 5. Setup Factories
  • 6. Setup PoolPermissionManager
  • 7. Upgrade Pool Contracts
  • 8. Upgrade Fixed Term Loans
  • 9. Upgrade to Queue Withdrawal Manager
  • 10. Deprecate Fixed Term Loan Factory
  • 11. Deprecate Pool Deployer V2
  1. Technical Resources
  2. Operations

December 2023 Deployment & Upgrade Procedure

1. Deploy All New Contracts

The first step is deploying various new contract implementations and initializing some of them. Here's a breakdown of the contracts being deployed:

contract

description

FixedTermLoanFactoryV2

The new version of the fixed term loan factory

FixedTermLoanImplementationV502

The new version of the fixed term loan implementation. Identical to V501, but needed for factory migration

FixedTermLoanV502Migrator

The migrator contract for setting the new factory on deployed versions of the fixed term loan

GlobalsImplementationV3

The new version of the globals contract

PoolDeployerV3

The new version of the pool deployer contract

PoolManagerImplementationV300

The new version of the pool manager contract

PoolManagerImplementationV301

The new version of the pool manager contract. Identical to V300 but needed for allowing a migration

PoolManagerInitializer

The initializer for the pool manager contract

PoolManagerMigrator

The migrator contract for setting the new pool permission manager implementation on deployed versions of the pool manager

PoolManagerWMMigrator

The migrator contract for setting the new queue withdrawal manager implementation on deployed versions of the pool manager

NonTransparentProxy (PoolPermissionManager)

The new pool permission manager contract. This will be a non transparent proxy.

PoolPermissionManagerImplementation

The new pool permission manager contract implementation.

PoolPermissionManagerInitializer

The new pool permission manager Initializer contract.

WithdrawalManagerCyclical

The new implementation of the withdrawal manager cyclical contract

WithdrawalManagerCyclicalInitializer

The initializer for the withdrawal manager cyclical contract

WithdrawalManagerQueueFactory

The factory for creating instances of the withdrawal manager queue contract

WithdrawalManagerQueue

The new implementation of the withdrawal manager queue contract

WithdrawalManagerQueueInitializer

The initializer for the withdrawal manager queue contract

2. Upgrade Globals

The Globals contract is upgraded to the new implementation (V3) deployed in the previous step. This involves pointing the proxy contract to the new implementation address.

3. Enable Globals Keys

This function sets various permissions and configurations in the Globals contract. It registers new valid instances, enables deployment from specific factories, and sets permission for deploying contracts. Breakdown of values:

Function Name
Parameter 1
Parameter 2
Parameter 3

setValidInstanceOf

"LOAN_FACTORY"

fixedTermLoanFactoryV2

true

setValidInstanceOf

"FT_LOAN_FACTORY"

fixedTermLoanFactoryV2

true

setValidInstanceOf

"POOL_PERMISSION_MANAGER"

address(poolPermissionManager)

true

setValidInstanceOf

"WITHDRAWAL_MANAGER_CYCLE_FACTORY"

withdrawalManagerFactory

true

setValidInstanceOf

"WITHDRAWAL_MANAGER_QUEUE_FACTORY"

queueWMFactory

true

setValidInstanceOf

"WITHDRAWAL_MANAGER_FACTORY"

queueWMFactory

true

setValidInstanceOf

"QUEUE_POOL_MANAGER"

cashManagementUSDCPoolManager

true

setValidInstanceOf

"QUEUE_POOL_MANAGER"

cashManagementUSDTPoolManager

true

setCanDeployFrom

poolManagerFactory

poolDeployerV3

true

setCanDeployFrom

withdrawalManagerFactory

poolDeployerV3

true

setCanDeployFrom

queueWMFactory

poolDeployerV3

true

In this table, the Function Name column contains the name of the function being called, the Parameter 1, Parameter 2, and Parameter 3 columns contain the parameters being passed to the function.

4. Add Delay to Oracles

This function sets a delay on price oracles for specific assets (WETH, WBTC) in the Globals contract.

Asset
Oracle
Delay

weth

4 hours

wbtc

4 hours

5. Setup Factories

This function registers new implementations and default versions in various factories (PoolManager, FixedTermLoan, WithdrawalManager). It also enables upgrade paths for existing contracts to move to new implementations.

Factory
Function
Version
Arguments

Pool Manager Factory

registerImplementation

300

300, poolManagerImplementationV300, poolManagerInitializer

Pool Manager Factory

registerImplementation

301

301, poolManagerImplementationV301, poolManagerInitializer

Pool Manager Factory

setDefaultVersion

300

300

Pool Manager Factory

enableUpgradePath

200 -> 300

200, 300, poolManagerMigrator

Pool Manager Factory

enableUpgradePath

201 -> 300

201, 300, poolManagerMigrator

Pool Manager Factory

enableUpgradePath

300 -> 301

300, 301, poolManagerWMMigrator

Fixed Term Loan Factory

registerImplementation

502

502, fixedTermLoanImplementationV502, fixedTermLoanInitializerV500

Fixed Term Loan Factory

enableUpgradePath

501 -> 502

501, 502, fixedTermLoanV502Migrator

Fixed Term Loan Factory V2

registerImplementation

502

502, fixedTermLoanImplementationV502, fixedTermLoanInitializerV500

Fixed Term Loan Factory V2

setDefaultVersion

502

502

Withdrawal Manager Factory

registerImplementation

110

110, cyclicalWMImplementation, cyclicalWMInitializer

Withdrawal Manager Factory

setDefaultVersion

110

110

Queue Withdrawal Manager Factory

registerImplementation

100

100, queueWMImplementation, queueWMInitializer

Queue Withdrawal Manager Factory

setDefaultVersion

100

100

6. Setup PoolPermissionManager

The newly deployed poolPermissionManager is configured to match each pool configuration, including allowing all existing lenders.

7. Upgrade Pool Contracts

All the deployed poolManager's contracts will be upgraded to version 300. The upgrades are performed with security admin privileges, ensuring secure and authorized changes.

8. Upgrade Fixed Term Loans

All the deployed FixedTermLoan's contracts are upgraded to a new version using security admin privileges.

9. Upgrade to Queue Withdrawal Manager

The cash management pools will have their withdrawal manager migrated to the new WithdrawalManagerQueue.

10. Deprecate Fixed Term Loan Factory

This is done by setting the default version to 0 to stop new instances being deployed.

11. Deprecate Pool Deployer V2

By setting the flag to false for the factory instances, we prevent new pools from being deployed through Pool Deployer V2.

Function Name
Parameter 1
Parameter 2
Parameter 3

setCanDeployFrom

poolManagerFactory

poolDeployerV2

false

setCanDeployFrom

withdrawalManagerFactory

poolDeployerV2

false

PreviousOpen Term Loan DeploymentNextStrategies Release Deployment Procedure

Last updated 7 months ago

ethUsdOracle
btcUsdOracle