Example assets on the Bitcoin blockchain (via Colu)

Hyperchains — secure, cheap & scalable blockchain technology for everyone

On linking blockchains in blockchains

6 min readFeb 15, 2016

--

[UPDATE 2023: Hyperchains has been registered as a trademark in the EU.]

More and more organizations are currently porting their digital asset infrastructure to blockchain technology. Ideally a blockchain is cheap to maintain and still secure from being tampering with. No single entity or several entities together should be able to control it and to change its internal state.

In case a company has millions of assets or users it will not be feasible to create an entry (output) for each asset and user on the Bitcoin blockchain. Transaction fees are generally rising in terms of their price in USD. The scalability of the Bitcoin blockchain is currently a big issue and the need for customized (private) blockchains with arbitrary rules is rising.

Introduction to Blockchains

A blockchain is a cryptographical data structure. It uses hash-pointers to create a time-stamped append-only log of blocks which contain transactions. It is also the main innovation and underlying technology of Bitcoin, the worlds first P2P transaction network with a single global state (the longest chain).

Proof-of-Work

The main mechanism which guarantees immutability of the hash pointers and thus secures the blockchain is called Proof-of-Work and is by definition very resource intensive. To offer a financial incentive to the nodes which do the work (the “miners”) the so called block-reward exists inside the Bitcoin blocks. The block-reward also functions as a way to create and distribute the bitcoins initially. Another reward for the miners are the transaction-fees. Since the space in the blocks is currently limited to one MB, one needs to include market-priced transaction-fee, so that ones transaction gets included into the next block by the miners. Currently the transaction fee is about 0.0001 BTC or 0.04 USD.

Centralization of the mining power has become an increasing issue for Bitcoin. Currently most of the hashes get produced in China, just like almost everything else, mainly because of cheap hardware and electricity. In case two of the largest mining pools collude, they could easily revert blocks and transactions or even attack the network and create troubles.

Proof-of-Stake

To achieve an independence from miners and generally be less resource intensive a Proof-of-Stake “Staking” algorithm got proposed first on Bitcointalk and then implemented for the first time with Peercoin (PPC), here still in combination with PoW.

“Mining has an unnecessary step” (46:45) — Introducing PoS (‘virtual mining’)

The core difference of PoS- in comparison to PoW-blockchains is that the stake-holders of the currency randomly get chosen to attach blocks to the chain. This means, there is no actual mining but so called staking which requires no special hardware to crunch hashes. This also means that one needs to own some coins initially in order to create blocks and this way vote on which transactions and blocks are valid and which are not.

The first 100% PoS blockchain was NXT. There have been a lot of arguments whether PoS alone is secure enough to protect a blockchain. Although nobody has formally prooven that PoS is insecure, there are reasonable doubts that the current PoS implementation are secure and require centralized check-pointing. Adam Back, the inventor of HashCash (predecessor of Bitcoin), said in a recent interview that “Proof-of-Stake degrades into an inelegant Proof-of-Work” (minute 10).

“Proof-of-Stake degrades into an inelegant Proof-of-Work”

Minute 10: Adam’s opinion on PoS.

Nothing at Stake

Nothing-at-stake is a known problem of PoS-blockchains and essentially means that in case a fork of the blockchain happens, the ‘stakers’ could still be on both chains as it does not cost anything to stake on two PoS blockchain forks. In comparison it is very costly to mine on two PoW blockchain forks.

To solve the nothing-at-stake problem some people came up with security deposits. This means that the stakers need to lock-in their stake for a while and in case they get caught by somebody to stake on two blockchains, then they loose their deposit/stake. But how do they get caught? They might be staking on their fork of the blockchain and waiting for the right moment to release it.

Could we combine PoS-chains and PoW-chains in more beneficial way? Could we check-point PoS-chains inside PoW-chain transactions and basically link blockchains? What would be the benefits?

Hyperchains

A Hyperchain is a overlying blockchain which gets timestamped (linked) into another blockchain. In most of the cases the overlying blockchain will be secured by PoS and the underlying by PoW.

