Search
4.4 Market Share

The following part visualizes the share of the crytocurrency's market among the addresses of the blockchains. The data has been collected by Blockchair's database dumps which provided us with information about the balance of each of the addresses. The data itself reveals some interesting facts about the distribution of the coins among the addresses.Speaking of it, the top 0.007% Bitcoin cash addresses hold 50% of the coins in circulation. Same applies for the top 0.0063% Litecoin addresses which represents slighlty greater concentration of coins on top. Bitcoin seems to be having the most "equal" distribution of the three, having the top 0.013% addresses hold half the capital. The data shows that, as expected, Bitcoin has the most active addresses (over 31 milion), followed by Bitcoin Cash(>16 milion) and Litecoin comming last with two and a half milion addresses.

Plot

This plot represents the number of addresses(on y axis) that hold the first x percent of the total number of coins. The percentages are shown on the x axis. The marker size on the other hand and it's color share the same dimension which is the average number of coins that are held by each address if the distribution among that particular group was to be uniform. For example, if the top richest 100 addresses hold the first 5% of the wealth (which is let's say 4 milion coins), that means that, on average, each address in this group owns 20 000 coins. The marker's size and color will be scaled with respect to this number. You can click on the toggle button to expand the code for the plot.

import pandas as pd
import numpy as np
import plotly.graph_objects as go
import tabulate
import plotly.tools as tls
from plotly.offline import plot, iplot, init_notebook_mode
from IPython.core.display import display, HTML
init_notebook_mode(connected = True)
config={'showLink': False, 'displayModeBar': False}

percentage = [5,10,20,30,40,50,60,70,80,90,100]


def open_csv():
    df = []
    df.append(pd.read_csv('bitcoin_addresses.tsv', delimiter ="\t"))
    df.append(pd.read_csv('cash_addresses.tsv',delimiter = "\t"))
    df.append(pd.read_csv('litecoin_addresses.tsv',delimiter = "\t"))
    return df 


def calculate_cap(total_sum):
    
    a =[]
    for value in percentage:
        a.append(total_sum*value/100)
    return a


def accurate_wealthPerAddress(df, margins):
    a = np.zeros(11)
    for i in range(0,11):
        if(i is 0):
            a[i] = df['balance'][0:margins[i]].sum()/(margins[i])
        else:
             a[i] = df['balance'][margins[i-1]:margins[i]].sum()/(margins[i]-margins[i-1])
    return a

def calculate_margin(df,values_percentage):
    count = np.zeros(11)
    summ = np.zeros(10)
    for ad_balance in df['balance']:
        
        if(values_percentage[9]>=summ[9]+ad_balance):
            summ[9]+=ad_balance
            count[9]+=1
        else:
            break
        if(values_percentage[8]>=summ[8]+ad_balance):
            summ[8]+=ad_balance
            count[8]+=1
        else:
            continue
        if(values_percentage[7]>=summ[7]+ad_balance):
            summ[7]+=ad_balance
            count[7]+=1
        else:
            continue
        if(values_percentage[6]>=summ[6]+ad_balance):
            summ[6]+=ad_balance
            count[6]+=1
        else:
            continue
            
        if(values_percentage[5]>=summ[5]+ad_balance):
            summ[5]+=ad_balance
            count[5]+=1
        else:
            continue
        if(values_percentage[4]>=summ[4]+ad_balance):
            summ[4]+=ad_balance
            count[4]+=1
        else:
            continue
            
        if(values_percentage[3]>=summ[3]+ad_balance):
            summ[3]+=ad_balance
            count[3]+=1
        else:
            continue
        if(values_percentage[2]>=summ[2]+ad_balance):
            summ[2]+=ad_balance
            count[2]+=1
        else:
            continue
        if(values_percentage[1]>=summ[1]+ad_balance):
            summ[1]+=ad_balance
            count[1]+=1
        else:
            continue
        if(values_percentage[0]>=summ[0]+ad_balance):
            summ[0]+=ad_balance
            count[0]+=1
        else:
            continue
    
    count[10] = len(df)
    return count

