• The Flip
  • Posts
  • Caller ID for Blockchain Addresses

Caller ID for Blockchain Addresses

Flipside Labels and how we use Subgraphs to get them right!

Caller ID for blockchains

We have a lot of labels…

You’re checking your transaction history and see you received USDC from 0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640. Not super useful right?
What happened?

You’ve heard of Ethereum Name Service (ENS). But this address doesn’t seem to have one of the NFTs for identifying itself.

You have a few options: maybe you check Etherscan, or have a glassnode subscription.

For data analysts, the easiest option might actually be Flipside Crypto!

Labels identity on-chain addresses with human readable descriptions and categorization. Flipside uses Labels to enhance analytic capabilities by de-anonymizing addresses that belong to major protocols (or exchanges or bridges or other).

We consolidate labels across blockchains, protocols, and communities to identify addresses, such as this one, to be interpretable for analysis.

0×88….640 is is a Uniswap 'USDC/WETH pool' on Ethereum mainnet. More specifically, this is the Uniswap v3 USDC/WETH 0.05% fee tier liquidity pool. Don’t ask us about v4 yet 🤣. Since labels are unique identifiers, known addresses only get one label.

We won’t talk about tags in this piece, but when you wonder the difference between a label and a tag - remember labels are 1:1 and tags (e.g., you as a likely Uniswap trader) are 1:many.

Where do labels come from?

We source our labels from a variety of places: defillama, manually from protocols, reports from central exchanges, etc. One of the common places are Subgraphs. These are a product of The Graph, which provide an industry standard on how to access blockchain data via open APIs. There are subgraphs for governance, ENS, dex/defi liquidity pools and more! Many protocols leverage custom built subgraphs to track activity within their ecosystem.

Since these subgraphs are open, we can also tap into the data and label contract addresses! Predominantly, we focused on dex and defi protocols, in order to find any liquidity pools that belong to each protocol.

In order to be able to tap into these open APIs we leverage Flipside Crypto's LiveQuery capabilities, which allows us to call an API within our SQL statements.

For more information revolving around the LiveQuery basics, check out our previous Beehive article, which summarizes and provides examples of different ways to use LiveQuery, or check out our docs.

Why does Flipside use Subgraphs, and how are their labels any different?

Flipside uses subgraphs for labels because of their accuracy and consistency. A protocol subgraph is often built by the protocol itself and is used to monitor things like TVL, swap amounts, etc. for their internal analytics. We want to ensure that our labels are in sync with the information that these protocols have and have provided openly to others.

While it’s true we could go directly to on-chain data, to find all the pools the Uniswap factory contract deployed; they don’t necessarily put human readable names on-chain the way they do in their protocol subgraph.

Curating labels tables allows analysts to easily join against our existing chain data to provide clarity around address names.

Flipside also adds label_type and label_subtype identifications on top of what is provided by the subgraphs! For example, the table above provides a sample response calling the Ethereum Uniswap V3 Subgraph.

We see that the address '0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640' is a Uniswap 'USDC/WETH pool'. We make this a little more explicit by labeling that address with the name, the protocol, and add in label_type and subtype. In this example, we would label the type as 'dex' and subtype as 'pool'.

These label types and subtypes allow for users to further segment our labels! If a user is only interested in dex pools, a user could filter down to only those, and return pools across multiple protocols (uniwap, sushiswap, etc.). This is much easier than having to manually specify every dex in an analysis.

What Subgraphs does Flipside use?

Flipside uses only trusted subgraphs for their labels. We use subgraphs that are created by the actual protocol (ie. Uniswap creating a Uniswap subgraph), as well as trusted subgraphs from research firms like Messari.

All of these subgraphs are compiled and scanned for new labels every day! In total we are scanning over 400 subgraphs, including many of the top defi protocols, to ensure that we have complete and accurate labels.

Where are these labels stored?

All subgraph labels are stored both in the crosschain.core.address_labels table, which holds all labels for all chains, and in the relevant [blockchain].core.dim_labels table.

These labels can easily be joined to a query to provide clarity and context around addresses!

Links for more

For an interactive write up, with code snippets, outputs, and a complete list of subgraphs we use, visit here.
For a reproducible example with code, visit our github.

Have questions? Want to meet other crypto analysts? Join our discord community & check out the show-and-tell!