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
Cryptocurrencies

The ultimate guide to cryptocurrency mining

So, can you still make enough money out of crypto mining in 2019? This simple guide tells you everything you need to know about cryptocurrency mining. And acts as the perfect launchpad to a successful crypto mining career.

The concept of cryptocurrency mining is often baffling to people outside cryptoverse and even to some inside it. Cryptocurrency mining, a.k.a crypto mining, is the process by which transactions between cryptocurrency users are verified and added on to the long list in the public blockchain ledger. The same process also introduces new coins into the circulating supply of a particular cryptocurrency.

Cryptomining is achieved via the use of specialized computers. Technically, anyone with a computer and internet can mine cryptocurrency. The only problem in actual success with crypto mining depends on several factors, such as which crypto you’re mining, how powerful your computer is, and the cost of electricity where you live. (More on that later). Depending on all these factors, crypto mining may be more expensive – both financially and time-wise – than anything you’re gaining from it.

Who Are Cryptocurrency Miners? 

Cryptominers are sometimes called the backbone of many cryptocurrency networks. And they’re worthy of this title because they are the ones responsible for issuing new crypto coins, validating transactions, and ensuring the security of blockchain networks.   

Bitcoin miners use specialized computers known as application-specific integrated circuits (ASICs), which are designed for the sole purpose of mining cryptocurrency. ASIC miners are usually designed to mine a specific cryptocurrency. This means a Bitcoin ASIC miner can only mine bitcoin. A Litecoin ASIC miner can only mine Litecoin, and so on. 

As cryptocurrency has increased in value, so have more cryptominers jumped into the bandwagon. As such, crypto mining has become so competitive that it’s no longer profitable to mine alone. Today, most cryptocurrency mining is done by “mining pools” in warehouses that have low-cost electric power. 

Mining pools are made of a group of miners who agree to share block rewards in proportion to the amount of work that each contributed to finding a new block (a block is essentially a collection of unconfirmed transactions plus a set of data about those transactions) 

What Is Hash Rate? 

Hash power, or hash rate, is the measure of the processing power of a mining computer. The higher the hash rate, the faster the next block on the blockchain network is found. The creator of the first cryptocurrency – Satoshi Nakamoto – intended for Bitcoin to be mined via computer CPUs. However, innovative programmers soon discovered they could derive more hashing power from graphic cards and wrote mining software to facilitate this. 

Graphic cards were then surpassed by Field Programmable Gate Arrays (FPGAs), which were soon phased out by ASICs, which packed inordinately more hashing and staying power. Nowadays, all serious crypto mining is done with ASICs, usually in low-cost electricity areas and in thermally-regulated areas. (Data mining centers are thermally regulated because the power ASICs consumes ends up as so much heat.)

What Is The Purpose Of Mining And How Does It Work? 

Cryptocurrency mining is actually another term to refer to a type of validation model known as proof of work (PoW). Different cryptocurrencies utilize different validation models to facilitate their release into circulation. Apart from proof of work, the other more common validation model is proof of stake, which uses a random selection of stakeholders (coin holders) as transaction validators. 

However, in PoW – which is used by cryptos such as Bitcoin, Bitcoin Cash, Litecoin, and others, miners compete with each other to solve computational puzzles to solve the next block. 

So, what is the point of mining at all? Mining is central to cryptocurrencies that rely on PoW TO keep the network functional. There are many intricacies involved with mining, but it has three most important functions which are as follows: 

It issues new coins into circulation.

Unlike fiat currency, which can be issued by the central bank at any time, mining is what facilitates the entry of new crypto coins into circulation. The issuance of new coins is set in the cryptocurrency code, so miners cannot manipulate the system or create new coins out of thin air. 

It validates transactions on the network 

When transactions are sent on the blockchain network, miners include these transactions in their blocks. A transaction is only considered secure and complete once it’s recorded on the blockchain – because that’s when it’s added on the public blockchain.

It secures the blockchain network 

Miners keep the blockchain network secure from attacks. The more miners are on the network, the more secure the network is. The only way to sabotage a blockchain network is for one miner to have more than 51% of the network’s hash power, which is near impossible with the many different miners working on the network across the globe.

