Hydrachain Dapp

BlockChain Expert 01/November/2017

HydraChain is an open source blockchain platform, which is developed by the joint venture of Brainbot technologies and Ethereum project. HydraChain is an extension of the Ethereum Blockchain platform which provides support to create private/permission Blockchain networks. The supporting language for HydraChain is python.

As an extension of Ethereum, HydraChain is fully compatible with all the API level and contract level protocols in Ethereum. There are several well-defined tools in Ethereum for creating smart contracts and Dapps (Decentralized Apps). You can reuse all those tools in HydraChain also. So it will be easy for those who know Ethereum to move on to HydraChain.

Smart contracts and HydraChain

Solidity/Serpent based smart contracts can co-exist in the same chain with the Python-based smart contracts. Yes...! They are interoperable. Smart contracts created using HydraChain is independent of EVM (Ethereum virtual machine) as it is developed in Python programming language. The EVM provides a runtime environment for the contracts. EVM will execute all the untrusted codes and can provide security by restricting the accessing of each other's state. But Python based smart contracts will bypass the EVM so that the contract execution is fast. And we know, python is an easy to use language, less time consuming and easier to debug too. In fact, you don’t need to go for a new language like solidity for developmental purpose.


How are blocks added?

Basically, HydraChain is providing the permission network creation services. So the validation is a great concern here. There will be a registered accountable validators in the network who is responsible for the validation of the blocks and transactions. In a HydraChain network, all the blocks are not allowed to enter the network without validation. That means a block will be added to the network only when the validators sign that the block is required. So once a block is entered into a network it is persistent. There are no reverts.



The HydraChain keeps a limitation in creating the blocks. HydraChain will create a new block if and only if there is a pending transaction. Whenever the Blockchain is unable to hold a transaction then it will create new block and validator has to sign it as a required block. The block will be added to the network after validation.


As the validators are registered, a KYC is used for the participants, to make sure that the transaction takes place between registered participants only.


The HydraChain platform provides a customizable nature in different components of Blockchain like transaction cost, gas limits, genesis allocation and block time. All these components have an inevitable role in a blockchain.


Transaction cost

The transaction cost in a HydraChain is the cost required for executing the computational steps in a transaction. In the HydraChain, you have the provision to configure the cost as per your requirement. The transaction cost can be calculated using an equation ie;

Transaction cost = Gas unit * Gas price.


Gas Limits

The gas units are the basic units for an executed transaction in a Blockchain. A transaction can be divided into several ‘opcode’ and each opcode will have a specific number of gas units based on the type of the opcode.

A ‘zerostep’ opcode has ‘0’ gas units, ’quickstep’ opcode has 2 gas units and a ‘faststep’ opcode has 5 gas units and so on.

When a transaction is executing in a blockchain first it will extract the opcodes from the transaction, then the number of gas units will be identified from it, now the gas price will multiply with the total gas units, and that will be the transaction cost for that particular transaction.

In HydraChain you can customize the gas limit also. Where the gas limits are the maximum number of computational steps in a transaction.

For example: If a blockchain has a gas limit 50 then each transaction should have maximum 50 gas units.


Genesis Allocation in HydraChain

The genesis allocation is related to the hashing and mining capacity of a blockchain. The HydraChain has the power to customize its genesis allocation. Usually, a Blockchain provides two types of mining methods they are direct mining and indirect mining. In Ethereum you will be using the cryptocurrency ‘ether’ for financial transactions. While creating a HydraChain you have the provision to decide whether to perform direct mining or indirect mining.

Cryptocurrencies like ETH and ETC can be mined directly. And for other currencies like bitcoin, zeta coin etc. you can define an indirect mining with the help of sha256 hashing algorithm.  In indirect mining, first, you have to mine the Ethereum anyway, at payout time the ETH will exchange with other currencies of your choice at the latest exchange rate.  This customization feature in mining will provide a facility to do a financial transaction with all currencies.

Block time

One more customization is possible in HydraChain that is block time. Block time is the time delay between the mining/validation of two blocks. An average block time in an Ethereum Blockchain was 10 minutes that means it will take 10 minutes for the addition of a new block to a Blockchain. I have already mentioned that in a HydraChain the blocks will be created only if there is a pending transaction, and the block will be added to the block only after validation. So here while creating a Blockchain you can set the block time according to this.



While going to the implementation side, HydraChain can be downloaded and installed from GitHub. It also provides easy deployment of networks. For the network deployment, several docker file templates are already available in HydraChain. These templates can be used while we creating new networks.