AARRR!!!  Pirate Metrics on Ethereum

Webster Cook Jan 16, 2022

The exponential growth of DeFi in 2021 produced Dapps with millions of users.  In this rapidly maturing industry, stakeholders need meaningful customer analytics.  Successful methodologies exist within the SaaS industry such as Dave McClure's well-known Pirate Metrics (a.k.a AARRR funnel):

The model enables us to understand what metrics and channels to look at for each stage of users' journey to becoming a repeat customer and referrer of the brand.  Applying these concepts in the DeFi space requires development of on-chain analytical methods for measuring each step of the funnel.

This article proposes a basic foundation for Defi growth metrics built on the Ethereum data model.  In particular, it extends the concept of a web analytics session to wallet interactions with smart contracts.  This complements traditional web analytics by allowing us to connect user sessions occurring over time.

Sessions

In traditional web analytics it’s common to model user activity in a hierarchical events structure consisting of sessions, pageviews, and events:

Events occurring within 30 minutes of one another are grouped into "sessions".  With modern single-page applications, we usually have a series of events within a single pageview.  Although web analytics events are available from Dapps, on-chain events help us better understand user acquisition, retention, and revenue over time.

In the case of Ethereum on-chain events, we have transactions and corresponding "traces".  The traces log actions modifying the internal state of the EVM.  And have types such as "create", "call", "suicide", etc.  “Call traces” log calls to smart contract functions.  And the actions they trigger form call trees:

The initial interaction between a user wallet and contract can be referred to as a “top-level call” or “root call trace”.   And we can roll-up sequences of these events into an “Ethereum session”:

We added these sessions to the public BigQuery dataset for Ethereum.  The table identifier is bigquery-public-data.crypto_ethereum.sessions:

Using it for growth metrics

We can leverage this base sessions dataset to measure funnel steps such as acquisition and activation.  For example, the new vs returning users on OpenSea:

Then if we group the new users into weekly cohorts, we can observe retention using a classic heatmap:

The chart and pivot above were built using this Google Data Studio template. It will allow you to view the same metrics for any contract.  Feel free to contact us for assistance blending these on-chain metrics with your Google Analytics data.  Or for a custom revenue analysis of your Dapp.