Invalid mining jobs by AntPool & friends during forks

Incompetence not malice - Trying to create coins out of thin air 🪄
Wednesday, March 12, 2025

Looking deeper into @boerst’s recent observation about invalid mining jobs by AntPool & friends to discuss his hypothesis about “selfish mining” and “glitchy template code”. I conclude that it’s probably a bug in AntPool’s coinbase creation code and agree with @boerst’s conclusion that this is another good data point for proxy pooling of “AntPool & friends”.


@boerst, the developer behind the stratum.work mining pool job monitoring tool recently observed that AntPool, CloverPool, Ultimus, Rawpool, and Poolin published mining jobs for invalid blocks. The pools publish empty mining jobs only including the coinbase transaction but have a coinbase output value higher than the subsidy. These jobs are invalid as they attempt to create more new coins than allowed. @boerst saw these jobs being published on March 1st, 2025 and noted that the previous block hash ..acdeb985ea1 in these jobs isn’t known to the network. He speculates that these bad jobs could be caused by a “botched selfish mining attempt” or “glitchy template code”. Additionally, he notes that this makes it obvious that these pools are related.

Observations

Looking at historical data I collected with an instance of my stratum-observer tool, I noticed three similar cases in December 2024 next to the occurrence on March 1st, 2025. While I don’t collect jobs from CloverPool and Rawpool, I saw jobs from Braiins and Binance Pool that have the same characteristics. I also noticed that these only occur when AntPool and friends are involved in a block-race during a fork.

While building block 873559

On December 6th, 2024, AntPool, Braiins, Poolin, Binance Pool, and Ultimus published invalid jobs building block 873559 on the previous block hash ..2ba3bd04af2. This previous block mined by AntPool ended up losing in a block-race against a ViaBTC block. While a coinbase output value of 3.125 BTC would have been allowed, Braiins and Ultimus set a coinbase output value of 3.28466550 BTC (0.1596655 BTC more than allowed) while AntPool, Binance Pool, and Poolin had a 5606 sat higher coinbase output value of 3.28460944 BTC (+0.1596094 BTC) in their mining jobs.

I received the first jobs building block 873559 from Poolin, Binance Pool, and F2Pool at nearly the same time. While Poolin and Binance Pool were building on AntPool’s block, F2Pool was building on ViaBTC’s block. The initial jobs by Binance Pool and Poolin had an empty template (no Merkle branches) and a correct coinbase output value of 3.125 BTC. Similar, valid mining jobs arrived for AntPool, Braiins, and Ultimus. However, 400ms after receiving the initial jobs by Binance Pool and Poolin, AntPool, and the other pools sent new, invalid jobs with a too-high coinbase output value. The incorrect coinbase output values excatly match the coinbase output values of the last jobs mining on the previous block indicating the output value was cached from the previous block. A detailed look at the AntPool coinbase transaction reveals that the invalid coinbase and the coinbase from the previous block job only differ in the merge-mining commitments (OP_RETURN outputs and the Namecoin commitment in the coinbase script) and the BIP 30 block height. After 17 seconds AntPool sent a non-empty job with a correct coinbase output value.

The relevant jobs are listed in this table.

timepoolMerkle branchesvalue in BTCbuilding blockprev hashnote
2024-12-06 22:34:09.49AntPool133.28460944873558..8be5b7a176last job for prev block
2024-12-06 22:34:19.90Poolin03.12500000873559..2ba3bd04affirst new jobs for 873559
2024-12-06 22:34:19.90Binance Pool03.12500000873559..2ba3bd04afmining on AntPool’s block
2024-12-06 22:34:19.90F2Pool03.12500000873559..ea5ba4af6amining on ViaBTC’s block
2024-12-06 22:34:20.01AntPool03.12500000873559..2ba3bd04afvalid, empty AntPool job
2024-12-06 22:34:20.31AntPool03.28460944⚠️873559..2ba3bd04afinvalid AntPool job
2024-12-06 22:34:37.43AntPool133.24736182873559..2ba3bd04afvalid, non-empty AntPool job after 17s