Proof-of-Blockhash — Hyperchain Cross-Timestamping I

Require stakers to put their new PoS-blockhash into a PoW-transaction and the current PoW-hash into the PoS-block.

We start with PoW-chain W with miner m and PoS-chain S with staker s.

PoS-blockhash in W at time t => S existed latest at t

When s finds and broadcasts a new block of S it also broadcasts a transaction on W which gets mined into a W-block by m. For creating the new S block as well as the new W transaction the same private key is used. Every other S node needs to verify that this happened in order that the new block of s becomes valid.

PoW-blockhash in S at time t => S existed earliest at t

The combination of security-deposits with the publishing of the PoS-block-hash on a PoW-chain solves the ‘nothing-at-stake’-problem.

=> similar security for PoS-chain like underlying PoW-chain

A hyperchain for the Bitcoin blockchain. (Graphic adapted from ChainDB)

Proof-of-Blockhash — Hyperchain Cross-Timestamping II

Require stakers to put their new PoS-blockhash into transactions of several PoW-chains

A staker could also be required to insert his new block-hash into multiple PoW-blockchain, e.g. Bitcoin’s, Litecoin’s and Ethereum’s and Dash’s. The validation rule for the nodes could be that each PoS-block-hash needs to be inserted in at least 3 of the 4 mentioned PoW-chains. This way, in case one of the PoW-chains gets attacked, the Hyperchain could still continue to work without interruption.

=> potentially higher security than each of the underlying PoW-chains

Technically this would require that every cryptocurrency-staking-node needs to run every other cryptocurrency’s full node with some funds of all currencies involved. The funds of the PoS cryptocurrency are needed to get a chance to create a new block and the funds of the underlying PoW-chains are needed to pay for the transaction fees to checkpoint the PoS-blockhash.

The total network gets stronger because more nodes run, which need to be online because they need to ‘stake’.

Conclusion

Combining Proof-of-Stake- and Proof-of-Work-blockchains could provide a way to create extremely resilient open-access or (semi-)private time-stamped transaction ledgers, with significantly higher security than using one of the Proofs alone. While it is cheap to maintain the Hyperchain, it still can’t be easily tampered with. The mining pools of 51% of the underlying PoW-blockchains need to collude to reverse transactions. Additionally the attacker would need to have a significant stake of the PoS-blockchain currency.

Note that this sort of check-pointing also works for permissioned (with several well-defined block-creating-entities) and/or other PoW-mined blockchains.

Appendix

Cost Calculation

Bitcoin with the current block-size of 1MB currently supports theoretically about 10 small transactions per second. In case of a Hyperchain with 10MB blocks and 1 minute block-time we already can achieve 100x the throughput of the Bitcoin network, meaning this Hyperchain would support 10000 transactions per second. To insert all the block-hashes of this Hyperchain into the Bitcoin blockchain we need to do about 60*24 Bitcoin transactions per day. Each transaction costs about 0.0001 BTC, which sum up to ~58 USD per day to maintain the Hyperchain. In comparison: to do 10000 transactions on the Bitcoin network costs 400 USD.

Scaling through Sharding

The address space is split across two or more chains and the stakers get required to insert the block-hash of the other known sibling chains. A transactions which involves multiple chains need to

Benefits over Sidechain Elements

Two-way-pegged merge-mined Sidechains as Blockstream proposed them, do not offer many benefits over PoS-Hyperchains since most companies and people are (unfortunately) not interested in bitcoins as a currency but the underlying tamper-proof asset-carrying technology, the blockchain. Furthermore, it will be difficult to convince enough miners to merge-mine your Sidechain, thus you will basically need to ask the miners for permission to achieve high-enough security. In comparison Hyperchains are a way to secure your blockchain without asking anybody for permission with potentially higher security than one of the underlying PoW-blockchains.

--

--

Yanislav Malahov
Yanislav Malahov

No responses yet