Superform v1
  • Introduction
  • Components
    • Protocol
    • Keepers
    • API
    • App
  • E2E Flows
    • Same-chain Deposit
    • Cross-chain Deposit
    • Same-chain Withdrawal
    • Cross-chain Withdrawal
  • Periphery Contracts
    • SuperformRouter
      • SuperformRouterPlus
      • SuperformRouterPlusAsync
    • PayMaster
    • PaymentHelper
    • EmergencyQueue
    • SuperformFactory
    • Forms
      • ERC4626Form
      • ERC5115Form
      • ERC7540Form
    • SuperPositions
      • ERC1155A
    • RewardsDistributor
  • Core Contracts
    • State Registries
      • CoreStateRegistry
      • AsyncStateRegistry
      • PayloadHelper
    • AMB Implementations
      • LayerzeroImplementation
      • LayerzeroV2Implementation
      • WormholeARImplementation
      • HyperlaneImplementation
      • AxelarImplementation
    • Broadcasting
      • BroadcastRegistry
      • WormholeSRImplementation
    • Bridge Validators
      • LiFiValidator
      • SocketValidator
      • SocketOneInchValidator
      • DebridgeValidator (and forwarder)
      • OneInchValidator
    • DstSwapper
    • Settings
      • SuperRBAC
      • SuperRegistry
  • SuperVaults
    • SuperVaults
  • Resources
    • Deployment Addresses
    • Subgraphs
      • Protocol Level Entities
      • Form Related Entities
      • Deposits and Withdrawals
      • SuperPosition Events
      • External Entities
    • Infrastructure Integrations
    • Security & Audits
    • Protocol License
    • Glossary
    • Protocol Multisig
    • Superform Labs Socials
Powered by GitBook
On this page
  • Introduction
  • Core Concepts
  • Messaging Infrastructure
  • Security
  • Functionality

Was this helpful?

  1. Core Contracts

State Registries

Last updated 6 months ago

Was this helpful?

Introduction

State Registries are contracts which facilitate the transfer of data in various ways from Chain A to Chain B in Superform. They must implement BaseStateRegistry and are used by core contracts to fulfill crosschain deposits and withdrawals.

Core Concepts

Messaging Infrastructure

Dispatching and receiving payloads is executed via multiple Arbitrary Message Bridges (AMBs) to establish secure communication channels between core contracts deployed on multiple chains. Superform utilizes a multi-bridge system where one bridge sends the full payload and at least one other bridge sends a keccak-encoded proof. Each individual arbitrary message bridge has its own adapter contract discussed in .

Security

This multi-bridge system provides much greater security over a single AMB system. This is because it would require two of Superform's supported AMBs to be simultaneously compromised in order for a malicious actor to successfully fabricate a valid message and proof. An additional safety check is performed by validating the message and proof against Superform off-chain infrastructure before executing the state registry data.

Functionality

There are three functions every State Registry must implement:

  1. Dispatch payloads

  2. Receive payloads

  3. Process payloads

These are discussed in the context of individual State Registry contracts in the following sections. Currently, the only State Registry contract which Superform supports is CoreStateRegistry, used for standard vault deposit and withdrawals.

Proofs must be sent though at least an amount of bridges matching the quorum. Quorums for the required number of AMB implementations which must be used by State Registries are set in QuorumManager, an abstract contract implemented in SuperRegistry, detailed more here .

AMB Implementations
setRequiredMessagingQuorum