user136352: 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

user48884: 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.

user121614: 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.

136352: <p>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 <a href="https://chain.so/btc" rel="nofollow noreferrer">chain.so</a> to get a user's bitcoin transactions.</p>
<p>My question is it possible to somehow identify a user's transactions as mining transactions? Thank you!</p>
<p>Here is an example of a user's mining transaction for context: <a href="https://chain.so/tx/BTC/4e17089eb2e95695f082b5b7570fee8c7544b382ed32ab9dedfd0a6512c4ac35" rel="nofollow noreferrer">https://chain.so/tx/BTC/4e17089eb2e95695f082b5b7570fee8c7544b382ed32ab9dedfd0a6512c4ac35</a></p>
 48884: <p>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).</p>
<p>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.</p>
<p>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.</p>
 121614: <p>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.</p>
<h2>Outputs</h2>
<p>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).</p>
<p>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.</p>
<h2>Transaction chain</h2>
<p>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 <a href="https://mempool.space/tx/7ea0061d3d5c1d04f8ffa65a33ee0ea056dfaad071bad13c29db6ee3f468e0d3" rel="nofollow noreferrer">7ea0061d3d5c1d04f8ffa65a33ee0ea056dfaad071bad13c29db6ee3f468e0d3</a> 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.</p>
<p>Other mining pools might have slightly different looking transaction chains leading to coinbase transactions, so getting this heuristic right will probably require some experimentation.</p>
<h2>Static addresses</h2>
<p>Finally, some mining pools seem to re-use an address for many payouts. For example, the address <a href="https://mempool.space/address/3FxUA8godrRmxgUaPv71b3XCUxcoCLtUx2" rel="nofollow noreferrer">3FxUA8godrRmxgUaPv71b3XCUxcoCLtUx2</a> 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.</p>
