paint-brush
Scaling Bitcoin On-Chain with Omnityby@omnity
4,910 reads
4,910 reads

Scaling Bitcoin On-Chain with Omnity

by Omnity NetworkApril 30th, 2024
Read on Terminal Reader
Read this story w/o Javascript

Too Long; Didn't Read

Omnity Launches the First 100% Onchain Bitcoin Asset Omnichain Hub
featured image - Scaling Bitcoin On-Chain with Omnity
Omnity Network HackerNoon profile picture



After five years of restless building in the cross-chain interoperability space, Octopus Network, the development team behind Omnity, has created a perfect, invisible omnichain hub that can connect any L1/L2/L3 and even ZK technology once it advances enough. Omnity's 100% end-to-end on-chain tech stack offers fast finality, fungible token persistence, and negligible user fees (even for Bitcoin.)


Omnity launches on April 28th with its first Bitcoin asset, Runes, on the__Internet Computer__. Omnity's ability to connect any chain without relying on centralized multi-sig or off-chain components adds unprecedented potential to Bitcoin’s scalability, enabling Bitcoin Layer2 solutions.

Bitcoin in the Spotlight

Bitcoin’s been in the spotlight this year — ETFs, Ordinals, Runes, and the Halving. The surge in NFT trading, fueled by the popularity of Ordinals and BRC-20 tokens, prompted Binance and other cryptocurrency exchanges to integrate Layer 2 solutions like the Lightning Network to sidestep network congestion. Binance eventually decided to cease support for Ordinals altogether because Bitcoin NFT transactions clogged the network, increasing fees and slowing processing times.


The Runes initiative sought to draw more developers and conventional users to Bitcoin—and it worked. The launch of Runes triggered intensive activity on the Bitcoin network, crippling the network and boasting some outrageous transaction fees. Bitcoin miners blew past record daily transaction fees of $24 million. Within the first 60 blocks following the halving, miners amassed 860.20 BTC, roughly $54 million in transaction fees alone. Many view this as benevolent in compensating for miners for suffering the halving fee cut from 6.25 BTCto 3.125 BTC. However, Bitcoin's useability is the broader issue.

Scaling Bitcoin

Over the years, the multilevered challenge of scaling Bitcoin without compromising its inherent characteristics has continued to drive the development of many innovative projects, all contributing to our collective, open-source, voluminous history of head-banging against the blockchain trilemma. Every solution balances trade-offs between decentralization, security, and scalability.

On Layers, SegWit, and Taproot

The concept of "separate layers" to expand Bitcoin functionality was mentioned as far back as 2012 in the Colored Coins whitepaper, years before the Lightning Network was launched. So, the issue has been kicking around the block for over a decade (pun intended). The Lightning Network wouldn’t work before SegWit. The security and functionality of its off-chain transactions depend on the immutability of on-chain transaction identifiers, leaving it open to attack while transaction malleability exists. SegWit was successfully activated in 2017, increasing available block space and addressing transaction malleability.


Taproot, implemented in 2021, brought several enhancements that improved privacy, efficiency, and flexibility in scripting. The core of Taproot is the introduction of Schnorr Signatures, which allow for key and signature aggregation. This means multiple parties can combine their keys to a single public key, allowing them to sign a single message. (Schnorr Signatures come into play later in this discussion.)

Taproot also introduced MAST (Merkelized Abstract Syntax Trees). Traditional Bitcoin scripts are bulky and fully expose the script upon transaction execution, compromising user privacy. MAST improves this by structuring the script as a binary Merkle tree, revealing only the essential parts needed for transactions, thereby boosting scalability and privacy.


While Taproot’s primary goal wasn’t directly focused on enabling specific Layer 2 solutions, its introduced features could facilitate and improve various Layer 2 protocols and applications by enabling more complex smart contracts on Layer 2 solutions.

Bitcoin Layer2s

Technically, Bitcoin's Layer 2 solutions still need to be fully developed. Conceptually, Layer 2 solutions emerged in the Ethereum ecosystem. However, Bitcoin's Ecosystem has only two methods for expanding from L1. One is through ZK/BitVM technology, which represents a significant breakthrough. However, ZK Proofs aren't practical on Bitcoin yet.


Another method involves leasing security, exemplified by Babylon, where some of Bitcoin's classic security is shared with other chains. (Strictly speaking, this second method isn't considered Bitcoin L2.) This is not to say that Bitcoin Layer 2 developers aren't hard at work. Building a Layer 2 that does not rely on off-chain components is incredibly difficult.


