CommerceBlock - review and runtime test


With the current crypto investors rapidly steering away from ICOs, BTC dominance back above 50% and market participants increasingly looking to select tomorrow’s winners among already listed projects, we would like to take a step back and look at some projects we find groundbreaking, having the potential of becoming major long-term winners which have largely been overlooked by crypto investors due to lack of the aggressive marketing surrounding some of the high profile projects in the crypto space.

First out in this series of reviews is CommerceBlock (CBT) which had its ICO in late 2017 and has been living a quiet life in the market since. Meanwhile, the CBT team has been one of the most active projects in terms of development with very frequent updates to their github, which is entirely open to the public. In June 2018 the project launched their testnet and is currently working on finalizing a production-ready platform for targeting major blue chip companies.

Major backers such as Global Advisors (managing some of Europe’s largest crypto funds and owners of Nasdaq OMX listed XBT Provider) and highly respected industry names such as Daniel Masters represented on the CommerceBlock board of directors further emphasizes the weight this project carries.

The founding team has been involved in Bitcoin as early as 2012 and has deep experience in the cryptocurrency space. With engineering backgrounds and complementary experience from investment and traditional banking as well as technology start-ups, the founders are well equipped to build out a blockchain-based infrastructure company.


Use case

Global assets are largely held and traded within the fiat banking system. The large majority of commerce still relies on traditionally architected financial products and services. These closed systems route and account for value in centrally managed databases. 

Limited by a lack of liquidity, transparency, and accountability between centrally managed financial institutions and their customers, capital markets do not operate as freely, fair and efficiently as they could.

CommerceBlock’s ambitious goal is to eliminate the inefficiencies of traditionally styled financial infrastructure, which limits global trade and economic growth. By moving assets and trade to a public blockchain, the need for trusted intermediaries is eliminated. CommerceBlock has engineered a platform for enabling global economic trade in a secure, private, and scalable manner on blockchains, with the specific focus on leveraging the battle proven iron-clad security of Bitcoin.

The CommerceBlock blockchain (Ocean) supports trustless exchange of asset-backed tokens between counterparties while preserving privacy, which is a necessity in order to attract major commercial users. 

By implementing federated sidechains with tokens issued, e.g. representing commodities such as precious metals or crude oil, trade between B2B counterparties can be facilitated with high efficiency, throughput, and security. The system also makes it possible to trade across sidechains through atomic swaps, e.g. trading gold tokens against oil tokens through cross-sidechain swaps. (The following sections will cover the CommerceBlock technology. Non-technical readers are invited to skip to the conclusion section at the end of this article.) 


Technology overview

Building applications that utilize public blockchains must be done with care. Blockchains inherently expose actors to performing poorly formatted transactions and other mistakes that have caused irreversible loss of funds. The CommerceBlock platform is designed to abstract away these difficulties, while still allowing customers to build complex applications.

The CommerceBlock protocol is designed to mimic real-world payment interactions between merchants and customers. Merchants and customers can embed their contract into an address so that the payment itself proves who is being paid and for what. The wider network does not know the details of the contract. This is done in a way that looks like a completely normal transaction from the outside since these parties do not want to associate their funds with a publicly visible smart contract that represents a specific business function.

The CommerceBlock APIs and SDKs will provide a wide array of functionality to users in the form of libraries and services. The libraries can interact directly with base layer public blockchains (e.g. BTC, LTC and ETH), as well as layered protocols such as the Lightning Network and sidechains.

To realize this, the eventual task is to migrate the token holders from the ERC-20 contract which currently tracks CBTs to a deterministically pegged federated sidechain. This sidechain will be known as CommerceBlock’s “root” chain, wherein users will be able to store both Bitcoin and CBT.

From here, CommerceBlock’s institutional clients will be able to build “leaf” chains that are pegged directly to CommerceBlock’s root chain (Ocean). Similar to a tree, with Bitcoin being the “host” or the ground on which the tree stands (and guarantees its security), the CBT sidechain being the roots/trunk of the tree and the branches/leaves being the “leaf” chains pegged to the root. 

These pegs will require the client to stake CBTs on the root chain in order to utilize CommerceBlock’s tooling and infrastructure. For example, if a precious metals refinery wants to deploy a sidechain with asset-backed tokens, they would purchase CBTs, lock them in a smart contract on the root chain and then use CommerceBlock software to deploy a leaf chain for the transactions with their customers.

The assets in this leaf chain would be atomically swappable for any other assets in other leaves of the CommerceBlock network. 



At the center of CommerceBlock’s technology is Mainstay, a protocol to enforce the immutability of federated sidechains.

Of all cryptocurrency projects that have been launched, Bitcoin remains by far the most secure, with the most accumulated work. The Bitcoin network has operated persistently for over 9 years, holding hundreds of billions of dollars in value and has resisted constant attack.

To provide federated sidechains with the same level of immutability as Bitcoin, it is necessary to have a method that involves cryptographically binding these sidechains to the Bitcoin mainchain in such a way that the sidechain cannot be compromised (forked) without also simultaneously breaking the integrity of the Bitcoin mainchain. This means that for a fixed set of federated block signers, users of a sidechain do not need to trust the federation to protect them from a double-spend attack: consensus on each federated sidechain is enforced by Bitcoin’s proof-of-work. 

