Fundamentals

Security and Decentralization​

mLayer is composed of two layers: the communication layer and the chain layer. The communication layer employs distributed logic clock, dedicated state channels, and schnorr proofs to validate messages exchanged across the network. The blockchain layer is responsible for finalizing settlements. It is built on the Cosmos SDK, which achieves high security and decentralization through the battle-tested Tendermint BFT. The blockchain layer secures the entire mLayer network, with validators participating in the proof-of-stake consensus mechanism. Bad actors on the message layer are also penalized on the blockchain layer.

Throughput and Scalability​

The blockchain trilemma (security, scalability, and decentralization) has complicated its use in high-throughput applications like real-time messaging and IoT networks. Similar to layer 2 solutions, mLayer's architecture relies on an off-chain state solutions that combines a distributed logic clock and concepts similar to state channels but albeit more secure to achieve infinite throughput by horizontally scaling across subnets and dedicated communication channels. The communication layer provides deterministic random proofs that can be verified on-chain. This is achieved using aggregate schnorr signatures provided by a deterministic set of random nodes that fall within a Fibonacci series.

Fees

There are two kinds of fees in the mLayer network: message fee and transaction fees. The message fee is the amount paid to send a message across the mLayer network, and, transaction fees are those paid when interacting with the blockchain layer, e.g. when transferring tokens. The cost of sending messages on the mLayer network will be determined by the network participants and DAO. mLayer’s architecture allows for sending "free" messages by shifting the burden to a third party.

Developer Ecosystem​

mLayer currently supports developers in the cosmos ecosystem. We are working hard to expand support to the EVM ecosystem as well through cosmos’ layer 0 capabilities. Developers can also develop smartbots using mLayer APIs with any language of their choice.

Sovereign Identity and Origination

Two types of identities exist on the mLayer network. Both are private-public keys signature pairs.

  • Accounts: Main identities on the network. They are akin to the public key cryptography utilized in blockchains. They are represented according to the Decentralized Identifier (DID) standard, which was developed by the W3C. The method name specifies the particular blockchain network in question while the method-specific identifier are public keys or wallet addresses. For instance, accounts created on the mLayer network are denoted as `did:ml:<publicKey>`, while those on Ethereum and other Ethereum-based chains are represented as `did:eth:<address>#<chainId>`.

  • Agents: These represent devices, applications, or individuals authorized to act on behalf of an account. Like the main identities, agents utilize cryptographic key pairs but rely on the mathematics of elliptic curves (ECC) to secure these keys. They are also represented according to the Decentralized Identifier (DID) standard. The efficiency of ECC is particularly appealing in environments where processing power, storage, and bandwidth are constrained, such as with mobile devices or smart cards. Importantly, ECC maintains the same level of security as other public key cryptosystems, despite its more efficient use of resources.

Name Service

Accounts are DIDs with the method-specific identifier being the public key or address of the key pair they represent. These are often long, not human friendly strings and might pose a challenge in human identity and interactions. The mLayer name service allow account holders create human friendly account names and organize them into organizations just like TLDs of domain emails.

Validators

Validators play a crucial role in maintaining and securing the network. Their responsibilities encompass message validation and distribution to appropriate destinations. The network's integrity is upheld using a proof-of-stake algorithm, designed to curtail and penalise malevolent actors through a mechanism called "slashing".

Messages sent by agents are scrutinised and validated before they are broadcasted across the network as “event graphs” until the message is received by the target recipient(s) subscribed to the specific channel.

Validator fees are set per 1000 messages irrespective of message size. This is possible because only message headers are distributed across the network while the actual message is stored on a message server or IPFS network. Fees are predetermined before the start of each billing cycle which spans 7 epochs with 1 epoch lasting about 24 hrs. Settlements are made at the end of the next billing period if undisputed. Disputes can be raised no later than 7 epochs after the billing cycle.

States and Events

A state is a record of the current state of the db. eg. balances, authorization setting, topic information. Events are records of the actions that modified the state in sequence. This means the current state of the system can be deduced by following the events "chronologically".

The Event Graph

On the mLayer networks, “events” are used to keep track of changes to the network state. An event must be linked to the previous event (except for root events) and the account authorization event that makes it possible for that event to modify the state (except for root authorization events). This is a Direct Acyclic Graph (DAG) known as an "event graph."

This graph's partial ordering establishes the temporal sequence of events that can be traversed to determine the state of the network at any given time. Each event within this structure is linked to none or more "parent" and “authorization” events, indicating any earlier events that are chronological precursors from the viewpoint of the validator node that generated the event. Each event graph begins with a unique root event that lacks a parent.

Smart Contracts, Smartlets

Leveraging the capabilities of the Cosmos network, mLayer natively supports CosmWasm (https://cosmwasm.com/) smart contracts. These contracts can be applied to achieve advanced trustless and permissionless automations like token-gated channels, DePINs, rewards systems, autonomous AI agents, etc. Smart Contracts and Smartlets run on the blockchain and communication layer respectively.

Relayers vs Smartlets

Relayers are external service middlewares created by third parties to intercept, transform, and/or reroute messages. For instance, a relay service might redirect messages to a Slack channel on behalf of a recipient. Relay services are provided for and authorized by the message receivers. In contrast, Smartlets are applications or agents used to provide access control, data validation, gating, and gamification to communication channels. They are controlled and authorized by the administrators of message channels (topics). Receivers have no control over Smartlets.

Last updated