So, when talking about Bitcoin L2s today, we refer to any execution environment primarily dealing with Bitcoin assets. They can be independent chains leveraging security leasing or even Ethereum L2s. Currently, the most active chains often derive their security not from Bitcoin but from Ethereum. Suppose they're connected to the Bitcoin ecosystem. In that case, they're considered execution chains for Bitcoin, while their mainnet is also responsible for asset issuance and settlement, akin to the relationship between central and commercial banks.

What does Omnity bring to the Bitcoin community?

Omnity establishes a trustless and highly secure asset bridge between Bitcoin's mainnet and Layer 2 solutions with a 100% end-to-end on-chain protocol stack. Omnity runs on the Internet Computer Protocol (ICP) and integrates Bitcoin's network into a specialized subnet within ICP, where all nodes are connected with the Bitcoin network via P2P. In this respect, Omnity is a Bitcoin Layer 2 enabler. To explain how the Omnity development team accomplished this, we need to take a step back.

Who built Omnity?

The development team behind Omnity has been tirelessly attacking interoperability issues for years. In line with our philosophy of a more open, secure, and fair Internet, the team, called cdot back then, adopted and built on IBC (Inter-Blockchain Communication), receiving a grant in 2020 from ICF to implement IBC on Substrate. Cdot rebranded to Octopus as we released our first product, a multi-chain network featuring shared security to Substrate-based appchains on NEAR Protocol. With substantial support from DCG, Electric Capital, NEAR Foundation, and dozens of leading venture capitalists, the Octopus mainnet launched in October 2021 and became the first Shared Security network, preceding Cosmos's Shared Security by just under two years.

The Birth of a Perfect Invisible Hub

As Octopus, we proposed Substrate IBC (ICS10) of the Cosmos IBC specification and have been its maintainer since. In 2023, we implemented the first Restaking AVS on NEAR, enabling users to directly restake from Octopus to Shared Security. Next, we proposed NEAR IBC ICS12, connecting NEAR to Cosmos.


While pioneering a NEAR IBC light client, we chose the Internet Computer to test verification proxies. Then, we realized the Internet Computer was much more capable than we knew. We discovered that by leveraging ICP's unique capabilities, such as Chain Key cryptography and HTTPS Outcalls, we could fulfill IBC's unfinished ambition by presenting a perfect but invisible hub, leading to the interoperability endgame.


Specific primitives of ICP’s advanced technology allowed the Omnity team to solve some of IBC’s stickiest limitations. A full discussion of this discovery is beyond the scope of this article but can be found here. The diagram below shows a high-level view of our modifications to IBC/TAO by applying ICP tech.


TLDR: In the Omnity network, ICP smart contracts called Customs and Routes replace IBC’s peg zones and light clients, respectively, and the browser/wallet takes over the job of the relayer.



In Omnity, IBC’s peg zones are replaced with ICP Customs smart contracts, eliminating the need for an independent security and incentive model. Smart contract runtime on the hub chain enables heterogeneous blockchain extensibility. Now, various types of light clients, in the form of smart contracts, can run on the hub to facilitate communication with different blockchains. Customs acts like a customs checkpoint by handling user asset locking and routing assets to various chains — connecting L1/L2/L3, or appchains.


IBC light clients are replaced with ICP Route smart contracts in Omnity. Because Cosmos designed the Tendermint consensus (now CometBFT) with the IBC light client in mind, a ready-to-use on-chain light client existed for Cosmos SDK chains. This isn’t true for other blockchains. In addition, light client verification isn’t good enough for settlement chains, which are cornerstones of Omnity security — especially considering that some light clients, including Eth2, are not designed for high-stake use cases like bridges.


Finally, the Omnity User’s browser/wallet takes over for the relayer. ICP’s reverse gas model allows Omnity to get rid of off-chain relayers. Users don’t need to pay gas fees to interact with smart contracts on ICP. So, the User’s front end takes the first half of the Relayer’s work, relaying cross-chain messages from the source chain to ICP. Users don’t need to install a wallet and hold $ICP beforehand.

How Does Omnity Work with Bitcoin?

Canisters are ICP smart contracts containing a program's code and state. Canisters can carry out complex computations, such as verifying a block header with hundreds of signatures or storing a few hundred GB of data on a chain, all at a very affordable cost, which is simply impossible on any other blockchain.


