# State Registries

## 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.&#x20;

## 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 [AMB Implementations](amb-implementations).

<figure><img src="https://3570203123-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDHjzFgzaimPvKEjVvkwe%2Fuploads%2FgTstFE8wte2ln1ldxScS%2FSuperform__SuperformStateRegistry--LIGHT%20(1).png?alt=media&#x26;token=2228ec64-a623-40d4-9209-c8edcf59e41b" alt=""><figcaption></figcaption></figure>

### 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.&#x20;

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 [#setrequiredmessagingquorum](../settings/superregistry#setrequiredmessagingquorum "mention").

### 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.
