Expanding Web3 Boundaries: Muon’s Combo Contracts

Addressing Smart Contract Limitations with Innovative Solutions for Enhanced Scalability and Interoperability

Robert Wallace
Muon
5 min readApr 30, 2024

--

For nearly two years, the Muon team has been developing viable solutions to the challenges in the blockchain ecosystem. In a series of articles we are going to present why Muon tech — currently deployed on the Pion network — offers competitive advantages over other solutions.

In this article, we delve into a technical innovation designed to tackle the challenges of scalability and interoperability. (As this article explains one of Muon tech’s main achievements, it is longer than what you are used to.)

Smart Contracts & the Challenges of Blockchains

The advent of Bitcoin in 2009 marked the dawn of blockchain technology. But it was only with the birth of Ethereum and its programmable blockchain that the creation of decentralized applications was made possible through the execution of smart contracts.

A smart contract is a self-executing contract; that is, it automatically executes when specific predefined conditions are met. The rules and obligations of the agreement are encoded with blockchain-specific programming languages, and stored on the blockchain. The introduction of smart contracts led to a vibrant ecosystem of blockchain projects and applications.

In spite of all their benefits, smart contracts inherit blockchains’ intrinsic challenges that limit their use. These include:

  • Statefulness: When used about blockchains, the term “state” refers to the current status of the entire network at any given moment. To operate, all the nodes in a blockchain need to keep a record of the information about all transactions, and balances on the network since its start. This requires a considerable amount of storage capacity, which naturally raises expenses.
  • Scalability: Each blockchain can have a certain transaction throughput (the highest number of transactions per second). As more transactions are added to the blockchain, the network becomes slower; This means, to get transactions approved, users have to either wait longer or pay higher gas fees.
  • Interoperability: Blockchains need to obtain off-chain information (data from the real-world or other chains). They are, however, innately isolated and can’t interact with data/systems outside their native environment. The severity of this problem becomes more and more obvious as many hacks take place on bridges.

Several solutions have been proposed over the years to address these issues. Some solved them partly, but caused serious security breaches; others sacrificed decentralization for the sake of scalability: None could act as a comprehensive solution.

These unsolved (or at least not fully solved) challenges have largely restricted the expansion of decentralized applications. A “Combo Contract” is an innovative concept that helps resolve these challenges.

Current Architecture of Smart Contracts

Data fed into a smart contract is the result of complex computations on raw information. Due to their size and complexity, it is either not possible or not practical/cost-efficient for smart contracts to perform such computation. That is why many projects turn to centralized services.

When executing a transaction, the smart contract deals with three types of data:

  1. Data that needs to be stored on-chain: This kind is essential for consensus and must be available all the time. Its original verification is valid forever.
  2. Data that can be stored off-chain: Consensus does not depend on it and can be stored in an off-chain database like a data availability layer. Whenever accessed, its accuracy needs to be verified.
  3. Temporary data: This category refers to the data that is only needed when computations are being done.

With the current architecture of most chains, these three kinds require on-chain storage. Obviously, storing state, by itself, not only raises costs but is a major bottleneck in the path of scalability so a solution to statefulness will substantially address scalability and that is what Muon’s Combo Contracts do.

Combo Contracts & MuonApps

A combo contract is a remodeled form of smart contract that combines on-chain infrastructure with off-chain data and computation provided by a Decentralized Oracle Network (DON). It is made up of three components:

  • An on-chain smart contract that runs functions for updating state
  • An oracle app, called MuonApp, currently deployed on Pion network, Muon ecosystems Canary network. By employing Pion as the DON, all off-chain components of the dApp can be decentralized. In simple words, this innovation makes it possible to remove the complex computations of the dApp’s smart contract and encapsulate them in the MuonApp. In fact, the DON acts similarly to the combination of the CPU and RAM of a PC.
  • Off-chain databases for connecting apps to real world data and off-chain components

Best of Both Worlds

This architecture offers numerous advantages, in addition to the tamper-proof and immutable properties of blockchains, including the following:

  • As the MuonApp takes over the complex computations, the unnecessary load of such calculations are removed from the blockchain. This will greatly simplify the development of the on-chain component.
  • The data to be stored for a limited period of time are hosted and processed by the off-chain component. This will eliminate the cost of permanently storing this data as part of the state on the chain, which is way more resource efficient compared to conventional smart contracts.
  • Because each part of the dApp can run on a different platform, it becomes more modular and flexible.
  • Last but not least, Muon’s modular security architecture allows for secure interaction with external data sources and services, such as APIs.

Further Step Forward

Although Leveraging combo contracts and MuonApps addresses these long-standing challenges, there are limitations that can only be removed by integrating AI. As mentioned in an earlier article, Muon developers are developing a platform that will make it possible to integrate AI into web3. Stay tuned for more info on this platform.

In short, Muon’s approach to combo contracts and its AI platform can redefine and extend Web3 capabilities and elevate them to their full potential. It will bring about higher scalability and lower costs while maintaining security.

Pion is the Muon ecosystem’s Canary and first mainnet. It is a chain-independent and stateless DON (Decentralized Oracle Network) that enables dApps to make their off-chain components decentralized. By incorporating Pion (by Muon), the manner in which decentralized applications store, process, and access data will be fundamentally transformed.

Run a Pion node.

Twitter | Telegram | Discord | Website | Medium | GitBook | Developer’s Guide

--

--