Step 1: Initiate the transaction
A customer goes into a wallet and performs a transaction where he sends a digital currency or a token to another customer.
Step 2: Enter the trading pool
Now the purchase is broadcast by wallet, waiting for miners on the blockchain to pick it up. It waits in the "unconfirmed transaction pool" until it is picked up.
All the transactions that are waiting to be resolved are in the unconfirmed pool, which is not one huge pool on the network, but many small cache pools scattered around the miners' local area.
Step 3: Identify the deal to be packaged
Miners (sometimes called nodes) on a blockchain network select trades from an unspecified pool and package them into chunks of data. With the exception of some additional metadata, the data block is basically transaction data (which is still an unconfirmed buy or sell). Each miner packages the trade data block they pick up, and multiple miners can choose the same trade data package. For example, two miners, Miner A and Miner B, both decide to buy and sell X as a package.
Each blockchain has large limits on the data block. On the BTC blockchain, this maximum value is 1MB.
Before a transaction can be packaged, miners need to check whether the transaction is eligible to be packaged against the blockchain's history. According to blockchain history, if the payer has sufficient balance in his wallet, the transaction is considered useful and can be packaged onto the chain.
If a Bitcoin holder wants to speed up his trade, he can opt for the higher payment mining rewards. Miners typically package deals that pay higher mining incentives first.
Step 4: Measure the signature block
A miner's job is to select and package transaction data into chunks. To add these blocks to the blockchain (which means having the block's data accepted by all nodes on the blockchain), the block first has to be signed (aka "proof of work"). This signature was obtained after solving a very complex mathematical problem, and this signature is unique. Each block had to solve the same math problem. It takes a lot of computing power (and therefore, a lot of electricity) to solve this math problem. This process is called mining.
Step 5: Broadcast block
When a miner finds a qualified signature, he can broadcast his data block and signature to all the other miners.
Step 6: Validate the block
The other miners now have to determine the legitimacy of the signature from the block they received over the broadcast, and they have to hash that block to see if it generates a signature that starts with that many zeros. If the proof is checked, the other miners will consider the block valid and agree to add it to the blockchain (they reach an understanding that they all agree with each other, hence the term consensus algorithm). This is where "proof of work" comes from. The signature is proof of the miner's work (computing power spent), and the block of data can now be added to the blockchain and distributed to all other nodes on the network. As long as all the transaction data in the block matches the history on the blockchain, other nodes will receive the block and store it.
When a block of data is added to the blockchain, it is considered correct by all the blocks on the blockchain. For example, my transaction is included in Block 502, and the longest block of this blockchain is currently Block 507, which means that my transaction data has been confirmed 5 times (507-502). It feels right because every time another block is linked, the blockchain agrees on the full transaction details, including your transaction and your block. You could say, by this time, your sale has already been confirmed five times. This is what Etherscan refers to when it indicates the details of the sale. The more often your trade is identified (i.e. the more heavily it is placed in the blockchain), the harder it will be for an attacker to change it.
Each time a new transaction is added to the blockchain, all miners have to start from scratch in step three, packaging a new block of transaction data.
1. Computational power mining
The concept of mining in blockchain field was originally originated from BTC. Due to its consensus mechanism of PoW, BTC produces a block (Token reward and service fee) every 10 minutes, and the calculation power is a quantitative index to consider the processing speed of you (mining machine). The greater the calculation power, the more probability of obtaining Bitcoin. At present, there are a lot of tokens about computing power mining, although the algorithm may be different, but the principle is similar to BTC.
2. Trade mining
Trading mining means that a portion of the platform's tokens are released every day, and the number of these tokens is allocated according to the volume of each user's transaction. Because trading and mining can make money, it artificially enhances the liquidity of trading pairs within the platform. However, the continuous release of Taiwan dollars and the price rise eventually leads to the efficient collapse of the price. There are very few platforms that use strategies like trade mining.
PoS (Proof of Stake) mining
Mimics PoW power mining, where the holder can pledge a Token (equivalent to the power in power mining) to a verifier node (mostly a wallet side, or a trading platform). In order to get the node bonus.
Different tokens may get completely different profits due to the differences in their systems. However, the higher the profit is, the better. The value of the currency should also be considered.
4. Storage mining
Storage mining is a new mining method proposed under the PoW co-system, where the mining cost is too high. It can use the memory space of hard disk to mine, so as to obtain tokens. Hard disk mining projects are relatively small, and some of the computing power is not only affected by the size of the hard disk storage space, but also related to other factors such as time.