MetaStreet
  • Welcome to MetaStreet
    • 👋Introduction
    • 📦Object-Oriented Finance
    • Links
  • Liquidity Layer
    • 📤Overview
    • 🛠️How Pools Work [ELI5]
    • 💸Earn
      • Manage
    • 📥Borrow
      • Manual Loan Repayment
    • 🔨Auctions
  • Yield Capture Layer
    • 📈Overview
    • 🛠️How it Works [ELI5]
    • 🔺NodeFi (Yield Pass)
      • Aethir on Yield Pass
      • Xai on Yield Pass
    • 💾GPU Financing
    • 🔐Audits
    • 📊Dashboard
  • Technical Overview
    • 🏗️Protocol Design
      • Deposit Flow
      • Borrow Flow
      • Liquidity Ticks
      • Tokenization
      • Collateral Filters
      • Collateral Wrappers
      • Interest Rate Models
      • Liquidation
      • Deployment
      • Admin Fees
    • 📍Contract Addresses
    • 📍Token Bridges
    • 🔐Audits
    • ⛽Gas Report
    • 📑API
    • 🔧SDK
    • 📊Dashboard
  • Other
    • 🤝Terms of Service
Powered by GitBook
On this page
  1. Technical Overview
  2. Protocol Design

Deployment

PreviousLiquidationNextAdmin Fees

Last updated 1 year ago

Initial deployment of the MetaStreet v2 Pool contracts is proxied to allow for upgrades and bug fixes. However, deployment will ultimately migrate to immutable Pools, which are already supported by the codebase.

Proxied contracts are currently owned by the MetaStreet Labs multisig, but will ultimately be transferred to protocol governance.

Pool Factory

The contract is deployed as an ERC1967 proxy, with a permissioned upgradeToAndCall() API to facilitate upgrades, and permissioned addPoolImplementation() and removePoolImplementation() to add and remove supported Pool implementations.

Pool Deployment

Proxied pools are deployed as an ERC1967 BeaconProxy with the createProxied() function, which accepts a Pool implementation beacon and initialization parameters.

Immutable pools are deployed as an ERC1167 minimal clone proxy with the create() function, which accepts a Pool implementation contract and initialization parameters.

Pools can be created permissionlessly. The admin for all Pools is the , which currently is only used to set the admin fee rate and withdraw admin fees. See the section for more information on admin fees.

As the Pool contract stabilizes, deployment will ultimately switch from createProxied() to create() and use versioned Pool implementations for newly created Pools.

Collateral Liquidator Deployment

The contract is deployed as an ERC1967 BeaconProxy. This contract can also be deployed immutably.

Collateral Wrapper Deployment

The and contracts are deployed as ERC1967 TransparentUpgradeableProxy. These contracts can also be deployed immutably.

🏗️
PoolFactory
PoolFactory
PoolFactory
PoolFactory
Admin Fees
EnglishAuctionCollateralLiquidator
BundleCollateralWrapper
ERC1155CollateralWrapper