Categories
Crypto Guides

Beginners Guide To Atomic Swaps

Introduction

One of the features of cryptocurrencies is that they are decentralized. However, in reality, it is not completely decentralized. For the buying and selling of cryptocurrencies, the most popular option is to use a centralized exchange. Hence, adding an element of centralization in them.

Though this seems to be the best way to exchange cryptocurrencies, there are other better ways as well. This is because centralized exchanges sometimes possess big problems. There have cases where new exchanges have been hacked, which has caused losses for exchange and their clients. Moreover, the common issue with all exchanges is high withdrawal and trade fees. So, trading cryptos turns out to be expensive for clients with small capital.

Thus, the irony here is that cryptos that are known to be a peer-to-peer payment system requires users to go to a third party to exchange the coins. However, crypto analysts have taken this concern as a priority and have been able to come with something called “Atomic Swap.”

What is an Atomic Swap?

Atomic swaps are a solution to the above-discussed problem. Atomic Swap is a peer-to-peer exchange of cryptocurrency without the involvement of a middleman. If you are wondering what “atomic” means, it is a terminology used in computer science, meaning something would either completely happen or completely not.

Understanding Atomic Swaps

The main goal is to send someone cryptocurrency without the involvement of a third party. Let’s understand how the atomic swap makes this possible, with an example.

Assume Ron wants to send 1 Ether in exchange for 0.02 Bitcoins from Lisa. In atomic swap terms, we say that Ron has 1 ETH and wants to swap with Lisa for 0.02 BTC.

The key ingredient here is to create a smart contract called a hashlock. You may relate this to a container where the money is placed and is locked with a secret password.

How is the Hashlock made?

The hashlock, which is a smart contract that remains locked until the key is revealed, is made by Ron.

The hashlock is made using the following steps:

  1. A big random number is picked. It is called the primate. This is nothing but a secret password.
  2. This number is used to create another number called the A smart contract is created to send Lisa 1 ETH, locked with a hashlock created by him. This coin is accessible only when Lisa is able to figure out the preimage to the hash.

Note that calculating the hash from the preimage is easy, but determining the preimage from the hash is extremely challenging. In other words, Lisa cannot unlock the coins until she gets the preimage from Ron himself.

Role of Lisa

Now Lisa checks if she has received coins from Ron. This can be easily verified by checking on the public blockchain. After verification, Lisa creates a smart contract for 0.02 BTC with the same hash used by Ron.

Unlocking the coins

Now when Ron goes on to unlock the coins sent by Lisa, he uses the preimage he had created. But, in doing so, the preimage is recorded on the blockchain and becomes public information. Hence, Lisa can now use that preimage to unlock the coins sent by Ron.

Therefore, this completes the transaction without the involvement of a middleman.

This is a solution to the problem that exists in crypto exchanges. Since most users are still into exchanges, the idea of atomic swaps must be inculcated into exchanges and make them truly decentralized.

Categories
Crypto Daily Topic

Why is Bitcoin’s hashrate on the rise? 

Bitcoin’s hash rate has reached an all-time high of almost 120 exahash per second. The crypto reached this milestone two days shy of its birthday – on January 1st. (January 3rd is Bitcoin’s birthday, being the day the first block of Bitcoins was mined.) On new year’s eve, Jameson Lopp, CTO of CASA, the multisig wallet company, tweeted that “Bitcoin’s network hash rate increased by 162% during 2019, from 38 to 100 exahash per second.”

To put this in perspective, bear in mind that Bitcoiners were celebrating when the hash rate went over six exahashes in 2017. 

Also, consider the fact that this year’s surge in hash rate is despite 2018’s rather bearish market, followed by the subdued market sentiment in 2019. 

What’s A Hash Rate?

For the nontechnical crowd, the hash rate is simply the speed at which a mining computer operates. In the case of Bitcoin and other cryptocurrencies that rely on mining to release new coins into existence, the hash rate is the efficiency and performance of a mining machine. It refers to the speed of mining hardware (specialized computers designed to handle the intensive computational power of crypto mining) when trying to solve or “compute” a block.

A higher hash rate is advantageous because it means a miner has an increased chance of finding the next block and receiving a reward.

What Does This Mean For Price? 

Many crypto enthusiasts take a high hash rate to mean a higher price for Bitcoin. But this is still a contested fact. Other people believe that a high hash rate has the opposite effect. 

