Token decentralization on Algorand

Paweł Pierścionek (Urtho)
Nodely
Published in
3 min readJul 23, 2023

Let’s have some fun and use state-of-the-art methods to measure the decentralization index of various tokens on Algorand.

Decentralization Index

Blockchain decentralization metrics are a relatively unresearched area with very few published papers.

One of the recent ones called “SoK: Blockchain Decentralization”¹ introduces an index based on the amount of “randomness ”in transaction value. This index can be calculated using formula (1) where P(vi) denotes the transaction weight concerning the total transaction value.

(1)

Looks scary but is just a sum of 2 to the power of Shannon’s entropy of all transaction values within a chosen time range.

Calculating the index using SQL

With access to Allo.info SelfService BI calculating entropy and the Decentralization Index for native Algo token is as simple as:

SELECT 
date(realtime) day -- daily bins
, pow(2,entropy(amount_dec)) H -- Decentralizaction Index value
, sum(amount_dec) algos -- total Algos transacted
, count() cnt -- total transactions of interest
FROM
mainnet.txn
WHERE
`type` = 'pay' -- only native token transactions
and amount_dec > 0 -- only with non zero value transacted
and realtime >= '2023-01-01' -- only year 2023
GROUP BY 1 -- group into daily bins
ORDER BY 1 -- sort nicely

2 seconds and 160M transactions later we get a chart like below.
The chart has applied 30-day moving average to be in line with the methodology used in the paper.

Algorand native token decentralization index in 2023
A quick real-time behind-the-scenes chart creation

Decentralization of the native token vs…

Let’s proceed to the comparison of Algo to the established cross-chain reference token — the $COOP token.
Is the “most decentralized” token more decentralized than Algo when comparing using state of art methodology?

To get $COOP decentralization index we tweak the SQL a bit:

SELECT 
date(realtime) day -- daily bins
, pow(2,entropy(amount_dec)) H -- Decentralizaction Index value
, sum(amount_dec) COOP -- total $COOP transacted
, count() cnt -- total transactions of interest
FROM
mainnet.txn
WHERE
asset_id = 796425061 -- filter only $COOP TX
and `type_ext` = 'asa_transfer' -- only token transfer TX
and amount_dec > 0 -- only with non zero value transacted
GROUP BY 1 -- group into daily bins
ORDER BY 1 -- sort nicely

Let’s get them both on the same chart and see.

This proves that $COOP is more decentralized than Algo using the latest available research in the field.

Comparing the index of other tokens is left as an exercise for the reader.
Also, we don’t want to dethrone $COOP by being too rigorous😉

--

--