It becomes impossible to roll back or re-write the state of the sidechain without also rolling back the mainchain (Btc in this case), which is effectively impossible due to the might of Bitcoin’s global proof-of-work. Sidechain nodes can validate these commitments and the resulting immutability using only lightweight SPV (Simple Payment Verification) proofs from full Bitcoin nodes.

The sidechain may generate blocks more frequently but can only attest once per Bitcoin block (average every 10 minutes).

The current MainStay implementation is a Golang daemon that connects to a funded Bitcoin Full Testnet Node and to an Ocean full testnet node. Immutability through the MainStay protocol is enforced by continuously attesting the latest Ocean block hash into the Bitcoin network and linking the input of each subsequent attestation to the output of the previous one without providing any own proof of work and placing minimal load on the Bitcoin chain.

 This implementation is currently running alongside the CommerceBlock Ocean testnet and it is now displayed in the block explorer whether a block has been attested and when was the latest attestation.


Code assessment and runtime test

True to our tradition we will here look into the source code as well as build and run the code available in the CommerceBlock github to assess the quality and maturity of the project.

As expected we find code covering all the central parts: the Ocean blockchain, the Mainstay protocol implementing the anchoring to the Btc chain, the Ocean Blockchain Explorer and demo application code (which we later find out is currently intended for internal test purposes).

Since the Ocean testnet is already live, we choose not to perform a deep functional analysis of the source code, but rather conclude that the source code quality is consistent of good standard while the documentation is average (which is typical for a fast-moving development project). 

The github history shows continuous growth over time with non-trivial code commits, which indicates that the project is very active and well maintained. 

Apart from a rather long journey solving various problems with library dependencies and code actualization the installation works as intended. We also receive help from the project while in the midst of the installation process with the provisioning of updated dockers and readme files, which we use as ‘manual’ (since the dockers are actually targeting AWS) to match dependencies and versions on our Ubuntu virtual machine installation target platform.


Ocean node service:

After the code build, we start the Ocean full node and let it run with a print to screen log to monitor its behavior and stability while we perform various background tasks updating the Ubuntu machine. Typically a project in alpha phase would often fail a stability test like this. Our Ocean node runs without any crashes during the test indicating a stable product.  

We then move on to building and running the Ocean Explorer server code, designed to be used by Ocean clients, and run it. Our VM is not large enough to hold the full chain history in the Mongo database and thus we receive some error messages from the getblockchaininfo procedure.

Instead, we look at the official testnet blockchain explorer ( and study the transaction behavior. After some searching in the block history, we find blocks attested by Mainstay to the Bitcoin chain. Normally this should happen every time Btc produces a block which is approximately every 10 min. The CommerceBlock team informs us that they have reduced the frequency since it would be too costly to use every Btc block for attestation, which is fair enough.

Ocean explorer browser showing attested block with Mainstay (from Ocean testnet).



Shortly after completing our installation CommerceBlock added a one-click-deployment for AWS option to their github. It comes with the option to switch data center to another region for business continuation.


Conclusion: CommerceBlock has so far presented a stable testnet, with code which we assess as beta stage, implementing a blockchain based system for tokenized asset trading primarily targeting major B2B merchants in the traditional asset trading space. 

The solution is unique in leveraging on Bitcoin proof-of-work security by connecting its Ocean sidechain transactions immutably with the Btc consensus, utilizing CommerceBlock’s own Mainstay protocol. 

This is something that practically eliminates risk of successful hostile attacks and is a necessity for major global merchants who will not willingly risk their brand reputation and financial security with an unproven emerging chain (and is also the reason behind that most ‘blockchain 4.0’ projects so far failed to attract major real-world companies as customers).   


What we especially like:

  • The inherited Btc proof of work integrity, as described above, which is a prerequisite to attract institutional customers.
  • The approved BIP175 (Bitcoin Improvement Proposal) facilitating cryptographically secure and private contract payments. CommerceBlock is one of very few projects who has achieved this, showing their level engineering competence level.
  • The fact that the project is already working with major customers (although under NDA and no names have been disclosed yet) is something we believe makes the project severely undervalued at this point and will boost token price significantly once announced.
  • Staking opportunities for token holders to further capture the network value by running ‘watcher nodes’ and providing useful work to the system. A viable source of passive income as we foresee that the chain will actually be used by major corporations on a large scale within the next 6-12 months.


Where we see room for improvement:

  • The technical descriptions and other information are somewhat fragmented and divided between multiple whitepapers and Medium posts. Although we appreciate that the project is evolving and is constantly updating, we would like to see this being a bit more consolidated by updating whitepapers with new versions. Readers often don’t make it past the original whitepaper which is outdated.
  • Clearer and more frequent market communication to the crypto community on what the project is doing and the customer group it is targeting. A dedicated CMO role would be desirable to support this and give the project more attention.

Stay Connected

cryptodiffer logo
rss subscription
© 2024 InCodeWeTrust