MORE
  • Introduction
  • MORE Vaults
    • Vaults Framework
      • Diamond Standard (EIP-2535)
      • Component Interactions
      • Upgrade & Governance Flow
    • Core Protocol Components
      • Factory
      • Core Facets
      • Registries
      • Internal Libraries
      • Accounting
    • Connectors
      • AMMs & DEXes
      • Staking
      • Lending
      • Leverage
      • Oracles
      • External Interfaces
      • Multicall
    • Security & Governance
      • Roles & Access Control
      • Upgrade Flow & Timelock
      • Configuration Guard Rails
      • Registries as Boundaries
      • Error & Event Catalogue
    • Developer Workflows
      • Deploying a New Vault
      • Extend with New Facets
      • Indexer Integration
    • Reference & Glossary
      • Event Index
      • Capabilities
      • Terms & Abbreviations
      • Contracts
  • MORE Markets
    • Markets Framework
      • Liquidity Protocol
      • Supply
      • Borrow
      • Repay
      • Withdraw
      • Liquidations
      • Flash Loans
      • Risks
    • Markets
      • Liquidity Pool
      • Reserve
      • Incentives
      • Oracles
    • Contracts
    • Build
  • Resources
    • Code, Licenses & Audits
    • Brand Assets
  • Privacy Policy
  • Terms of Use
Powered by GitBook
On this page
  1. MORE Vaults
  2. Core Protocol Components

Internal Libraries

Libraries hold the single source of truth for shared storage and reusable helpers, so every facet speaks the same language.

  • AccessControlLib: Packs role flags into a struct at ACCESS_CONTROL_STORAGE_POSITION and exposes modifiers (onlyOwner, onlyGuardian, etc.) that all facets import, guaranteeing consistent checks.

  • MoreVaultsLib: Central repository for vault-wide parameters: asset list, fee config, totalAssets cache, and the immutable wrappedNative address. By reading/writing through this lib, facets avoid storage-collision and keep gas costs down.

These two libs are call-only—they cannot hold ETH or ERC-20s—which keeps the attack surface limited to the facets and diamond itself.

PreviousRegistriesNextAccounting

Last updated 16 days ago