While building block 874037

On December 10th, 2024, only AntPool, Binance Pool, and Poolin published an invalid job for block 874037 on AntPool’s block ..e581c9c12f3 during a block-race with F2Pool’s ..07a3cdc4514. AntPool’s block ended up winning while F2Pools block became stale. Braiins and Ultimus Pool didn’t publish invalid blocks. The invalid jobs had a coinbase output value of 3.17199711 BTC which again exactly matches the coinbase output value of the last job of the previous block. The coinbase transactions again only differ in the merge-mining commitments and the BIP30 block height. It took AntPool about 16 seconds before they sent a valid job after their invalid job.

While building block 875590

On December 20th, 2024, AntPool, Braiins, Poolin, Binance Pool, and Ultimus published a job building block 875590 on the AntPool’s block ..b905ac264e5 during a block-race with ViaBTC’s ..b911cbd12c6 which ended up winning. AntPool, Binance Pool, and Poolin had a coinbase transaction with a value of 3.25665133 BTC (0.13165133 BTC too much), and the coinbase transaction of Braiins and Ultimus had a value of 3.25664121 BTC (0.13164121 BTC too much). The coinbase output values again exactly match the values of the last job of the previous block. After 22 seconds, AntPool sent out a valid mining job.

While building block 885797

On March 1st, 2025, AntPool, Braiins, Poolin, Binance Pool, and Ultimus published invalid jobs building block 885797 on the unknown block ..acdeb985ea1 which was in a block-race with a block mined by Foundry. The jobs by Braiins and Ultimus had an invalid coinbase output value of 3.16436527 BTC while AntPool, Poolin, and Ultimus had a value of 3.14557552 BTC. This time, the coinbase output value of the last AntPool job for the previous block was 3.16295187 BTC which doesn’t match with either of the invalid jobs. For this block, AntPool didn’t send out a valid job and even refreshed the invalid job multiple times until Foundry found block 885797 about 35 seconds after 885796 had been found. This means AntPool and the other pools tried to mine an invalid block for about 35 seconds.

The unknown block ..acdeb985ea1 may be a block by AntPool, Braiins, Poolin, Binance Pool, or Ultimus that didn’t propagate well during a block-race with the Foundry block.

Discussion

Based on the observations, the behavior of AntPool & friends can be summarized as follows: On a new block, AntPool and friends send a job for an empty block. If they detect that one of AntPool’s blocks is in a block-race with another block, they send an empty mining job with a coinbase output value of or similar to their last job for the previous block. At some point, they will issue a new, valid job with a correct coinbase output value. Based on the four observations, this usually takes more than 15 seconds.

This behavior doesn’t seem like this is a selfish-mining attempt. The three blocks in December propagated through the network and in 874037 even arrived before F2Pool’s block. The block in March might not have propagated well due to being found slightly after the Foundry block 885796.

@boerst speculates that the invalid jobs could be related to “glitchy template code”. Based on the observations, I assume it’s related to the coinbase building code as opposed to the template building code. In three cases, the coinbase output value of the last job of the previous block is reused. This leads to the assumption that it’s cached somewhere and in some way not updated or reset in the block-race scenario. On March 1st, this assumption doesn’t hold as the AntPool coinbase value of the last job of the previous block doesn’t match the value in the invalid job. However, an explanation could be that the coinbase value for the previous block had been updated internally, but the corresponding mining job hadn’t been published yet.

While I don’t track the the same pools as boerst, I agree with his assumption that this weird and incorrect behavior once more confirms that these pools are operated by the same entity. It might be time to rename AntPool and its proxy pools Braiins, Poolin, Binance Pool, and Ultimus (and probably more) to “AntPool & friends”.


A list of all invalid jobs I received can be found below:

stratumobserver=> select pool, timestamp, coinbase_value, coinbase_height, cardinality(merkle_branches) as merkle_branches_count, header_prev_hash from job_updates where coinbase_value > 312500000 and cardinality(merkle_branches) = 0 order by timestamp desc;
     pool     |         timestamp          | coinbase_value | coinbase_height | merkle_branches_count |                         header_prev_hash
