Universality for Web3: Settling Transactions in Any Language or VM without Compilers

We explore how Bring Your Own Language (BYOL) is the key to Web3 interoperability.

Universality for Web3: Settling Transactions in Any Language or VM without Compilers

In this post, we explore how our USL (Universal Settlement Layer) makes cross-chain interactions universal and why Bring Your Own Language (BYOL) is the key to blockchain interoperability.

Interoperability remains challenging in Web3 infrastructure due to reliance on blockchain-specific compilers, transpilers, and interpreters. Hundreds of blockchains, each using different smart contract languages and virtual machines (VMs), create significant fragmentation. This fragmentation makes cross-platform asset transfers and contract executions difficult for developers to enable within their dApps. With Pi Squared, we’re building USL to bring universal interoperability to blockchains and eliminate the need for traditional and often error-prone language implementations. With USL, we’ll enable transaction settlement regardless of the language or VM used by a developer.

How We Achieve Universality

Traditionally, compilers are needed to translate code between languages or VMs to execute a transaction. USL removes the dependence on specialized compilers or interpreters by settling transactions using formal semantics. To understand how USL achieves compiler-free transaction settlement, check out our Formal Semantics blog post. 

Our vision for USL extends beyond just replacing compilers with formal semantics. It aims to capture a truly universal system without any language-specific tools. Instead, the formal semantics of programming languages will drive the process. This universality is further generalized through trust specifications, which determine how a transaction should be correctly executed. These specifications allow flexible execution methods, including traditional VMs, specialized compilers, or K-driven formal semantics, enabling USL to be universal.

Current methods of cross-chain interoperability, such as atomic swaps and cross-chain bridges, often rely on trusted intermediaries with huge trust bases and complex smart contracts tied to a specific language or VM. USL approaches this differently, removing trust bases and focusing on proving claims.

What is a Claim?

Claims represent transactions and their effects, forming the core mechanism for USL's universality. A claim consists of just four major components: an initial state, a transaction, a final state, and additional trust specifications. Here’s an example of a claim:

  • Initial State: Account A has 10 tokens, and Account B has 0 tokens.
  • Transaction: Account A transfers 1 token to Account B.
  • Final State: Account A has 9 tokens, and Account B has 1 token.
  • Trust Specification: The initial State is verified to be correct by a smart contract

In this example, the transaction is a transfer of tokens from one blockchain to another. The effect of the transaction is the state change that occurs from the transfer. This approach simplifies cross-chain interactions by focusing on the essential state changes rather than the specific details of a blockchain’s implementations.

Claims are structured to allow universal interpretation and include integrated trust specifications. They serve as a tool for simplifying complex transactions, enabling validation and settlement across blockchains. 

Trust specifications are an integral part of a claim and are essential to universality. They abstract transaction complexity, allowing validation and settlement across different environments. Trust specifications define rules and conditions for claim validation, outlining how a transaction will be interpreted, verified, and settled. 

After a claim is submitted, the claim validation process begins. USL uses the trust specification as instruction on how to verify the authenticity and correctness of the claim and how to settle it. This process can be completed by USL very quickly, for a very low cost, and with enough resources done massively in parallel. 

Because all the information needed to validate the claim is included within the claim, you don’t need to trust USL, as any external entity can confirm the correctness of the claim themselves. This function takes the input state and incoming transaction as inputs. The validation is reproducible and can be independently verified by any external entity that correctly implements USL’s state transition function.

It is worth noting that claims and trust specifications are the key components of USL and require a deep technical understanding to appreciate how USL is universal. This explanation has been brief. If you want to learn more about the outlined process check out our USL documentation.

USL Use Case: Cross-Chain Activities

To better illustrate the benefits of USL, consider cross-chain activities where users are transferring assets across blockchains. Users may see an opportunity to take advantage of better staking or borrowing rates on another chain. In this case, all staking and borrowing transactions are settled on USL, even as the two chains use different VMs and platforms for execution. Additionally, USL validates all the accumulated trust dependencies in this transaction sequence, ensuring the user is fully aware of all the trust assumptions.

USL acts as a trustless clearing house, ensuring secure validation and settlement of both transaction sides. Through its trust base validation, it eliminates the need for intermediaries or compilers. The goal for USL is to avoid trusting any counterparty or infrastructure and replace that trust with provable code.

Bring Your Own Language (BYOL)

USL will bring universality to Web3 in an innovative way that empowers developers to focus on logic and functionality instead of cross-chain compatibility. Developers can build in Web3 using the programming languages they already know and love. Blockchains that were previously isolated due to limited developer support can now interact seamlessly with others, and expand their pool of liquidity and users. 

With this new programming paradigm, developers won’t need to worry about language-specific constraints or learning new languages to work on different blockchains. This brings greater flexibility to Web3, allowing apps to be free from specific programming languages or VMs. The trustless nature of USL will also boost developer and user confidence and promote an environment where USL becomes foundational technology for future blockchain-based applications.  

Want to learn more about how universality will impact your dApps and services? Join our workshops at Hack Seasons and Multichain Day during the week of Devcon 7 in Bangkok, Thailand. 

Won’t make it to Devcon? Reach out to our team to learn more!