Contract upgrade

Upgrade Architecture Overview

The Elytro upgrade system follows a proxy pattern with several key security features:

  1. ERC-1967 Proxy Pattern: Uses the standard storage slot for implementation address

  2. Module-Based Upgrade Control: Only authorized modules can trigger upgrades

  3. Separation of Concerns: Clear distinction between upgrade authorization and execution

  4. Data Migration Support: Framework for handling state transitions between versions

The upgrade system consists of the following components:

  • ElytroUpgradeManager: Core implementation of upgrade logic

  • UpgradeModule: External module that authorizes upgrades

  • IUpgradable Interface: Contract interface defining upgrade methods

  • Proxy Contract: ERC-1967 compatible proxy that delegates calls to implementation

Upgrade flow

Last updated