News Technology

Google makes public blockchains easily searchable

Query blockchain data

Yesterday Google announced it has extended the number of public blockchains which are now fully searchable using BigQuery. In February of last year, Google loaded the data for Bitcoin and in August for Ethereum. It now includes Bitcoin Cash, Dash, Dogecoin, Ethereum Classic, Litecoin, and Zcash.

Most blockchains are a log of transactions. It’s not too hard to find individual transactions, addresses and blocks using easy web tools. But if you want to run a bulk query or a conventional database query, loading the blockchain into a database will make queries faster. Public blockchains are enormous, so that’s painful. Hence Google has loaded them into a public dataset that’s automatically updated nightly. Anyone who knows how to use SQL can now query the database for a small charge.

So what?

Having a database version of a blockchain could be useful for numerous purposes. The obvious ones are running analytics or forensics on questionable users. One of the most interesting ones is the ability to analyze smart contracts.

Last year a smart contract bug in the Parity Wallet for Ethereum meant the contract could self destruct. This resulted in the loss of $156m at the time, of which $93m was from the Parity-affiliated Polkadot ICO. Tomasz Kolinko used the Google dataset to run bulk queries on smart contracts which would otherwise have been very slow. In just 23 seconds he found 700 live contracts that potentially have open self-destructs similar to the Parity wallet.

Kolinko has written a tool which can query all sorts of smart contract features and vulnerabilities. He wrote on his blog that “this is the most inspiring and scary tool I have ever written. Given a vulnerability, one can write a scanner … and immediately get a list of all the active contracts with that vulnerability.” The only problem is the tool is also available to those less well-intentioned.

Kolinko continued: “It also makes one wonder how to do reasonable exploit disclosure in this case — obviously, finding contracts that have any significant ether or traffic attached to them, and then finding their owners seems the right thing to do.”

Interesting findings

Another useful application is the ability to find user balances. With Bitcoin, it’s easy to see transactions but difficult to view balances. Google even provided a sample query that shows balances for Bitcoin. And once you have account balances, you can start looking at ownership.

Google ran Gini coefficient analysis to see how concentrated the ownership of cryptocurrencies is. For example, the ownership of ether is more concentrated than Bitcoin. And Bitcoin Cash has a relatively concentrated ownership compared to Bitcoin.

And one can even run queries across different blockchains.

As awareness spreads, all sorts of analysis should become more broadly available.

Image Copyright: Pixinoo / BigStock Photo