A trojan horse in the Bitcoin Blockchain? OFAC Compliant Blocks

What is OFAC?

https://home.treasury.gov/policy-issues/office-of-foreign-assets-control-sanctions-programs-and-information

The Office of Foreign Assets Control (“OFAC”) of the US Department of the Treasury administers and enforces economic and trade sanctions based on US foreign policy and national security goals against targeted foreign countries and regimes, terrorists, international narcotics traffickers, those engaged in activities related to the proliferation of weapons of mass destruction, and other threats to the national security, foreign policy or economy of the United States.

MARA Pool has began to mine OFAC Compliance Blocks. Marathon Digital Holdings aka MARA Pool website:

So an OFAC compliant block is a block where are excluded transactions coming from countries like Iran, North Korea and Venezuela, as well as transactions coming from addressed tagged as (they started collecting risky addresses from 2018) related to criminal activity.

There is no legal obligation for mining pools to adhere to OFAC regulamentation, so MARA Pool decided on its own to act like this.

Let’s dive a little bit in the blockchain to see with our eyes.In [41]:

# First we import blocksci
import blocksci

# We import Counter from collections, which we will use to count items in the lists we'll create
from collections import Counter

# We instantiate the chain object
chain = blocksci.Blockchain("/BlockSci/config_file")

# We also import other libraries
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
%matplotlib inline
sns.set()

%time 
CPU times: user 3 µs, sys: 2 µs, total: 5 µs
Wall time: 9.06 µs

In [42]:

# The block height of the chain used in this Notebook
print(len(chain))
684743

Let’s check if median fees per block are less in OFAC Compliant blocks, as we expect that, if they have to choose to exclude many transactions this could be a collateral result.

We expect also less transactions per block. Let’s check out also this.In [43]:

ofac_blocks_list = []
sum_fees_ofac_blocks = 0
nr_trans_ofac_blocks = 0


for x in chain :
    if "OFAC" in str(x.coinbase_param) :
        print (" Height:", x.height, "TimeStamp:", x.time,"Fees:", x.fee/1e08)
        ofac_blocks_list.append(x)
        sum_fees_ofac_blocks += x.fee
        nr_trans_ofac_blocks += x.tx_count
         
print("Number of OFAC Compliant blocks found: ", len(ofac_blocks_list)) 
print("Median fee per OFAC block: ", (sum_fees_ofac_blocks/ len(ofac_blocks_list)/1e8), "bitcoin")
print("Median Number of transactions per block (OFAC) ", nr_trans_ofac_blocks / len(ofac_blocks_list))
 Height: 682170 TimeStamp: 2021-05-06 04:50:11 Fees: 0.05095356
 Height: 682472 TimeStamp: 2021-05-07 23:33:02 Fees: 0.46791246
 Height: 682537 TimeStamp: 2021-05-08 08:06:18 Fees: 0.92199734
 Height: 682593 TimeStamp: 2021-05-08 15:41:26 Fees: 0.14279267
 Height: 682816 TimeStamp: 2021-05-09 21:04:43 Fees: 0.96328865
 Height: 682843 TimeStamp: 2021-05-10 01:01:38 Fees: 0.48400948
 Height: 683315 TimeStamp: 2021-05-12 18:33:06 Fees: 0.27102372
 Height: 683394 TimeStamp: 2021-05-13 05:13:57 Fees: 0.04922775
 Height: 683412 TimeStamp: 2021-05-13 07:31:29 Fees: 0.17891398
 Height: 683526 TimeStamp: 2021-05-14 01:06:37 Fees: 0.31408185
 Height: 683596 TimeStamp: 2021-05-14 16:51:02 Fees: 1.03762463
 Height: 683628 TimeStamp: 2021-05-14 20:52:54 Fees: 0.70197438
 Height: 683811 TimeStamp: 2021-05-16 06:27:42 Fees: 0.3664704
 Height: 684152 TimeStamp: 2021-05-19 04:22:49 Fees: 0.74019458
 Height: 684217 TimeStamp: 2021-05-19 17:31:21 Fees: 1.11437835
 Height: 684308 TimeStamp: 2021-05-20 12:05:41 Fees: 1.14902694
 Height: 684329 TimeStamp: 2021-05-20 16:41:38 Fees: 1.16243244
 Height: 684509 TimeStamp: 2021-05-22 09:09:06 Fees: 0.79709421
 Height: 684550 TimeStamp: 2021-05-22 14:48:11 Fees: 0.90005206
 Height: 684621 TimeStamp: 2021-05-23 05:57:14 Fees: 0.32440476