ICP builds 100% on-chain end-to-end tech stacks, so its Bitcoin integration is similar to running a Bitcoin node on-chain. ICP is integrated with the Bitcoin network at the protocol level, maintaining BTC code for easy transitions and data consumption. Canisters can read and write to the Bitcoin network.


The diagram below shows the Bitcoin Adapter and Bitcoin Canister, which have been live on the ICP mainnet for almost a year while Omnity built the other components.



A dedicated Bitcoin subnet with each node runs a Bitcoin Adapter daemon and is independently connected with the Bitcoin p2p network. If a Canister wants to make a Bitcoin transaction, a request is sent to the Bitcoin subnet that hosts the Bitcoin Canister containing ICP's on-chain Bitcoin state.


Once the subnet nodes reach consensus on a new Bitcoin block, the block is fed to Bitcoin Canister, a UTXO indexer that continuously updates a whole UTXO set. The request is then sent to the Bitcoin network through the Bitcoin Adapter and is processed by the Bitcoin Network asynchronously.

Omnity BTI: The first fully on-chain Bitcoin Indexer

Omnity will deploy the Bitcoin Token Indexer (BTI) parallel to the Bitcoin Canister to support BRC20, Runes, and other Bitcoin assets. Omnity BTI will be the world's first fully on-chain Bitcoin token indexer, facilitating the fully trustless transfer of Bitcoin tokens to other blockchains and strengthening Bitcoin's position as a universal settlement layer.

What is ckBTC?

ICP’s Chain Fusion Technology enables ICP smart contracts to directly hold, receive, and send BTC and facilitate the creation of a ckBTC token that is backed 1:1 by BTC.  However, the great value of chain-key tokens, like ckBTC, is that they can be transferred within seconds for a fraction of that cost on the token’s native network. ICP’s ckBTC is like a Bitcoin twin in that it shares Bitcoin’s network state. It's an ICRC-2 token that is backed 1:1 by BTC held 100% on the mainnet, securely incorporating BTC into DeFi and Web3 services on the Internet Computer blockchain as if ICP and the Bitcoin network were one blockchain.


Omnity is a BTC Layer2 Enabler for All Chains

ICP’s on-chain Bitcoin integration is essential because it brings smart contract functionality to Bitcoin, opening up new possibilities for DeFi and Dapp development without congesting the Bitcoin network and driving up transaction fees.


Omnity will facilitate token transfers so tokens do not need to return to Bitcoin. They can be transferred to any chain connected to the ICP protocol fully on-chain with no witnesses or verifiers — the first fully on-chain token bridge.


Omnity only incorporates a settlement chain when full-node security can be achieved. For now, Bitcoin, Ethereum, and ICP itself meet this standard. However, almost all blockchains, including various types of L2, can be connected with Omnity as execution chains. Meanwhile, any token issued on a connected settlement chain will have unparalleled cross-chain interoperability through Omnity without liquidity provisions.


As discussed, Schnorr signatures allow for easy aggregation of multi-signatures and threshold signatures. ICP’s recent announcement of the integration of threshold-Schnorr signatures will enable Canisters to obtain their own Schnorr public keys and addresses, request ICP to compute Schnorr signatures for arbitrary messages, and support both BIP-340 and Ed25519. This extends Omnity’s scope of cross-chain assets trading to Ordinals and other asset types, along with future potential integrations with other chains that use Ed25519 variants, such as Solana, Polkadot, or Cardano.

Omnity is Anti-Fragile and Future-Proof

Omnity is a vast improvement over multi-signature or other external verification cross-chain bridges. It offers a trustless omnichain hub that enhances user experience and exhibits anti-fragileness against the vulnerabilities seen in centralized models.


Skeptics of our IBC design might question the need for verification proxies and suggest relying solely on external verification cross-chain bridges instead. However, because IBC is an open, layered protocol, it allows for the continuous evolution of the verification layer while maintaining IBC interoperability. So, Omnity can seamlessly integrate future advancements, such as replacing the proxy client with a ZK verifier once the technology matures, without disrupting any existing applications.


Omnity is poised to both keep pace with technological progress and lead it, ensuring that all connected blockchains can effectively function as Layer 2 solutions to Bitcoin. This vision for a secure, fully on-chain, cross-chain protocol underscores our dedication to adopting and advancing the best available technologies for Bitcoin scalability.


Suzanne Leigh is the Editor of Omnity Network. This article was written in collaboration with Louis Liu, CEO and Founder of Omnity Network.