Socket Protocol Whitepaper (V1) Overview

Note: This writing was written with my notes and thoughts after reading the Socket Protocol Whitepaper V1.0. I wanted it to be a good summary while providing in-depth information about the technical details, components and processes. For more, you can check out the Whitepaper: Socket Protocol Whitepaper

1) Introduction - Current Status

In recent years, the rapid growth of blockchain technology has led to the emergence of various chains and layers. Each chain stands out by offering unique advantages and features. However, this diversity has also resulted in the fragmentation of the ecosystem, causing users, liquidity, and transactions to disperse across different networks. Users trying to access an application increasingly find themselves interacting with more intermediaries, complicating and confusing the process.

To solve this problem, the industry has focused on developing bridges and cross-chain messaging systems. However, these solutions have only added more intermediaries to the equation, exacerbating the issues. Now, users must go through various intermediaries (such as bundlers and paymasters for accounts and both chains, relayers and liquidity providers for bridging, sequencers, validators at the protocol level, and more) just to reach an application.

Unfortunately, these intermediaries often do not align with the needs of the applications or the users. As a result, users face additional costs and complexities when accessing applications, making the process unnecessarily lengthy and difficult. The "rent-seeking" nature of these intermediaries further fragments the ecosystem, making it inefficient and challenging.

2) The Application-Centric Thesis

As a solution to this fragmented structure, the application-centric approach comes to the forefront. In this model, user transactions are carried out directly through applications, bypassing intermediaries. This aims to provide a simpler and more user-friendly experience.

Essentially, applications manage the complexities of on-chain operations in the background, allowing users to interact solely with the application. Users can easily complete their transactions without dealing with technical details. Through chain abstraction, applications manage which chain to execute on behind the scenes, leaving only the transaction itself for the user to complete.

This model not only improves the user experience but also brings new functionalities to applications, driving innovation in the blockchain ecosystem. Intermediaries, instead of being obstacles, become tools that support the functionality of the applications in this model. Thus, applications can offer a more efficient and seamless user experience while smoothly handling cross-chain transactions.

3) Application-Centric Design

The application-centric design offers a simple and user-friendly solution to the increasingly complex blockchain ecosystem. In this approach, applications act as gateways for users’s transactions, managing cross-chain on-chain operations without involving users in technical details. Users no longer need to know which chain is being used, as applications handle these operations behind the scenes without exposing them to the user.

Applications manage cross-chain transactions through aligned intermediaries while abstracting the complexities of chains and rollups. This ensures that all the complexity of the blockchain infrastructure remains in the background of the application, while users perform their transactions through a simple interface.

This model positions blockchain infrastructure as servers or execution engines, with applications acting as the “glue” that connects them. Therefore, applications can exist simultaneously across multiple networks, providing a seamless experience for users without being dependent on any specific chain. This flexibility allows developers to deploy applications globally without being tied to one chain, enabling a broader reach and optimizing the user experience.

As Vitalik Buterin mentioned in his “glue and co-processor” article, this pattern is common across industries and opens the door to application-centric innovation in blockchain.

4) About Socket Protocol

Socket Protocol simplifies transactions using a structure called the “chain-abstracted packet” (CAP). Just as blocks are fundamental units in blockchain technology, CAPs play a similar role for Socket Protocol. CAP is a data unit used to carry requests and responses from one network to another, executing application-approved transactions.

The general architecture of Socket Protocol is based on three core components:

  • Request: This is the off-chain signed authorization data from the user. It can come in various formats, such as userOps, intents, or permit2 witness, depending on what the application accepts.

  • Response: These are signed responses from off-chain actors that help execute user requests on-chain. Once the request and response are combined, they form an actionable unit on-chain. The gateway is responsible for selecting the correct response for the request.

  • Gateway: This is a lightweight off-chain business logic component that approves on-chain execution for application contracts. It allows developers to write custom logic, and its primary goal is to match requests with the correct responses to create packets and prepare them for smooth on-chain execution.

5) Socket Protocol Workflow

Socket Protocol serves as a framework for creating, executing, and finalizing CAPs. This process is divided into three phases:

5A) Packet Creation

