# What is Consensus Mining?

Centralized networks, such as banks, have a small army of bookkeepers, accountants and auditors to verify that transactions are legitimate.&#x20;

While blockchains can’t rely on an in-house staff, they can leverage a distributed group of users known as miners for a similar purpose.&#x20;

Miners are the defacto auditors of a cryptocurrency.  They compete to earn the right to process the output of transactions, confirm account balances, ensure there is no fraud and update the blockchain with the new results.  They are, in turn, rewarded with cryptocurrency for their efforts.&#x20;

While this seems like an elegant solution to the problem of centralization, there are a few major problems.  Specifically:  1) miners are often anonymous and 2) as the defacto auditors of the blockchain, they have a lot of power.  So how do we know that they won’t abuse this position and manipulate the results to send a bunch of money to themselves?&#x20;

Cryptocurrencies employ two safeguards to prevent this:

* Because of the properties of hashing discussed above, if anyone tried to manipulate the data it wouldn’t connect to the previous block, and this would be very obvious to everyone on the network.&#x20;
* They institute systems known as consensus mining protocols to punish bad actors and prevent fraud

The most popular consensus mining protocol today is known as Proof of Work.  Proof of Work requires miners to solve a very difficult math problem to earn the right to validate new blocks.  This problem is so difficult that it can only be solved by random guessing.  As such, miners often employ dozens to hundreds to thousands of computers to make millions of guesses, hoping that one of them gets the correct answer.&#x20;

This uses a lot of electricity, and therefore costs a lot of money.  So if a miner is lucky enough to get the right answer, she is not going to risk manipulating the data and having her update thrown out, especially given that it would be so easy to get caught.&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.digitalnations.xyz/web3-overview/the-web3-ecosystem/cryptocurrencies/how-do-cryptocurrencies-work/how-are-cryptocurrencies-decentralized/what-is-consensus-mining.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