Sometimes the correlation is the other way round. An increase in Bitcoin price causes the hash rate to surge, as was the case around the period of May to June 2019, when, according to BitInfoChart, hashing power leapfrogged in response to the price uptrend. This trend continued until Bitcoin’s hash rate reached an all-time high of 108.8 m terahashes per second. (100 m TH/s = 1 exahash.)

While the relationship between hash rate and price is still a point of debate, it’s worth noting that the increase in hash rate is happening just as we are entering the year of the next halvening. As we count down to 20 May 2020, the date when Bitcoin halving will take place, prices will almost unquestionably have a bullish run. What effect will this have on the hash rate? We can only wait and see. 

Hash Rate Doesn’t Mean Everything

An increased hash rate translates into stronger network security. That’s pretty much agreed upon. What it does not mean, though, is more miners are joining the network, or decentralization has been strengthened even more. For instance, the vast majority of miners are located in China, as opposed to a proportionate global distribution the way Satoshi Nakamoto envisioned. As such, the hash rate is not close to a holistic dimension of network health. To its credit, however, the network has so far proven resilient against attacks and censorship, which is quite impressive. 

Conclusion

Eleven years since its inception, Bitcoin is presenting with an unprecedented hash rate. This fact only spells good tidings for the network – and its cryptocurrency. The world’s first cryptocurrency is getting stronger, and this is good news for investors, crypto enthusiasts, and even blockchain fans. Let’s see which way the hash rate goes as we advance towards the next halvening, and especially after it.

Categories
Crypto Guides

Architecture and Operation of Blockchain Technology

Introduction

We can obtain the definition of Blockchain by dissecting it into its two words: block and chain. Hence, Blockchain is a chain of blocks having some information in it. Using a blockchain is a way of time-stamping digital documents so that it’s not possible to backdate or tamper them. This secure technology can be used for the transfer of various items such as digital currency, property, contracts, etc. And the primary feature of any blockchain is its decentralized nature. There is no central authority or banks to control the transactions.

Blockchain Architecture and Operation

The architecture and functioning of blockchain go hand in hand. As already mentioned, blockchain is a chain of blocks containing some valuable information. The type of blockchain depends on the data that is present inside a block. For example, a block in a Bitcoin blockchain contains information on who is sending how many bitcoins to whom. Another essential piece in the blockchain is the hash.

Understanding Hash

In simple terms, the hash is the fingerprint of a block. It is unique to each block and is mainly used for the identification of a block. If the content in the block changes, the hash of block changes as well. So, a block has three components:

  1. Data (Sender, Receiver & Amount)
  2. Hash
  3. Hash of the previous block

In technical terms, blockchain is designed using the principles of a linked list. Blocks containing a hash of the previous blocks is what makes blockchain so secure.

Proof of Work

Hashes are an excellent way to avoid tampering of data. But, computers today are fast enough to calculate hundreds of thousands of hashes per second. This makes it pretty convenient for a hacker to tamper a block, and recalculate all the hashes of other blocks and the blockchain valid.

To avoid the occurrence of this situation, Bitcoin blockchains use the concept of Proof-of-Work. This concept is a computational problem that takes efforts to solve. In the case of Bitcoin, it typically takes 10 minutes to calculate the required proof-of-work and add a block to the blockchain. So, this makes it extremely time consuming and challenging for hackers to tamper a block.

Distributed P2P Network

Blockchain is known for its distributed peer to peer network. Anyone is allowed to enter the network. When someone enters the network, he will get a full copy of the network.

When a new block is created, it is broadcasted to all the nodes in the network. Each node verifies this block and makes sure it hasn’t tampered. After verification, each node adds this block to its blockchain. Later, all the nodes create a consensus. They agree about the legitimacy of the blocks and accept or reject it. If the block is verified successfully by consensus, it is added to the main blockchain. This is when the block gets its first confirmation. And when around four confirmations are received, the transaction is said to be completed successfully.

Summary

  1. There are four steps involved in the working of a blockchain.
  2. Some person makes a cryptocurrency transaction.
  3. The transaction is broadcasted to a distributed P2P network.
  4. The nodes in the network validate the transaction with the help of some algorithms.
  5. Once the transaction is verified, the new block is added to the existing blockchain.

This is how the blockchain technology works. Let us know if you have any questions below. Cheers.