How Miners Make Money and Block Rewards

Block rewards refer to the crypto coins that are awarded by a blockchain network to block miners each time they mine a block successfully. These rewards are issued by cryptocurrencies that use the proof of work consensus mechanism. Most miners channel these rewards back to the ecosystem to fuel their mining costs while keeping the rest.

Bitcoin – the first cryptocurrency and the pioneer of cryptocurrency, currently rewards miners with 12.5 BTC for each mined block. In the beginning, miners were rewarded with 50 BTC. Satoshi Nakamoto, the creator(s) of Bitcoin, embedded “halving” – or what’s colloquially referred to as “halvening” in cryptoverse, into the system so that the block reward is slashed into two after every 210,000 blocks have been mined. Bitcoin’s halvening happens after about every four years. 

Another example is Litecoin, which also halves its mining rewards. Litecoin’s halving occurs after every 840,000 blocks. As of November 2019, the block reward for the cryptocurrency is 12.5, having been halved from 25 in August.

The question that bugs many in cryptosphere is this: what happens after these cryptocurrencies’ coins, and others that rely on mining, are all mined? How will miners be rewarded? Well, besides block rewards, these crypto’s protocols have also provided transaction fees as a means of reward. The transaction fees will shoot up once the maximum supply is achieved – in response to increased demand. Thus, new coins may no longer enter into circulation, but miners will still have a payday. 

Cryptocurrency Mining Step By Step

When a transaction is made on the blockchain, e.g., a user sending bitcoin to another user’s address, the transaction must be recorded – that is, the information must be indicated on a new block

  • This block must be secured and encrypted so that it cannot be reversed or modified, and is up for grabs for all miners on the network 
  • To encrypt the block, miners must find the solution to a computational puzzle through trial and error method in a race to find the proper cryptographic hash for the block. 
  • Once a miner finds a new block, it’s verified by other computers in the network in a process known as consensus and then added on the blockchain.
  • If a miner has successfully mined, verified, and secured the block, they are awarded newly created coins.

The Downsides to Cryptomining

Though mining is the lifeblood of certain cryptocurrencies, it comes with its own share of challenges. Some of these are as below: 

Complexity: Cryptomining is not for the uninitiated. Even people with a pretty good grasp of cryptocurrencies and blockchains might find themselves befuddled in the first few days. What’s more, you’ll need to assemble a range of equipment such as a customized mining computer, an ASIC chip, cooling equipment, and so on. 

On top of that, you’ll need to read a lot, keep abreast of what’s happening in the crypto world, and be prepared to make mistakes once in a while.  

Electricity Costs – Mining can prove quite expensive, mainly because it consumes a lot of electricity. The ASIC computers and the massive servers involved usually rake up enormous power bills. Bitcoin mining is especially electricity-intensive – so much that it has raised questions from ecologists who argue that it’s becoming a threat to the environment. 

Current estimates show that the current global power consumption by Bitcoin mining is a minimum of 22 terawatt-hours per year – which is almost the same as the annual power consumption by Ireland. 

Hardware Costs – Mining farms need to spend a lot of money to purchase stronger equipment every other few months as the prior equipment becomes obsolete due to increased mining competition. The cooling systems further add up to the hardware costs. 

Vulnerability: The proof of work model is vulnerable to an individual or an entity gaining control of 51% of the network’s computing power. If this were to happen, it would essentially hold the network hostage. The more dominant mined cryptocurrencies like Bitcoin, Litecoin, Bitcoin, and Monero are safe from this nature of attacks. However, smaller cryptocurrencies that require longer block processing durations and have weaker daily volumes could fall prey easily. 

Conclusion

The concept of cryptocurrency mining is fun, as it can be confusing. This guide should lift part of the mystery surrounding the concept. It has been interesting to see the evolution of crypto mining – from being able to mine from the comfort of your home on your PC to dedicated warehouses solely for mining. The innovation of ideas that have gone into the space is also exciting, and we can only wait to see what more the enterprising mining community comes up with in the future.