1

Hi I am currently building financial software to help users keep track of their bitcoin transactions. I have tried a couple of different apis and am currently using chain.so to get a user's bitcoin transactions.

My question is it possible to somehow identify a user's transactions as mining transactions? Thank you!

Here is an example of a user's mining transaction for context: https://chain.so/tx/BTC/4e17089eb2e95695f082b5b7570fee8c7544b382ed32ab9dedfd0a6512c4ac35

2
  • Hi! Just to clarify, by "mining transaction" you mean a mining pool payout transaction in which a mining pool distributes mined coins to its users? Aug 29, 2022 at 4:00
  • Hi @VojtěchStrnad, thats exactly right. yes
    – user136352
    Aug 29, 2022 at 4:07

2 Answers 2

1

Mining pool payout transactions are not special in any way. They are not a separate type of transaction that is uniquely identifiable from other transactions on the network. There is no way to be sure that a transaction is a mining pool payout transaction other than by asking the pool(s).

There are some heuristics that you can use, but they are just heuristics and may miss some transactions or falsely identify transactions. For example, a transaction that pays several recipients and was not seen on the network before being seen in a block could be a mining transaction, particularly if that transaction also does not pay a fee. The addresses used by several mining pools are known, and so transactions involving those addresses may be payout transactions as well.

However these are not guarantees. In the first case, it is not possible to be sure a transaction was not broadcast before being mined. You can only know whether your own node(s) has seen it. Additionally, not all non-boradcasted transactions are created by miners. They may be accepting transactions out of band, as well as fees out of band, so not all 0 fee transactions are also miners'. And looking for the well known addresses may also catch transactions to/from cold storage, and just generally other business transactions that are not related to payouts.

2
  • Of all the recent payout transactions I looked at, it seems only F2Pool actually creates zero-fee transactions and mines them themselves, everyone else's pay a fee and are mined by anyone. Aug 29, 2022 at 5:20
  • Remarkably, the latest zero-fee transaction with a single input and between 90 and 2802 outputs was mined in April 2020 (current F2Pool payout transactions generally have around 3000 outputs). And if we only consider non-coinbase transactions, the latest one was mined in December 2017. Aug 29, 2022 at 5:23
1

There is no method to know for sure if a transaction is a mining pool payout transaction, but a few heurstics can be applied to give you confidence that that's what you're looking at.

Outputs

Just like exchanges processing withdrawals, mining pools batch payouts into a single transaction to save on fees, and so the transaction will have many outputs. It's up to you to set a minimum threshold to consider a transaction for further evaluation (your example transaction has 58 outputs, one of which is clearly a change output).

Next, if you look at your example transaction, you can see that many of the output amounts are just sligtly over 0.001, 0.005 or 0.01. Clearly many of the mining pool users have set up automatic payouts after some threshold amount (indeed, if you look at the addresses receiving the coins, you will see that they have been re-used and have received similar amounts many times in the past). This pattern can be seen in payout transactions of other pools as well, but not in batch transactions coming from exchanges (to my knowledge no exchange implements such a system of automatic withdrawal after a set threshold), so it helps differentiate the two.

Transaction chain

If you follow the single input of your example transaction to its previous transaction, you will again see what looks like a mining pool payout transaction, again with a single input. You can follow these inputs for a total of 8 steps until you arrive at the transaction 7ea0061d3d5c1d04f8ffa65a33ee0ea056dfaad071bad13c29db6ee3f468e0d3 which consolidates 5 UTXOs mined by Luxor Tech (as evident from their coinbase inputs). This gives us good confidence that those transactions in the chain really were mining pool payout transactions, but also what pool they belong to.

Other mining pools might have slightly different looking transaction chains leading to coinbase transactions, so getting this heuristic right will probably require some experimentation.

Static addresses

Finally, some mining pools seem to re-use an address for many payouts. For example, the address 3FxUA8godrRmxgUaPv71b3XCUxcoCLtUx2 which can be traced to the BTC.com pool has been used in thousands of transactions, and looking at a few of them they are clearly payout transactions. You can compile these addresses into a list to check future transactions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.