df = open_csv()
total_satoshis = np.zeros(3)
total_coins = np.zeros(3)
values_percentage = []
margins =[]
satoshis_per_ad = []
bitcoins_per_ad =[]

for i in range(0,3):
    total_satoshis[i] = df[i]['balance'].sum()
    total_coins[i] = total_satoshis[i]/100000000
    values_percentage.append(calculate_cap(total_satoshis[i]))
    margins.append(calculate_margin(df[i],values_percentage[i]).astype(int))
    satoshis_per_ad.append(accurate_wealthPerAddress(df[i], margins[i]))
    bitcoins_per_ad.append(satoshis_per_ad[i]/100000000)
    
    
df2 = []
df2.append(pd.DataFrame(list(zip(percentage[0:10],margins[0][0:10],satoshis_per_ad[0][0:10],bitcoins_per_ad[0][0:10],np.log10(satoshis_per_ad[0][0:10]))), columns =['Percentage of total amount of Bitcoins','Number of Addresses',
                                                                                 'Satoshis per Address', 'Average number of Bitcoins per Address','Log10Satoshis']))

df2.append(pd.DataFrame(list(zip(percentage[0:10],margins[1][0:10],satoshis_per_ad[1][0:10],bitcoins_per_ad[1][0:10],np.log10(satoshis_per_ad[1][0:10]))), columns =['Percentage of total amount of Bitcoin Cash Coins','Number of Addresses',
                                                                                 'Satoshis per Address', 'Average number of Bitcoin Cash coins per Address','Log10Satoshis']))

df2.append(pd.DataFrame(list(zip(percentage[0:10],margins[2][0:10],satoshis_per_ad[2][0:10],bitcoins_per_ad[2][0:10],np.log10(satoshis_per_ad[2][0:10]))), columns =['Percentage of total amount of Litecoins','Number of Addresses',
                                                                                 'Satoshis per Address', 'Average number of Litecoins per Address','Log10Satoshis']))


##a = np.append(satoshis_per_ad[0][0:10],satoshis_per_ad[1][0:10])
##a = np.append(a,satoshis_per_ad[2][0:10])

##b = np.append(bitcoins_per_ad[0][0:10].astype(int),bitcoins_per_ad[1][0:10].astype(int))
##b = np.append(b,bitcoins_per_ad[2][0:10].astype(int))

##a.sort()
##b.sort()

##a_new = (np.append(a[0],a[28]))
##b_new =np.append(b[0],b[28])


import plotly.express as px
import plotly.graph_objects as go

fig = px.scatter( df2[0], x = 'Percentage of total amount of Bitcoins', y = 'Number of Addresses',size = 'Average number of Bitcoins per Address',
                 size_max = 100, color = 'Log10Satoshis',hover_data = {
                     'Percentage of total amount of Bitcoins':True,
                     'Number of Addresses':True,
                     'Satoshis per Address':False,
                     'Average number of Bitcoins per Address':True,
                     'Log10Satoshis':False})


fig2 = px.scatter(df2[1], x = 'Percentage of total amount of Bitcoin Cash Coins', y = 'Number of Addresses',size = 'Average number of Bitcoin Cash coins per Address',
                 size_max = 100, color = 'Log10Satoshis',hover_data = {
                     'Percentage of total amount of Bitcoin Cash Coins':True,
                     'Number of Addresses':True,
                     'Satoshis per Address':False,
                     'Average number of Bitcoin Cash coins per Address':True,
                     'Log10Satoshis':False})


fig3 = px.scatter(df2[2], x = 'Percentage of total amount of Litecoins', y = 'Number of Addresses',size = 'Average number of Litecoins per Address',
                 size_max = 100, color = 'Log10Satoshis',hover_data = {
                     'Percentage of total amount of Litecoins':True,
                     'Number of Addresses':True,
                     'Satoshis per Address':False,
                     'Average number of Litecoins per Address':True,
                     'Log10Satoshis':False})
