Builder: Nicholas Gregory
C++ or Rust
Ocean Sidechain, Mainstay Wallet, Mercury Layer
CommerceBlock is a former employer.
Nicholas worked as a software engineer in the banking system, developing platforms for trading and derivatives. He began looking at alternatives to the traditional financial system after the financial crisis of 2008.
Nicholas was a UNIX/Linux programmer and, like many others at the time, he ignored the Slashdot original article featuring the Bitcoin Whitepaper because it seemed to focus primarily on Windows. He was introduced to Bitcoin by a friend later.
Bitcoin was the only alternative that he found interesting at the time. Its unique architecture as a computer network distributed over many computers caught his attention.
It was very different. All of it was about [a] What kind of […] network. When it comes to building financial system, I think people want a system which is available 24-7.
What do you say when someone is interfering with your relationship? [with] Can it be used in many different parts of the planet without having to centralize it?
It was a problem I had seen people solve in different ways, but never like this. […] Scalable solution. And by using […] Sincerity, it was absolutely bizarre for me to use cryptography to prove that work and solve the issue. “It was absolutely weird to me.”
He designed and built systems that were distributed in multiple countries. These systems are not Bitcoin. Instead, they have permissions and restrictions on who can update their databases.
“The fact that in Bitcoin you had everyone kind of doing this proof of work game, which is what it is. And whoever wins does the [database] write. That mess[ed] with my head. That was […] very unique.”
Start Building
Nicholas’s decision to work in the area was a natural one. As a New Yorker and a developer, he found Bitdevs NYC when he lived there. Back in the day, meetups were small, often with less than twelve people. They allowed for more intimate conversations.
He first began building a “hobbyist” Over The Counter Trading Software Stack for Some People (Back then, a significant amount of bitcoins were traded OTC in exchange for fiat money or cash). Nicholas then worked with Omar Shibli (whom he first met at Bitdevs) on Pay To Contract.
BIP 175 defines a system where the customer who purchases a service or good is involved in the generation of the addresses provided by the seller. It is achieved by first signing a contract that describes the service or item being purchased. Next, the merchant provides a public master key, which is used to generate the individual addresses.
The customer can then prove that they have received the goods or services for which the merchant has agreed. By publishing both the contract and the master public keys, any third-party can generate an address and confirm that funds have been sent to it.
Ocean Mainstay
Nicholas and Omar then founded CommerceBlock – a Bitcoin Infrastructure Company. Commerceblock adopted a business model similar to Blockstream. It built technological platforms that facilitated the use of Bitcoins and blockchains generally in commerce and financial services. Tom Trevethan joined the team shortly after.
“I met Tom via, yeah, a mutual friend, happy to say who it is. There’s a guy called, who, new people probably don’t know who he is, but OGs do, John Matonis. John Matonis was a good friend of mine, [I’d] known him for a while. He introduced me to Tom, who was, you know, kind of more on the cryptography side. And it kind of went from there.”
Ocean was their first big project. It was a fork from the Elements platform, developed by Blockstream and on which the Liquid Sidechain is based. CoinShares and Blockchain, in partnership with other companies, launched in 2019 an Ocean based Sidechain for the DGLD digital token.
“So we, you know, we were working on forks of Elements, doing bespoke sidechains. […] Tom had some ideas around cryptography. And I think one of our first ideas was about how to bolt on these forks of Elements onto […] the Bitcoin main chain. […] We thought the cleanest way to do that was […] using some sort of, I can’t remember, but it was something [based on] single-use sealed sets, which was an invention by Peter Todd. And I think we implemented that fairly well with Mainstay.”
Ocean uses a protocol called Mainstay, which was designed by Commerceblock. This is the main difference between Ocean and Liquid in terms of sidechain platforms. Mainstay uses a time-stamping protocol, which, unlike Opentimestamps does not add items randomly to the merkle trees it creates. Instead, its merkle trees are strictly ordered. It allows sidechains to time stamp their current blockheight in the Bitcoin blockchain each and every time mainchain miner find a block.
This is not useful for bitcoins that are anchored to the sidechain. However, it can be used for real-world assets (RWA) that have been regulated. The ambiguity over ownership is removed during legal disputes.
Nicholas’ response when asked about the eventual closure of the project was:
I don’t think we were ahead of the curve, but there was a small number of clients. It was, yes, not much of an adoption. Liquid didn’t do well. We were in London/Europe and, as a result, when we went to meet clients for POCs we had to compete against well-funded projects.
This shows that they were either receiving money from IBM, or other big consulting firms and promoting Hyperledger many years before. The days were gone when EOS or Tezos would have been our competitors. We were treated like companies that had to raise money in order to create prototypes and sidechains. This made things very difficult. “Back then there was very little adoption”.
Mercury Wallet & Mercury Layer
Nicholas and Tom began work on the a statechain implementationThe road to getting there was not easy.
“[T]here were a few things happening at the same time that led to it. So the two things were we were involved in a [proof of concept], a very small […]POC for like a potential client. But this rolled around Discreet Log Contracts. And one of the challenges of Discreet Log Contracts, they’re very capital inefficient. So we wanted a way to novate those contracts. And it just so happened that Ruben Sampson, you know, wrote this kind of white paper/Medium post about statechains. And […] those two ideas, that kind of solved potentially that issue around DLCs.”
They did not end up using a statechain for DLC management, instead they went in another direction.
There was also a coin swap going on. Remember, back then, people were worried about by. […] 2024/2025 […] Network fees can be high. You can do it. […] You might want to make multiple rounds of the coin exchange. If you want to do more than one round, then that’s fine. […] The state chains felt like the perfect thing. […] You can exchange UTXOs as many times as you like.
Mercury Wallet had been fully developed and was functional but sadly, it did not gain any users. Mercury Wallet failed to gain traction in the market at the time, when Wasabi Wallet & Samourai Wallet dominated.
They did not give up and instead went back to drawing board. A statechain was built using Schnorr, with blind signatures, which means the server coordinator could never see what he or she was signing. He explained the reasons for those changes: “That would give us a lot more flexibility to do other things in Bitcoin with L2s. You know, the moment you have a blinded solution, we thought, well, this could start having interoperability with Lightning.”
This time around, instead of creating a wallet that is visible to the user, they created a Software Development Kit.
“{…] I guess with Mercury Layer, it was very much building a kind of […] full-fledged Layer 2 that anyone could use. So we [built] it as an SDK. We did have a default wallet that people could run. But we were hoping that other people would integrate it.”
CommerceBlock: The End of Commerce
CommerceBlock shut its doors at the end of many years’ brilliant engineering work. Nicholas and his team created many systems and protocols which were extremely well-engineered. However, they always seemed to be ahead of their time. It’s not always a positive thing to build systems that are intended for users.
In the long run, if your project is way ahead of user demand, it is not sustainable.
“…being in the UK, which is not doing that well from a regulatory point of view, played into it. If I was living in Dubai, maybe that would have been a different conversation. You know, back when we made that decision…things weren’t great in the US. I think things have improved there. But also, I think…Bitcoin is in a good place financially. I think it’s clearly being used as a product. But I think the L2s in the space just don’t have much user adoption.”
In response to a question about why people don’t use Layer 2s, he said this: “…in my adventures of working on CivKit (a decentralized marketplace), one of the questions that was always posed to me is, when Tether, when stablecoins? So when you’re working on a project that’s trying to promote Bitcoin in the global south, but everyone you meet in the global south wants stablecoins, you start to wonder, well, am I building the right tool? Do people even want to use this?”
The most valuable and logical engineering work must be used and adopted. Otherwise, what value is there?
“…there has been a shift in the last four years for it to be a store of wealth. And I do think that’s a risk because I think if people were using Bitcoin right now and the mempool was expensive, was jammed up and fees were high, there’s enough bright people to build good L2s. But they’re not being built because there’s no demand. And, you know, no one wants to build software, whether that’s open source or commercially, when it’s just a bunch of hobbyists using it. And I think that’s one of the challenges of Bitcoin right now. We have a lack of users and maybe down the line that’s a problem.”
“I think there’s a lot of smart people in Bitcoin that can build interesting stuff, but I think the focus now has to be users.”
“This article is not financial advice.”
“Always do your own research before making any type of investment.”
“ItsDailyCrypto is not responsible for any activities you perform outside ItsDailyCrypto.”
Source: bitcoinmagazine.com

