Token decentralization onĀ Algorand

Token decentralization onĀ Algorand

Urtho
Urtho

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šŸ˜‰


[1]: Zhang, Luyao, Xinshi Ma, and Yulin Liu. ā€œSoK: Blockchain Decentralization.ā€ arXiv preprint arXiv:2205.04256 (2022).