fig.add_trace(fig2.data[0])
fig.add_trace(fig3.data[0])


fig.add_trace(go.Scatter(showlegend = False,line=dict(color='Gray',width = 0.5), mode = 'lines', hoverinfo='skip' ,x = df2[0]['Percentage of total amount of Bitcoins'], y = df2[0]['Number of Addresses'], marker = dict(size = 0,symbol = 'circle-open') ))


fig.add_trace(go.Scatter(showlegend = False,line=dict(color='Gray',width = 0.5), mode = 'lines', hoverinfo='skip' ,x = df2[1]['Percentage of total amount of Bitcoin Cash Coins'], y = df2[1]['Number of Addresses'], marker = dict(size = 0,symbol = 'circle-open') ))

fig.add_trace(go.Scatter(showlegend = False,line=dict(color='Gray',width = 0.5), mode = 'lines', hoverinfo='skip' ,x = df2[2]['Percentage of total amount of Litecoins'], y = df2[2]['Number of Addresses'], marker = dict(size = 0,symbol = 'circle-open') ))


fig.update_layout(plot_bgcolor='rgb(255,255,255)',coloraxis_colorbar=dict(
    title="Coins per address",
    #tickvals=np.log(a_new)/np.log(10),
    #ticktext=b_new,
    tickvals=[3,4],
    ticktext=[4,5],
),
                 
                 updatemenus=[
                    dict(
                        active=0,
                        buttons=list([
                       
                            dict(label="Bitcoin",
                             method="update",
                             args=[{"visible": 
                            [True,False,False,True,False,False]},
                               {"title": "",
                                'xaxis': {'title': 'Percentage of total amount of Bitcoins'}}
                                  ]),
                            
                        dict(label=" Bitcoin Cash",
                             method="update",
                             args=[{"visible": 
                                  [ False, True, False, False,True,False]},
                                  {"title": "",
                                   'xaxis': {'title': 'Percentage of total amount of Bitcoin Cash Coins'  },
                                   'layout':{'coloraxis_colorbarlorbar':{'title':'mora da rabotish'}}}
                                  
                                  
                                   
                                ]),
                            dict(label="Litecoin",
                             method="update",
                             args=[{"visible": 
                            [False,False,True,False,False,True]},
                               {"title": "",
                                'xaxis': {'title': 'Percentage of total amount of Litecoins'}}
                                  ])
                        
               
            ]),
                       
                        
        )
]
                 
                 )




plot(fig, filename = 'fig.html', config = config)


display(HTML('fig.html'))

Top 10 richest addresses

Here you can see the top 10 richest addresses for each of the three cryptocurrencies along with their amount converted in Euros.

  • Bitcoin
df[0]['Balance in Bitcoin'] = (df[0]['balance']/100000000).astype(int)
df[0]['Balance in Euros (as of 25.08)'] = (df[0]['Balance in Bitcoin'].astype(float)*9968.88)

df[1]['Balance in Bitcoin Cash'] = (df[1]['balance']/100000000).astype(int)
df[1]['Balance in Euros (as of 25.08)'] = (df[1]['Balance in Bitcoin Cash'].astype(float)*246.57).astype(int)