Number of OFAC Compliant blocks found:  20
Median fee per OFAC block:  0.6068927104999999 bitcoin
Median Number of transactions per block (OFAC)  1731.9

Now let’s have a look at non-OFAC Compliant blocks within about the same period of time.

We choose a timeframe that has the first and the last OFAC compliant blocks mined.In [44]:

non_ofac_blocks_list = []
sum_fees_no_ofac_blocks = 0
nr_trans_non_ofac_blocks = 0
median_fees_ofac_blocks = 0
median_fees_non_ofac_blocks = 0

for i in range(682170, 684621) :
    if not "OFAC" in str(x.coinbase_param) :
        sum_fees_no_ofac_blocks = sum_fees_no_ofac_blocks + chain[i].fee
        non_ofac_blocks_list.append(x)
        nr_trans_non_ofac_blocks += chain[i].tx_count
        
median_fees_ofac_blocks = (sum_fees_ofac_blocks/ len(ofac_blocks_list)/1e8)
median_fees_non_ofac_blocks = (sum_fees_no_ofac_blocks / len(non_ofac_blocks_list))/1e8
        
print("Number of OFAC Compliant blocks found: ", len(non_ofac_blocks_list)) 
print("Median fee per non OFAC block: ", sum_fees_no_ofac_blocks / len(non_ofac_blocks_list)/1e8, "bitcoin")
print("Median Number of transactions per block (non- OFAC) ", nr_trans_non_ofac_blocks / len(non_ofac_blocks_list))
print("Non OFAC blocks have median ", (((nr_trans_non_ofac_blocks / len(non_ofac_blocks_list)) / (nr_trans_ofac_blocks / len(ofac_blocks_list))) * 100), " more transactions per block")
print("And median more", ((median_fees_non_ofac_blocks - median_fees_ofac_blocks)), " bitcoin fees per block.")
Number of OFAC Compliant blocks found:  2451
Median fee per non OFAC block:  0.6209062381476949 bitcoin
Median Number of transactions per block (non- OFAC)  1813.65401876785
Non OFAC blocks have median  104.72048148090825  more transactions per block
And median more 0.014013527647694923  bitcoin fees per block.

So, there is a slight difference between fees per block, and there is slight difference in median number of tx_count.

We can then say that OFAC compliance impacts fees and optimization of the blockchain.In [45]:

# Let's print the description of coinbase_param
for y in ofac_blocks_list :
    print(y.coinbase_param)
