Skip to main content

Architecture

SOCKET is a protocol, not a blockchain. It enables developers to build chain-abstracted applications using a combination of offchain agents and onchain contracts. This setup allows for flexible, efficient, and customizable chain-abstracted interactions.

Developers can leverage Application Gateway (AppGateway), which operate on an EVMx to handle logic related to onchain contract interactions. These contracts function as hubs for user interactions, managing pre-execution checks, auctions, or other logic before onchain execution.

simple architecture diagram

SOCKET Protocol Components​

SOCKET consists of several key components:

  • Watchers: Offchain operators running specialized VMs that monitor blockchain activity and act as hosts for AppGateways. They generate proofs, which can be verified onchain via application-defined Switchboards. Anyone can become a Watcher by running a node.

    β†˜ Read more about Watchers.

  • Transmitters: Offchain smart operators that collect Watcher-generated proofs and execute onchain actions on behalf of users. They coordinate with AppGateways to ensure seamless execution.

    β†˜ Read more about transmitters here.

  • Switchboards: Onchain smart contracts used to validate offchain execution. Developers can build verifiers that enforce conditions under which Watcher proofs are considered valid. This modular approach allows for flexibility in security, cost, and speed optimization.

    β†˜ Read more about switchboards here.

  • Onchain App Contracts: Traditional smart contracts deployed on the blockchain, interacting with the SOCKET ecosystem.

  • AppGateway Contracts: Deployed on EVMxs, these contracts handle interactions between users and onchain contracts. They can enforce logic such as safety checks, pre-execution steps, and composability of onchain contracts.

    β†˜ Learn more about how to build applications on SOCKET

architecture diagram

How It Works​

Using the diagram above as a visual aid, here’s how the protocol functions:

  1. The user signs an offchain message and sends it to a watcher, where their AppGateway is deployed.
  2. The AppGateway processes the request, and the Watcher generates a proof.
  3. The Transmitter collects the signed user message and watcher proof, then submits them onchain.
  4. The onchain SOCKET contract forwards the proofs to the application's selected switchboard.
  5. The Switchboard verifies the proof and returns a boolean response.
  6. Based on this response, the user's onchain contract execution is triggered via the onchain SOCKET contract.

Expanding Across Networks​

SOCKET is designed for easy chain-abstracted expansion. Extending to additional networks simply involves deploying smart contracts permissionlessly and configuring a watcher to monitor the new chain. This allows AppGateways to facilitate seamless chain-abstracted contract interactions.

multichain architecture diagram

SOCKET provides developers with full control over both offchain and onchain logic, enabling chain-abstraction while adapting to various application needs. The protocol supports numerous use cases, some of which are highlighted on this page.