df[2]['Balance in Litecoin'] = (df[2]['balance']/100000000).astype(int)
df[2]['Balance in Euros (as of 25.08)'] = (df[2]['Balance in Litecoin'].astype(float)*52.64).astype(int)
display(df[0][0:10])
address balance Balance in Bitcoin Balance in Euros (as of 25.08)
0 35hK24tcLEWcgNA4JxpvbkNkoAcDGqQPsP 24750216273241 247502 2.467318e+09
1 37XuVSEpWW4trkfmvWzegTHQt7BdktSKUs 9450583011622 94505 9.421090e+08
2 34EiJfy4jGF32M37aQ2ZobupwiRQWa1Siy 9285724542912 92857 9.256803e+08
3 1FeexV6bAHb8ybZjqQMjJrcCrHGW9sb6uF 7995720409076 79957 7.970817e+08
4 34xp4vRoCGJym3xR7yCVPFHoCNxv4Twseo 7343627937695 73436 7.320747e+08
5 3D8qAoMkZ8F1b42btt2Mn5TyN7sWfa434A 7000000510028 70000 6.978216e+08
6 1HQ3Go3ggs8pFnXuHVHRytPCq5fGG8Hbhx 6937022262842 69370 6.915412e+08
7 37tRFZw7n94Jddq6TfVs3MbCXmDX6eMfeY 6810156627201 68101 6.788907e+08
8 3JurbUwpsAPqvUkwLM5CtwnEWrNnUKJNoD 6523671374275 65236 6.503299e+08
9 bc1qgdjqv0av3q56jvd82tkdjpy7gdp9ut8tlqmgrpmv24... 6000099680141 60000 5.981328e+08
  • Bitcoin Cash
display(df[1][0:10])
address balance Balance in Bitcoin Cash Balance in Euros (as of 25.08)
0 pq47a3s9exn9zt64l6f66an48cj0eptekq3vk6udg0 50529597466999 505295 124590588
1 qrcjhhcj0uha0w578m8wx95qus4q40q7d59sqshx60 34051313437823 340513 83960290
2 qr49k67fr3hxtfyx6dzlh9g5qup5r9ds0squ3cc86c 12193369703094 121933 30065019
3 qq8pfj2k27mtfajst06sf0tckfhg3ly0jcrnqqhuav 10310872839808 103108 25423339
4 qp24ldl0pf0qls58mpw493nhwtqd69w89yrmprwgg9 10090301704755 100903 24879652
5 pp0d2x8zlwrxgq89hpdvch20r8674z07ruzwnjeknz 10025150746340 100251 24718889
6 qqlcn8wzxaptplen45lu87zj2gcu3pdp2qn6uq5y3c 8999800001094 89998 22190806
7 qrudk3j5peervw3pwwjnyqy4gg3r24ycncnams97s3 8647028322126 86470 21320907
8 qqa0dwrk79um6wgmzk9rrv303l2qwppuk5vmr8taqq 8614395434471 86143 21240279
9 qp2splh3ewgtrphluqmsa2cdtvg3y3ewmya2f2784a 8000499939140 80004 19726586
  • Litecoin
display(df[2][0:10])
address balance Balance in Litecoin Balance in Euros (as of 25.08)
0 M8T1B2Z97gVdvmfkQcAtYbEepune1tzGua 243111837145205 2431118 127974051
1 MBuTKxJaHMN3UsRxQqpGRPdA7sCfE1UF7n 164439981782634 1644399 86561163
2 LQTpS3VaYTjCr4s9Y1t5zbeY26zevf7Fb3 93629317432409 936293 49286463
3 MEpUjw993LuMqZaKAiq8fBXpQNZfdQyfSg 69599995577775 695999 36637387
4 ltc1qffu0ldxh7s94jfjncd0t2deha62ampgfehllla 57650000617510 576500 30346960
5 MD4Q9gLQ7Cv1ZCqwFi33SezVFGomja8r9f 51622003367347 516220 27173820
6 LNSFU7hmF6GP2AFdcrCgd4QvFimvspviSs 48800098659341 488000 25688320
7 MNcY4kMj8QqwS8vxsiy6MskisgDXV2Yf6j 40000000000000 400000 21056000
8 LUbbueEvw9pu1gta5A4K2mewmyEFx381Cq 36898038632400 368980 19423107
9 LZMb93uutjNyRbC3AgjSRLMtVchgeTiXvd 35250000000000 352500 18555600