# Mining

Mining is an integral part of the Joint protocol. It involves the execution of actions that keep the protocol lively.

Due to the nature of smart contracts on the blockchain, they cannot execute functions without a user-initiated transaction. In other words, smart contracts can only update their state when users sign and broadcast a transaction.&#x20;

The Joint protocol requires special protocol participants to create transactions that perform various operations necessary to move the protocol.&#x20;

These protocol participants are known as ***miners***.

## Transaction Types

There are several types of transactions miners can create. Some of these transactions are created in response to swap operations and must be sent within a specific period.

### Draft Transaction

A draft transaction randomly selects and sends mediators into a new dispute. This process is known as *drafting*.&#x20;

When a dispute is created, the protocol cannot cheaply draft mediators in the same transaction. Instead, the protocol relies on miners to call the `draft` method until all mediators are assigned to the dispute. For instance, when a dispute requires three (3) mediators, the `draft` method can be called only three (3) times for that dispute.

The dispute will be fully initialised once all mediators have been drafted.

### Undraft Transaction

An un-draft transaction removes previously drafted mediators from an executed dispute.&#x20;

An executed dispute is a dispute that has been concluded. When a dispute has been executed, miners can call `undraft` multiple times to remove the mediators and prepare them for their next draft.

For instance, if three (3) mediators are drafted to a dispute, it will take three (3) `undraft` calls to undraft the mediators.

### Dispute Execution Transaction

A decision execution transaction is used to execute the ruling of a dispute after the voting phase has ended.&#x20;

When voting ends, mediators call the `executeDecision` method of the dispute to execute the ruling.&#x20;

Depending on the verdict, the call may release the locked asset of the disputed swap, cancel the swap, or mark the dispute as stalled if a definitive verdict is not reached.&#x20;

Miners can only call this method once per dispute.

## How To Become a Miner

Mining is open to everyone. Intending miners do not need to stake any tokens.&#x20;

The only expense on the miner is the network fee and miner hosting cost which are repaid as a part of the protocol reward earned.&#x20;

## Incentives

The Joint Protocol rewards miner for their service to the protocol through rewards earned for every transaction completed.&#x20;

The protocol reward allocated to the miner will include the transaction fees paid to execute transactions, the miner hosting cost and a substantial amount as compensation.


---

# 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://docs.joint.exchange/concepts/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.