Applications gather requests from users and responses from off-chain actors to create a CAP through the gateway. Off-chain actors compete to fulfill the requests, and appropriate responses are selected to form the CAP.

5B) Packet Execution

Once the packet is created and approved by the gateway, it is ready to be executed across networks. Off-chain actors deliver the CAP to the necessary networks and execute the transaction.

5C) Packet Settlement/Finalisation

After the packet execution is completed, the gateway is informed, and the transaction is successfully finalized. This phase ensures the entire process has been completed.

6) Socket Protocol Architecture

Socket Protocol provides a framework for securely, efficiently, and flexibly managing cross-chain transactions. The protocol aims to perform transactions faster and more securely across networks. This structure consists of 4 main components: Plugs, Gateway, Switchboard, and Socket, supported by off-chain agents called Watchers and Transmitters. Let's take a closer look at these components and agents:

Components:

  1. Plugs: These are smart contracts built on top of the Socket Protocol, referred to as "plug." These contracts connect to Socket and enable applications to initiate cross-chain transactions. Plugs facilitate cross-chain data flow and interact with other components of the protocol.

  2. Gateway: This serves as the entry and exit point for applications and is hosted by off-chain Watcher service operators. The gateway processes user requests and converts off-chain data into on-chain transactions. This component ensures that the necessary business logic is executed before initiating on-chain transactions for applications.

  3. Switchboard: Switchboards are smart contracts that verify and validate the accuracy and validity of on-chain transactions. Applications (Plugs) select Switchboards to ensure secure execution of transactions. Switchboards validate Chain-Abstracted Packets (CAPs) at each stage and ensure their security. Different Switchboards offer various options for security, cost, and speed, allowing applications to customize based on their needs.

  4. Socket: Socket is the central, immutable smart contract that connects all the components. It standardizes interactions between components and ensures transactions are executed smoothly and securely. Socket facilitates the data flow between Plugs and other components, ensuring transactions are seamlessly completed at every stage.

Off-Chain Agents

Socket Protocol requires off-chain agents to manage and facilitate cross-chain transactions. These agents are categorized into two groups: Watchers and Transmitters.

1) Watchers

Watchers are off-chain service providers that host application gateways. Their primary function is to monitor cross-chain transactions and ensure the correctness of user requests. Watchers gather user requests, select the appropriate Transmitters for the transaction, and confirm the correctness of the results before executing the transactions on-chain.

Key Functions of Watchers:

  • Comprehensive Monitoring: Watchers monitor multiple chains to ensure that user requests are processed appropriately. This helps facilitate cross-chain transactions based on application logic.

  • Gateway Hosting: Watchers host the gateway functions of applications, running the gateway logic before processing user requests.

  • Permissionless Participation: Anyone can offer a Watcher service and participate in the Socket Protocol by monitoring cross-chain transactions. Participation is determined by whether applications choose to deploy their gateways to these Watcher services.

2) Transmitters

Transmitters are off-chain smart actors responsible for executing user transactions on-chain. They respond to user requests and convert them into cross-chain data flows, executing the transactions. Transmitters process user requests, prepare responses, and deliver them on-chain in the form of a Chain-Abstracted Packet (CAP).

Key Functions of Transmitters:

  • Comprehensive Network Transmission: Transmitters enable cross-chain data flow from one network to another, performing necessary transactions for applications and users.

  • Competitive Structure: Multiple Transmitters can compete for the same user request, and the application gateway selects the most suitable one. This ensures faster and more efficient transaction execution.

  • CAP Creation: Transmitters process user requests and prepare them for on-chain execution. The correct Transmitter is selected based on the application’s logic, and CAP is created.

7) How Socket Protocol works?

