Blockchain is defined as a highly secure decentralized database, storing transactional information on a ledger over a peer-to-peer network. The keyword here is highly secure, because no where does it state that a blockchain such as the one running Bitcoin is impenetrable.
How does blockchain work and how is it highly secure?
A blockchain is a chain of individual blocks that store various transactions over a short period of time. For Bitcoin, a new block is created every 10 minutes, so all transactions made within the 10 minute interval will be part of this block.
In order for the block (containing a set of transactions) to be added to the blockchain, miners must compete by racing to solve a extremely difficult and highly computational cryptographic puzzle. The amount of computational energy that is required to complete this task is the cost of participating. The reward for successfully solving the puzzle is some form of payment in the respective cryptocurrency that the blockchain is supporting.
The secure aspect of this protocol comes from the consensus algorithm that ensures the next block is the only version of the truth across all nodes once mined. If the block has been successfully mined and was somehow altered, the altered version of the ledger would be quickly identified and rejected by the peer-to-peer network of users, since there all other users in participation will have the correct ledger.
A 51% attack consists of a group of miners who temporarily control over 50% of the network's mining hashrate. Hashrate is the measurement unit of processing power of a network of nodes that power a blockchain. This is considered a very large flaw in a public blockchain such as Bitcoin, because if a single entity (or group of entities) contributed to the majority of the network's mining hashrate, then they would have the power to manipulate the public ledger.
The manipulation of the public ledger can lead to the following issues:
- Prevention of new transactions to be confirmed, resulting in stalled payments between users.
- Control the mining of all new blocks to create a mining monopoly, which then the group will earn all of the rewards.
- Reversal of transactions during the time of control, which makes it seems as if the transaction was complete, resulting in double-spend coins.
Although a 51% attack would not completely dismantle a largely backed cryptocurrency such as Bitcoin, it would result in the public loss of confidence in the coin and the technology behind it. Panic would consume the exchanges, resulting in selling off Bitcoin investments that would inevitably crash the market.
The reason for this attack being hypothetical is because it would cost billions of dollars to invest into the hack. The processing power required to consume over 50% of the network's mining hashrate is not feasible in today's world due to the cost, but maybe it will be in the future.