A cryptocurrency is a digital or virtual currency that uses cryptography for security. A cryptocurrency is difficult to counterfeit because of this security feature. Many cryptocurrencies are decentralized systems based on blockchain technology, a distributed ledger enforced by a disparate network of computers. A defining feature of a cryptocurrency, and arguably its biggest allure, is its organic nature; it is not issued by any central authority, rendering it theoretically immune to government interference or manipulation.
In cryptocurrency networks, mining is a validation of transactions. For this effort, successful miners obtain new cryptocurrency as a reward. The reward decreases transaction fees by creating a complementary incentive to contribute to the processing power of the network. The rate of generating hashes, which validate any transaction, has been increased by the use of specialized machines such as FPGAs and ASICs running complex hashing algorithms like SHA-256 and Scrypt. This arms race for cheaper-yet-efficient machines has been on since the day the first cryptocurrency, bitcoin, was introduced in 2009. With more people venturing into the world of virtual currency, generating hashes for this validation has become far more complex over the years, with miners having to invest large sums of money on employing multiple high performance ASICs. Thus the value of the currency obtained for finding a hash often does not justify the amount of money spent on setting up the machines, the cooling facilities to overcome the enormous amount of heat they produce, and the electricity required to run them.
Bitcoin mining saps energy, costly, uses more power and also the reward delays. For mining, run software, get your wallet ready and be the first to solve a cryptographic problem and you get your reward after the new blocks have been added to the blockchain.Mining is said to be successful when all the transactions are recorded in the blockchain and the new blocks are added to the blockchain.
Within a cryptocurrency network, only miners can confirm transactions by solving a cryptographic puzzle. They take transactions, mark them as legitimate and spread them across the network. Afterwards, every node of the network adds it to its database. Once the transaction is confirmed it becomes unforgeable and irreversible and a miner receives a reward, plus the transaction fees.
Ethereum's blockchain uses Merkle trees, for security reasons, to improve scalability, and to optimize transaction hashing. As with any Merkle tree implementation, it allows for storage savings, set membership proofs (called "Merkle proofs"), and light client synchronization. The Ethereum network has at times faced congestion problems, for example, congestion occurred during late 2017 in relation to Cryptokitties.
The proof-of-work system, alongside the chaining of blocks, makes modifications of the blockchain extremely hard, as an attacker must modify all subsequent blocks in order for the modifications of one block to be accepted. As new blocks are mined all the time, the difficulty of modifying a block increases as time passes and the number of subsequent blocks (also called confirmations of the given block) increases.
A lot of people have made fortunes by mining Bitcoins. Back in the days, you could make substantial profits from mining using just your computer, or even a powerful enough laptop. These days, Bitcoin mining can only become profitable if you’re willing to invest in an industrial-grade mining hardware. This, of course, incurs huge electricity bills on top of the price of all the necessary equipment.