--------------+----------------------------+----------------+-----------------+-----------------------+------------------------------------------------------------------
 Braiins      | 2025-03-01 02:32:48.256093 |      316436527 |          885797 |                     0 | 00000000000000000001509b28e96d4eba8508a8885e78dc83b60cacdeb985ea
 AntPool      | 2025-03-01 02:32:47.95568  |      314557552 |          885797 |                     0 | 00000000000000000001509b28e96d4eba8508a8885e78dc83b60cacdeb985ea
 Ultimus      | 2025-03-01 02:32:47.934396 |      316436527 |          885797 |                     0 | 00000000000000000001509b28e96d4eba8508a8885e78dc83b60cacdeb985ea
 Binance Pool | 2025-03-01 02:32:47.834271 |      314557552 |          885797 |                     0 | 00000000000000000001509b28e96d4eba8508a8885e78dc83b60cacdeb985ea
 Poolin       | 2025-03-01 02:32:47.76899  |      314557552 |          885797 |                     0 | 00000000000000000001509b28e96d4eba8508a8885e78dc83b60cacdeb985ea
 Braiins      | 2025-03-01 02:32:38.442376 |      316436527 |          885797 |                     0 | 00000000000000000001509b28e96d4eba8508a8885e78dc83b60cacdeb985ea
 AntPool      | 2025-03-01 02:32:38.342103 |      314557552 |          885797 |                     0 | 00000000000000000001509b28e96d4eba8508a8885e78dc83b60cacdeb985ea
 Ultimus      | 2025-03-01 02:32:38.220214 |      316436527 |          885797 |                     0 | 00000000000000000001509b28e96d4eba8508a8885e78dc83b60cacdeb985ea
 Binance Pool | 2025-03-01 02:32:38.120078 |      314557552 |          885797 |                     0 | 00000000000000000001509b28e96d4eba8508a8885e78dc83b60cacdeb985ea
 Poolin       | 2025-03-01 02:32:38.054957 |      314557552 |          885797 |                     0 | 00000000000000000001509b28e96d4eba8508a8885e78dc83b60cacdeb985ea
 Braiins      | 2025-03-01 02:32:29.622593 |      316436527 |          885797 |                     0 | 00000000000000000001509b28e96d4eba8508a8885e78dc83b60cacdeb985ea
 AntPool      | 2025-03-01 02:32:29.322023 |      314557552 |          885797 |                     0 | 00000000000000000001509b28e96d4eba8508a8885e78dc83b60cacdeb985ea
 Ultimus      | 2025-03-01 02:32:29.19731  |      316436527 |          885797 |                     0 | 00000000000000000001509b28e96d4eba8508a8885e78dc83b60cacdeb985ea
 Binance Pool | 2025-03-01 02:32:29.097238 |      314557552 |          885797 |                     0 | 00000000000000000001509b28e96d4eba8508a8885e78dc83b60cacdeb985ea
 Poolin       | 2025-03-01 02:32:29.036254 |      314557552 |          885797 |                     0 | 00000000000000000001509b28e96d4eba8508a8885e78dc83b60cacdeb985ea
 AntPool      | 2025-03-01 02:32:28.020701 |      314557552 |          885797 |                     0 | 00000000000000000001509b28e96d4eba8508a8885e78dc83b60cacdeb985ea
 Binance Pool | 2025-03-01 02:32:27.69472  |      314557552 |          885797 |                     0 | 00000000000000000001509b28e96d4eba8508a8885e78dc83b60cacdeb985ea
 Poolin       | 2025-03-01 02:32:27.634525 |      314557552 |          885797 |                     0 | 00000000000000000001509b28e96d4eba8508a8885e78dc83b60cacdeb985ea
 Braiins      | 2025-03-01 02:32:26.719377 |      316436527 |          885797 |                     0 | 00000000000000000001509b28e96d4eba8508a8885e78dc83b60cacdeb985ea
 Braiins      | 2025-03-01 02:32:26.218713 |      316436527 |          885797 |                     0 | 00000000000000000001509b28e96d4eba8508a8885e78dc83b60cacdeb985ea
 Ultimus      | 2025-03-01 02:32:26.19205  |      316436527 |          885797 |                     0 | 00000000000000000001509b28e96d4eba8508a8885e78dc83b60cacdeb985ea
 AntPool      | 2025-03-01 02:32:25.918188 |      314557552 |          885797 |                     0 | 00000000000000000001509b28e96d4eba8508a8885e78dc83b60cacdeb985ea
 Ultimus      | 2025-03-01 02:32:25.891502 |      316436527 |          885797 |                     0 | 00000000000000000001509b28e96d4eba8508a8885e78dc83b60cacdeb985ea
 Binance Pool | 2025-03-01 02:32:25.590893 |      314557552 |          885797 |                     0 | 00000000000000000001509b28e96d4eba8508a8885e78dc83b60cacdeb985ea
 Poolin       | 2025-03-01 02:32:25.532066 |      314557552 |          885797 |                     0 | 00000000000000000001509b28e96d4eba8508a8885e78dc83b60cacdeb985ea
 Poolin       | 2025-03-01 02:32:25.431804 |      314557552 |          885797 |                     0 | 00000000000000000001509b28e96d4eba8508a8885e78dc83b60cacdeb985ea
 Binance Pool | 2025-03-01 02:32:25.390627 |      314557552 |          885797 |                     0 | 00000000000000000001509b28e96d4eba8508a8885e78dc83b60cacdeb985ea
 Poolin       | 2025-03-01 02:32:25.331699 |      314557552 |          885797 |                     0 | 00000000000000000001509b28e96d4eba8508a8885e78dc83b60cacdeb985ea

 AntPool      | 2024-12-20 12:45:27.914581 |      325665133 |          875590 |                     0 | 0000000000000000000005eee6163885d621cd0b4e999630d00433b905ac264e
 AntPool      | 2024-12-20 12:45:09.963704 |      325665133 |          875590 |                     0 | 0000000000000000000005eee6163885d621cd0b4e999630d00433b905ac264e
 Binance Pool | 2024-12-20 12:45:09.865582 |      325665133 |          875590 |                     0 | 0000000000000000000005eee6163885d621cd0b4e999630d00433b905ac264e
 Poolin       | 2024-12-20 12:45:09.865545 |      325665133 |          875590 |                     0 | 0000000000000000000005eee6163885d621cd0b4e999630d00433b905ac264e
 Ultimus      | 2024-12-20 12:45:09.86551  |      325664121 |          875590 |                     0 | 0000000000000000000005eee6163885d621cd0b4e999630d00433b905ac264e
 Braiins      | 2024-12-20 12:45:09.817793 |      325664121 |          875590 |                     0 | 0000000000000000000005eee6163885d621cd0b4e999630d00433b905ac264e
 Binance Pool | 2024-12-20 12:45:09.36458  |      325665133 |          875590 |                     0 | 0000000000000000000005eee6163885d621cd0b4e999630d00433b905ac264e
 AntPool      | 2024-12-20 12:45:09.362357 |      325665133 |          875590 |                     0 | 0000000000000000000005eee6163885d621cd0b4e999630d00433b905ac264e
 Braiins      | 2024-12-20 12:45:09.317215 |      325664121 |          875590 |                     0 | 0000000000000000000005eee6163885d621cd0b4e999630d00433b905ac264e
 Poolin       | 2024-12-20 12:45:09.264466 |      325665133 |          875590 |                     0 | 0000000000000000000005eee6163885d621cd0b4e999630d00433b905ac264e
 Ultimus      | 2024-12-20 12:45:09.16438  |      325664121 |          875590 |                     0 | 0000000000000000000005eee6163885d621cd0b4e999630d00433b905ac264e

 AntPool      | 2024-12-10 01:33:10.167938 |      317199711 |          874037 |                     0 | 0000000000000000000026da3d0aabc84cc20868a847f629b722a1e581c9c12f
 Binance Pool | 2024-12-10 01:33:10.008015 |      317199711 |          874037 |                     0 | 0000000000000000000026da3d0aabc84cc20868a847f629b722a1e581c9c12f
 Poolin       | 2024-12-10 01:33:09.915384 |      317199711 |          874037 |                     0 | 0000000000000000000026da3d0aabc84cc20868a847f629b722a1e581c9c12f
 AntPool      | 2024-12-10 01:32:57.246391 |      317199711 |          874037 |                     0 | 0000000000000000000026da3d0aabc84cc20868a847f629b722a1e581c9c12f
 Binance Pool | 2024-12-10 01:32:57.088351 |      317199711 |          874037 |                     0 | 0000000000000000000026da3d0aabc84cc20868a847f629b722a1e581c9c12f
 Poolin       | 2024-12-10 01:32:56.998516 |      317199711 |          874037 |                     0 | 0000000000000000000026da3d0aabc84cc20868a847f629b722a1e581c9c12f
 AntPool      | 2024-12-10 01:32:45.129636 |      317199711 |          874037 |                     0 | 0000000000000000000026da3d0aabc84cc20868a847f629b722a1e581c9c12f
 Binance Pool | 2024-12-10 01:32:44.967986 |      317199711 |          874037 |                     0 | 0000000000000000000026da3d0aabc84cc20868a847f629b722a1e581c9c12f
 Poolin       | 2024-12-10 01:32:44.880904 |      317199711 |          874037 |                     0 | 0000000000000000000026da3d0aabc84cc20868a847f629b722a1e581c9c12f
 Binance Pool | 2024-12-10 01:32:44.667515 |      317199711 |          874037 |                     0 | 0000000000000000000026da3d0aabc84cc20868a847f629b722a1e581c9c12f
 Poolin       | 2024-12-10 01:32:44.580475 |      317199711 |          874037 |                     0 | 0000000000000000000026da3d0aabc84cc20868a847f629b722a1e581c9c12f
 AntPool      | 2024-12-10 01:32:37.120691 |      317199711 |          874037 |                     0 | 0000000000000000000026da3d0aabc84cc20868a847f629b722a1e581c9c12f
 Poolin       | 2024-12-10 01:32:36.969376 |      317199711 |          874037 |                     0 | 0000000000000000000026da3d0aabc84cc20868a847f629b722a1e581c9c12f
 Binance Pool | 2024-12-10 01:32:36.955785 |      317199711 |          874037 |                     0 | 0000000000000000000026da3d0aabc84cc20868a847f629b722a1e581c9c12f
 AntPool      | 2024-12-10 01:32:31.613235 |      317199711 |          874037 |                     0 | 0000000000000000000026da3d0aabc84cc20868a847f629b722a1e581c9c12f
 Binance Pool | 2024-12-10 01:32:31.447633 |      317199711 |          874037 |                     0 | 0000000000000000000026da3d0aabc84cc20868a847f629b722a1e581c9c12f
 Poolin       | 2024-12-10 01:32:31.360356 |      317199711 |          874037 |                     0 | 0000000000000000000026da3d0aabc84cc20868a847f629b722a1e581c9c12f
 AntPool      | 2024-12-10 01:32:31.11264  |      317199711 |          874037 |                     0 | 0000000000000000000026da3d0aabc84cc20868a847f629b722a1e581c9c12f
 Binance Pool | 2024-12-10 01:32:30.946879 |      317199711 |          874037 |                     0 | 0000000000000000000026da3d0aabc84cc20868a847f629b722a1e581c9c12f
 Poolin       | 2024-12-10 01:32:30.859647 |      317199711 |          874037 |                     0 | 0000000000000000000026da3d0aabc84cc20868a847f629b722a1e581c9c12f

 Braiins      | 2024-12-06 22:34:21.411346 |      328466550 |          873559 |                     0 | 00000000000000000000ba2ab3a02b9de883cd7368bf57da3e04cd2ba3bd04af
 Ultimus      | 2024-12-06 22:34:20.910805 |      328466550 |          873559 |                     0 | 00000000000000000000ba2ab3a02b9de883cd7368bf57da3e04cd2ba3bd04af
 AntPool      | 2024-12-06 22:34:20.810713 |      328460944 |          873559 |                     0 | 00000000000000000000ba2ab3a02b9de883cd7368bf57da3e04cd2ba3bd04af
 Poolin       | 2024-12-06 22:34:20.710726 |      328460944 |          873559 |                     0 | 00000000000000000000ba2ab3a02b9de883cd7368bf57da3e04cd2ba3bd04af
 Braiins      | 2024-12-06 22:34:20.710714 |      328466550 |          873559 |                     0 | 00000000000000000000ba2ab3a02b9de883cd7368bf57da3e04cd2ba3bd04af
 Binance Pool | 2024-12-06 22:34:20.710682 |      328460944 |          873559 |                     0 | 00000000000000000000ba2ab3a02b9de883cd7368bf57da3e04cd2ba3bd04af
 AntPool      | 2024-12-06 22:34:20.710616 |      328460944 |          873559 |                     0 | 00000000000000000000ba2ab3a02b9de883cd7368bf57da3e04cd2ba3bd04af
 Binance Pool | 2024-12-06 22:34:20.610491 |      328460944 |          873559 |                     0 | 00000000000000000000ba2ab3a02b9de883cd7368bf57da3e04cd2ba3bd04af
 Poolin       | 2024-12-06 22:34:20.510439 |      328460944 |          873559 |                     0 | 00000000000000000000ba2ab3a02b9de883cd7368bf57da3e04cd2ba3bd04af
 Ultimus      | 2024-12-06 22:34:20.410317 |      328466550 |          873559 |                     0 | 00000000000000000000ba2ab3a02b9de883cd7368bf57da3e04cd2ba3bd04af
 AntPool      | 2024-12-06 22:34:20.310274 |      328460944 |          873559 |                     0 | 00000000000000000000ba2ab3a02b9de883cd7368bf57da3e04cd2ba3bd04af
 Binance Pool | 2024-12-06 22:34:20.210146 |      328460944 |          873559 |                     0 | 00000000000000000000ba2ab3a02b9de883cd7368bf57da3e04cd2ba3bd04af
 Poolin       | 2024-12-06 22:34:20.110058 |      328460944 |          873559 |                     0 | 00000000000000000000ba2ab3a02b9de883cd7368bf57da3e04cd2ba3bd04af
 Binance Pool | 2024-12-06 22:34:20.009977 |      328460944 |          873559 |                     0 | 00000000000000000000ba2ab3a02b9de883cd7368bf57da3e04cd2ba3bd04af
 Poolin       | 2024-12-06 22:34:20.009938 |      328460944 |          873559 |                     0 | 00000000000000000000ba2ab3a02b9de883cd7368bf57da3e04cd2ba3bd04af
(74 rows)

  1. 00000000000000000001509b28e96d4eba8508a8885e78dc83b60cacdeb985ea ↩︎ ↩︎ ↩︎

  2. 00000000000000000000ba2ab3a02b9de883cd7368bf57da3e04cd2ba3bd04af ↩︎

  3. 0000000000000000000026da3d0aabc84cc20868a847f629b722a1e581c9c12f ↩︎

  4. 00000000000000000002829ecf6967a9729412446dd571de06e02007a3cdc451 ↩︎

  5. 0000000000000000000005eee6163885d621cd0b4e999630d00433b905ac264e ↩︎

  6. 00000000000000000000d9940eb168eb3de849ee1d55da2b15f79db911cbd12c ↩︎

All text and images in this work are licensed under a Creative Commons Attribution-ShareAlike 4.0 International License Creative Commons License

Previous

Image for Fifteen OFAC-sanctioned transactions missing from blocks

January 16, 2025

Fifteen OFAC-sanctioned transactions missing from blocks

My miningpool-observer project aims to detect when Bitcoin mining pools are not mining transactions they could have been mining. Over the past few weeks, it detected fifteen missing transactions spending from OFAC-sanctioned addresses. This post examines whether these transactions were filtered …