Investors worldwide have swarmed on Bitcoin and other cryptocurrencies, lured by the promise of quick riches regardless of the risks. Bitcoin's success has fueled legions of follow-on projects, imitators, and fans. Thieves, not to be left out, discovered opportunities as well—because where there is a promise of riches, there is an opportunity to steal it.
There are weaknesses that hackers can exploit, which means your cryptocurrency can be hacked; however, it can only be done in certain scenarios. So, how can you protect yourself and your investments?
Bitcoin launched in 2009—it is a decentralized digital currency, meaning it is not overseen or regulated by an administrator, group, government, or other entity. Peer-to-peer transactions fueled the rise of digital currency, which transitioned into a digital landscape where anything could be represented by a blockchain token.
Cryptocurrency blockchains are public ledgers that record and verify all transactions in a blockchain network. Everyone can see transactions, the pseudonymous addresses involved, and how much was transferred. However, these public ledgers do not allow anyone to access them and submit or change entries; this is done automatically by scripts, programming, and an automated transaction validation process.
How Is a Blockchain Secured?
Security is addressed in a blockchain through cryptographic techniques and consensus mechanisms. Blockchains use encryption to encode transaction information and include the data from previous blocks in each following block. The entire ledger is chained together through encrypted data. Each newly created block makes it more secure.
An existing blockchain, therefore, cannot be hacked in the traditional sense of "being hacked," where malicious code is introduced into the chain or someone "hacks" into the network with brute force and begins making changes.
How Can a Blockchain Be Attacked?
An attacker—or group of attackers—could takeover a blockchain by controlling a majority of the blockchain's computational power, called its hashrate. If they own more than 50% of the hashrate, they can introduce an altered blockchain in what is called a 51% attack. This allows them to make changes to transactions that have not been confirmed by the blockchain that existed before they were able to take over. Transactions are considered to be successful when six confirmations have been completed.
For instance, if you transferred 1 BTC to a friend, the transaction would be recorded and confirmed in one block—this is the first confirmation. That block's data is recorded into the next block, confirmed, and the block is closed—this is the second confirmation. This must happen four more times for the network to process the transaction. Transactions that have not been processed can be reversed in a 51% attack.
The attackers would then be free to use the tokens used in transactions that the network has not confirmed. They can transfer the coins to anonymous addresses, and the altered blockchain would act however they had programmed it to work.1
Blockchains with smaller numbers of participants have been attacked in this manner, but larger networks—such as Bitcoin and Ethereum—make it nearly impossible to successfully attack due to the costs involved in acquiring 51% of the hashrate.