b'\x03\xbah\n8\\ MARA Pool - OFAC Compliant Block \\\x00\x00\x00\x00\x08A\x9e\x07\x14[\xe7\xc6\xa5\xdd.\x96\xdc\xc9\x00\x00'
b"\x03\xe8i\n8\\ MARA Pool - OFAC Compliant Block \\\x00\x00\x00\x004$\x91W\xb7'+4\xc8\x13\xe98\xb5\x13\x01\x00"
b'\x03)j\n8\\ MARA Pool - OFAC Compliant Block \\\x00\x00\x00\x00\xe9i\xf6\xe52\x8c\x02\xa1\xc8\x13\xf9nO:\x01\x00'
b'\x03aj\n8\\ MARA Pool - OFAC Compliant Block \\\x00\x00\x00\x00\xa3\xc8$%\xe7\x82\x99\xd0\x06\x03:a\x00\xd4\x05\x00'
b'\x03@k\n8\\ MARA Pool - OFAC Compliant Block \\\x00\x00\x00\x00\xc2\xa1\xd8\x85\x18o\x88\xc7Fq$w\x18\x10\x01\x00'
b'\x03[k\n8\\ MARA Pool - OFAC Compliant Block \\\x00\x00\x00\x00\x0fm\xde\x8f\xc0\xf0\x06\xe5\x06\x034\x9c\x02^\x01\x00'
b'\x033m\n8\\ MARA Pool - OFAC Compliant Block \\\x00\x00\x00\x00\xf4\xda\x13hF\xa0\xddh\xb6\xb4\x14&\xeb\xd1\x00\x00'
b'\x03\x82m\n8\\ MARA Pool - OFAC Compliant Block \\\x00\x00\x00\x00f@h\xb9\xf7\xcdd\xba\xb6\xb4\x12\xc4\\b\x01\x00'
b'\x03\x94m\n8\\ MARA Pool - OFAC Compliant Block \\\x00\x00\x00\x00\x10\x04a\xdf\xe4\xe5>\x86\xb6\xb4\x1b\x976m\x00\x00'
b'\x03\x06n\n8\\ MARA Pool - OFAC Compliant Block \\\x00\x00\x00\x00%k\\$\xf8y\xee\xb8Fq e\xbf\xdd\x00\x00'
b'\x03Ln\n8\\ MARA Pool - OFAC Compliant Block \\\x00\x00\x00\x00:L\xd1O\xf3\x10\xbd\xe9\x1d\xea\xa5\xdbQ\xfd\x00\x00'
b'\x03ln\n8\\ MARA Pool - OFAC Compliant Block \\\x00\x00\x00\x00o\x82c*\x1fz7\x7f\xc4\xa3\x9e\x84\xea<\x01\x00'
b'\x03#o\n8\\ MARA Pool - OFAC Compliant Block \\\x00\x00\x00\x002\xb0\x0c^\x8f\xabu\xfb5\x98\xef3\xe9\x08\x01\x00'
b'\x03xp\n8\\ MARA Pool - OFAC Compliant Block \\\x00\x00\x00\x00\xd2\x8f\rd\x99A\x00\xdb\xff\xb6\xa7\xdc\x0c4\x00\x00'
b'\x03\xb9p\n8\\ MARA Pool - OFAC Compliant Block \\\x00\x00\x00\x00lz\xeb\xc2*\xc3=d\xdd\xa2@\xaeXK\x01\x00'
b'\x03\x14q\n8\\ MARA Pool - OFAC Compliant Block \\\x00\x00\x00\x00\xcd\xd5{1\x079u\x955\x98\xeb\x88\xb4Q\x01\x00'
b'\x03)q\n8\\ MARA Pool - OFAC Compliant Block \\\x00\x00\x00\x00Y\x90\x0f\xe3\x16j\x8a-5\x98\xfb\x13\xc9\x85\x11\x00'
b'\x03\xddq\n8\\ MARA Pool - OFAC Compliant Block \\\x00\x00\x00\x00\xc4\xd7\x12N\x0c\xd0R\x9c\xdd\xa2N\x06\x01\x04\x01\x00'
b'\x03\x06r\n8\\ MARA Pool - OFAC Compliant Block \\\x00\x00\x00\x00\t(6\xb9\xf3\x18\xac\xc3\x8f3\x9c1z\xad\x00\x00'
b'\x03Mr\n8\\ MARA Pool - OFAC Compliant Block \\\x00\x00\x00\x00\xfePK\n\x9c|r\xfbV1\xecT\xd6Z\x01\x00'

What could happen if all blocks of Bitcoin Blockchain would be or would be forced to be OFAC compliant? If the USA would go this way, well, there would be many other countries that would not adhere, and probably this scenario shouldn’t impact Bitcoin, it would only impact mining and mining pools in the USA.

But nevertheless it is a kind of threat to bitcoin fungibility. Cash has the highest level of fungibility than every other way we have to transfer value. If you receive cash, you own that cash and it is always fungible, also if the same note has been used for a drug deal.

And chances it has been used for something illegal, during its lifespan, are high.

If all bitcoins would be traceable, the idea at its core of a “peer to peer cash system” as originally conceived, would be in big trouble, as one of its core characteristics as censorship-resistance would be attacked.

Should we worry?

As long as MARA Pool is still the only volunteer in this kind of new adventure, it’s improbable that this will affect bitcoin at all.

Despite the narrative that wants blockchain analysis through heuristics techniques capable of tracking every transaction and every single entity IRL, the truth is that it is not possible.

If a malicious user makes use for i.e. of conjoined transactions, decentralized exchanges or cross chain movements to hide himself it’s very hard if not impossbile to trace.

It’s also true that if a criminal uses bitcoin he needs to be very careful to protect his anonimity. He’d definitely better use cash, as usually is used for criminal activities.

In fact there are many systems at different levels that can be used to track you down, not blockchain analysis alone.

On the other side, someone noted that the blocks OFAC Compliant are not really that compliant, and declared that two of the transactions included in the first OFAC Compliant block belonged to addresses previously associated with darknet market Hydra.

After that block was mined, iranian entities and other entities around the world started sending bitcoins to wallets “OFAC-Compliant” of this block. The result is that now that these “clean” wallets now are no more OFAC compliant. That’s the other side of the coin.

Pretty funny.

If you want to join the fray and start exploring blockchain, join us at plutohash.com/beta

Have a nice day and don’t forget to smile!In [ ]:

 

Leave a Comment

Your email address will not be published. Required fields are marked *