The Socket Protocol manages cross-chain transactions using a data unit called the Chain-Abstracted Packet (CAP). This system takes a user request and securely and efficiently executes it across multiple networks. Here's a step-by-step explanation of how Socket Protocol operates:

  1. User Request Submission: The user sends a signed request to the application gateway to initiate a transaction. The gateway receives the request and directs it to the appropriate Transmitters for processing.

  2. Transmitters’ Responses: Transmitters receive the user request and transform it into multiple actions to be performed across different networks. Transmitters compete with each other to execute the transaction on-chain.

  3. CAP Creation via Gateway: The application gateway evaluates the Transmitters' responses and selects the most suitable Transmitter. A CAP is then created, which includes the user request, the Transmitter’s response, and the Watcher’s signature.

  4. Validation via Switchboard: Before transactions begin, the CAP is validated through the Switchboard chosen by the application. The Switchboard ensures that the transactions are secure at every stage.

  5. Execution of the Transaction: Once validated, the transaction is executed on-chain. The Transmitter facilitates the cross-chain transfer and fulfills the user’s request.

  6. Completion and Notification: After the transaction is successfully executed, the gateway is informed, and the transaction is completed.

7) Advantages of Socket Protocol’s Design

  • Incentivized Expansion: Today, applications must pay service providers to expand to new networks. However, with the marketplace structure of Socket Protocol, Transmitters compete to earn the right to execute transactions on new chains. Transmitters that can provide faster services to new networks gain a competitive advantage, accelerating cross-chain expansion. Although Socket Protocol can be deployed permissionlessly to new networks, the market dynamics encourage "incentivized expansion."

  • Reclaiming Value Lost to Intermediaries: In traditional blockchain architectures, intermediaries such as validators, sequencers, search bots, and relayers can cause value loss for applications. Socket Protocol eliminates the negative externalities caused by such intermediaries, offering better outcomes for applications and users. This enhances application performance and provides a more advantageous experience for users.

  • Gasless and Batched Transactions: By design, Socket Protocol encourages Transmitters to execute user transactions in a gasless and batched manner. This lowers on-chain interaction costs for users while ensuring transactions are successful. Transmitters batch transactions, reducing transaction costs and minimizing failures.

  • Security Pre-Checks: Applications operating across thousands of chains often want to maintain global invariants that shouldn't be broken, such as protecting the total supply of an ERC20 token. Socket Protocol offers a natural way for applications to write such checks, increasing the security of their transactions for end users.

  • Modular Settlement and Security: With Socket Protocol, applications and Plugs can select any Switchboard, and adding new Switchboards is permissionless. This allows applications to fully control how they validate transactions across networks and manage interactions between gateways and on-chain applications. Different Switchboards provide varying levels of cost, security, and speed, giving applications the flexibility to optimize their transactions based on their needs.

MOFA (Modular OrderFlow Auctions)

MOFA is a unique concept introduced by Socket Protocol. It allows developers to create a market for their order flow, where third parties compete to fulfill the order flow. This turns unaligned intermediaries into aligned partners, transforming them from obstacles into enablers of chain abstraction for the application.

  • Competitive Market Structure: MOFA allows developers to create a marketplace to manage their transaction flow. Third parties compete in this marketplace to fulfill user requests, optimizing parameters such as price and speed.

  • Adding Value to Users: With MOFA, developers can collaborate with third parties to ensure the best outcomes for their users. This collaboration optimizes critical metrics such as price and latency, improving the user experience.

  • Chain Abstraction: By managing transaction flow, MOFA supports chain abstraction between applications and users. This improves application efficiency while offering users a more seamless experience.

Conclusion

Socket Protocol provides a powerful solution to unify the fragmented blockchain ecosystem. By using Chain Abstraction, users can enjoy a simple and seamless experience without dealing with complex cross-chain processes. With its application-centric design, Socket Protocol aims to make blockchain technology more accessible and user-friendly. I have no doubt that Socket Protocol will be a prominent name in the future with these innovations.

Note: I previously shared a detailed thread about MagicSpend++. MagicSpend++ is a system that allows users to make instant transactions regardless of which chain their assets are on. It uses a unified balance called Chain Abstracted Balance (CAB), which lets users consolidate assets from different chains into a single balance. This way, you can use your assets quickly and effortlessly without needing to switch between chains. Don't forget to check out the thread for more details!

Subscribe to kocality🧙‍♂️
Receive the latest updates directly to your inbox.
Mint this entry as an NFT to add it to your collection.
Verification
This entry has been permanently stored onchain and signed by its creator.