The article from Layer 0 to Layer 2 outlines the mathematical interpretation of the state channel

With the continuous development of the blockchain industry, Layer 2 has been gradually launched for the market public. At the same time, the expansion solutions of Layer 0 and Layer 1 are also being continuously optimized. From Layer 0 to Layer 2, the most essential difference lies in the realization of the state channel. Next, in this article, we will use mathematical theory to outline the difference between the realization of the state channel from Layer 0 to ayer 2.

We will use isomorphic (isomorphic) that is the Hydra Layer 2 state channel of Cardano , and hylomorphic (alien) that is the Layer 0 state channel of Constellation as examples to explain the difference between the implementation of the Layer 0 to ayer 2 state channel and explore its The profound impact on interoperability and scalability.

What is isomorphic?

Basically, isomorphic allows one data type to be mathematically mapped to another different data type in order to retain basic information, and can be expressed and referenced in different systems for other mathematical operations and representations. This is what Cardano is doing to ensure the validity and integrity of the atomic exchange between its Layer 1 ledger and its Layer 2 isomorphic state channel.

Cardano regards their Layer 1 as the settlement layer , and Layer 2 as the computing layer for expanding transactions and smart contracts. By using isomorphic state channels, Cardano essentially expands the Layer 1 network in an organic way, avoiding the need to create bridges in an independent Layer 2 network, which requires packaging of native assets and Plutus smart contracts, which is a big trouble. Most Ethereum Layer 2 problems.

What is Hylomorphism?

What Constellation does is to create a data type system that can use high-dimensional category theory and homotopy theory to mathematically abstract data types as generalized algebraic geometric topology. This level of mathematical abstraction allows the “Layer 0” meta-network to mathematically model the data types and structures contained in data streams generated from external networks and systems (such as Layer 1 and Layer 2 networks or private enterprise and government systems).

This means that you can map morphisms to morphisms with mathematical origins, which allows a hierarchy of complex data types to be formed and represented as geometric spaces in a directed acyclic graph. Since data is stored in this way, it is essentially granted the attributes of a physical object, which can be used to observe the information state in it, thereby forming a consensus in a unique way:


The above figure can be regarded as transposing two-dimensional information into three-dimensional space, similar to the computational geometry mathematics used by 3D code engines (Unity, Unreal, etc.) to generate textures and surfaces in video games. In this case, the data is immutable, can contain almost any data type that the state channel wants to verify, and does not require a graphics card or the like, because you are not actually rendering the graphics. This example shows that the basic theory of mathematical space can contain a variety of concepts, including matrices, vector spaces, and manifolds.

Manifolds allow complex structures to be described with the easy-to-understand topological properties of simple spaces, making them easier to interact. This technique is used to model the physical surface of an object in geometry, and it can also be used to model data as a mathematical surface. Tessellation is another technique mentioned by Wyatt for reasoning about surfaces, which allows the surface to be split into smaller subsets that fit together to generate computer graphics.

In general, it is studied as a “point set topology” or “general topology” with various branches, including differentiation, geometry, and algebra. Constellation Network can even use it to observe how all these geometric spaces are related to each other in time (represented as the fourth dimension)… because space and time (that is, time and space in the theory of relativity) are mathematically bound to each other , It can perform asynchronous verification of concurrent events:


This is done using a series of Catamorphisms (folds) that decompose a larger structure into a reduced value (“cata” stands for “down”), and Anamorphisms (expand), which start from a set of more Small values ​​(“ana”) build a structure as (“up”). And this also successfully created a Hylomorphism, which is a transformation after an inverse shape in the sequence of technical operations.

Please refer to the figure below and the corresponding folding and unfolding operations, which produces the so-called “Hylochain”:


“Hylochain” is basically an information tree, which can mathematically compress and decompress different information without losing any data, and it does not classify the information into a simple low-level type system.

Wyatt Meldman-Floch’s white paper details Constellation’s unique computational geometry framework, which creates this mathematical topology to formally define the primitives of the distributed ledger, and uses probabilistic algebraic abstractions to create a metalanguage with static types. The meta-agreement to define the boundaries between agreements.

Combined with the use of the Java/Scala programming language, it is very easy to represent and formally verify information from external off-chain data sources (such as another blockchain network or certain IT database systems) without changing the underlying data structure . Due to the microservice architecture and asynchronous consensus within each state channel, Constellation has unlimited scalability while converging to the global asynchronous Hypergraph state.

Because Constellation has the ability to handle complex data structures, it can map Cardano data types to direct acyclic graphs in Hypergraph to represent them. However, Cardano only developed their state channels to process the data types that constitute its extended UTXO transactions. . It cannot be configured like Constellation’s state channel logic, nor does it have the flexibility to define a custom consensus standard. Their Hydra protocol is an isomorphic state channel. Technically speaking, it is a directed acyclic graph that can process and verify transactions asynchronously and concurrently, but it cannot abstract data types beyond that range.


In other words, the Hydra protocol is very impressive. In theory, each Hydra head can be expanded to one million transactions. So far, all state channel solutions are limited by the date types supported by their scripting language and smart contract logic, such as Raiden Network ( Ethereum ) and Lightning Network ( Bitcoin ).

Layer 0 is inclusive, not exclusive

By overviewing the differences between the Layer 0 to Layer 2 state channels, we learned how they interoperate together to take advantage of each other. By letting Cardano integrate the Layer 2 Hydra state channel into the Layer 0 Constellation state channel, it extends its ecosystem to a multi-chain network that shares the same mathematical integrity values ​​provided by functional programming and formal verification. This will enable Cardano to access a truly decentralized and interoperable liquidity order book, and allow its Dapp and integration with SingularityNet’s AI agent to gain greater access through Constellation’s meta-network Hypergraph Transfer Protocol (HGTP) Customer network.

Of course, this integration can be extended to any Layer 1 or Layer 2 network, not just the Cardano state channel.

As an industry, realizing the value of a social vision has always been a goal. In this vision, we can inject the qualities of immutability, transparency, security and personal sovereignty into the trading system that reshapes the modern world. If we want to upgrade to Social 3.0, which we are all eagerly awaiting, we need to jointly develop a strategy to execute its technical implementation.

Posted by:CoinYuppie,Reprinted with attribution to:
Coinyuppie is an open information publishing platform, all information provided is not related to the views and positions of coinyuppie, and does not constitute any investment and financial advice. Users are expected to carefully screen and prevent risks.

Leave a Reply