cardax logocardax logo

Hydra; Cardano's Novel Scalability Solution

What is Cardano's Hydra?

  

Hydra is Cardano’s layer 2 scaling solution, and, like all things that come out of IOHK, it is research-based. Whilst Cardano has a lot of other scaling upgrades to the blockchain planned, Hydra is their coup de grace

Hydra tackles the decentralisation trilemma; i.e. how blockchains can maintain security and decentralisation, whilst increasing scalability. It also achieves something missing on other blockchains; keeping fees low.

  

Why does Cardano need Hydra?

  

After the launch of smart contracts in the Goguen era and the subsequent launches of the first dApps on the Cardano blockchain, it became apparent that transaction throughput was an issue. 

However, Charles Hoskinson and the Cardano team had already factored this in. The Basho era, that followed Goguen was all about scalability. 

Along with other upgrades such as increasing block size and pipelining (allowing the steps a block goes through when propagating to run concurrently rather than sequentially, thus speeding up transactions), Hydra will pave the way for a huge number of dApps to run quickly and efficiently on the Cardano blockchain.

In simple terms think of the blockchain prior to Hydra being an animal with only one head. Everything the animal does is controlled by its brain; it is limited, it cannot increase the number of things it can think about simultaneously.

 

Hydra, like the myth, is a monster with many heads, each independent and capable of doing different things.

  

What does Hydra Solve?

  

Prior to Hydra being launched, every detail of every transaction needed to be recorded on the blockchain, thus, a lot of data had to be stored, taking up a lot of space and taking more and more time (as more dApps launched).

Hydra makes it possible for the bulk of the transaction to happen “off-chain” (i.e. not on the layer 1 (base) blockchain). Only the final details of the transaction need to be recorded on the blockchain, this results in reducing storage requirements and thus allowing more transactions to take place in any given time frame.

  

What use cases does Hydra have?

  

 

Hydra doesn’t only allow faster transaction times, it also opens the door for several other use cases that the pre-Hydra blockchain couldn’t support.

  

 

Here are some of the use-cases that Hydra will support:

  

  • Micropayments: Hydra will make micropayments possible, allowing transactions that include values of less than 1ADA. ADA tokens can be split into Lovelaces; (named after Ada Lovelace) analogous to Dollars and Pennies.

  • DeFi and RealFi: The huge amount of transactions needed for both DeFi and RealFi to be viable on Cardano can be achieved securely.

  • Gaming applications: In-game purchases, rewards, and NFTs.

  • Online Auctions: Rapid, high volume bidding can only be achieved with Hydra.

  

How does Hydra work?

  

As mentioned earlier, Hydra takes the load of the layer 1 blockchain by only recording the initial and final details of a transaction (or set of transactions) on layer 1. The “heavy lifting” is all done off-chain on hydra heads (the mythical beast with multiple heads...now you see why it’s called Hydra!).

Each hydra-head has the capability to perform 1000 transactions per second, this gives Cardano the capacity to handle millions of transactions per second, far greater than any other blockchain. In fact, these numbers put Cardano on the same level as some global payment systems!

  

Isomorphic Scaling

  

Hydra utilises isomorphic state channels (iso=same, morphic=state/shape). Each isomorphic state channel (or hydra head) uses the same smart-contract system as layer 1, meaning both layers 1 and 2 speak the same language.

This results in both layers 1 and 2 being able to function independently of one another, whilst still being able to interact seamlessly.

  

Multi-Party State Channels (Hydra-Heads)

  

At the moment a user (or group of users) open a state channel (hydra head) all resulting transactions take place in the head with only the result of all the transactions being passed back to and recorded on layer 1. 

Think of an Auction, all the auction house need to know is, what’s for sale, how much did it sell for and who bought it. The unsuccessful bids are for all intents and purposes irrelevant.

  

Confused?

  

Let’s use an analogy to explain this. 

  

The Restaurant Analogy 

  

Imagine a group of friends going out for a meal. They all have a wonderful time and many laughs were had. At the end of the meal, the waiter (waiter = layer 1/the blockchain) places the cheque/bill on the table. Dave looks at it and announces the total (Dave has opened a hydra-head).

We are now on layer 2. The following “ who pays what” discussion ensues (I told you you’d be familiar with it!). Sally didn’t have wine, Mike had two desserts (greedy Mike) and it was Paul’s birthday. 

Finally, after a lot of confusion and several mild arguments, a consensus is reached and everyone gives their money to Dave. Dave then pays the waiter, thus closing the hydra-head.

The waiter leaves with the cash and the translation is recorded in the restaurant's accounts (back to layer 1/the blockchain).

All the waiter and the restaurant care about is how much is owed and how much is paid. Once the party have left, the only evidence that the meal took place is what the restaurant recorded; the (lengthy and confusing) “who pays what” conversation is, for all intents and purposes, deleted from existence

In this example, all of the hard work was done off-chain (on layer 2), leaving the waiter and the restaurant (layer 1) to keep working without slowing down. 

Hydra allows all the hard work to be done off-chain without slowing down the blockchain (layer 1).

  

I love a good analogy, don't you?

  

Final Thoughts.

  

Hydra is a novel solution to the scaling problem. It is provably secure and will allow a huge throughput of near-instant, incredibly cheap transactions to be performed on Cardano.

  

Cardano is already great but Hydra makes better, faster and cheaper.

News letter image

About Cardax

AcademyAbout UsFAQsBlogDocumentationPrivacy Statement

Social Media

Cardax DiscordCardax TwitterCardax YoutubeCardax TelegramCardax LinkedinCardax Reddit
Cardax logo