Back to blog

Built on Nevermined — DeFi Data Marketplace

Access Credits

4 min read

Using standardized data to compare user retention in several Dex protocols

At Nevermined, we leverage the power of NFT tech to add utility to digital assets. That’s a broad vision, with massive applicability, we know.

So, sometimes we put Nevermined to work in partnerships that help us build the Dapps that explore the possibilities of our tech stack.

One such solution that has come to fruition and is developing into an actual product is DeFi Data Marketplace. We’re happy to put it in the spotlight, because it leverages the power of our Tokenization Engine in 2 ways:

  • It turns on-chain DeFi data into standardized assets that can be analyzed, queried and injected with utility.
  • It turns analyst reports into monetizable and Web3-compatible assets.
5D — The Value Proposition of DeFi Data Marketplace

So what is DeFi Data Marketplace?

DeFi Data Marketplace is the first decentralized marketplace for structured data from DeFi protocols across several networks.

With this marketplace, analysts (think traders, quants and data scientists) have a simpler path to creating actionable insights on top of datasets that have been hard to work with in the past. And from this creation of insights comes the ability to commercialize their work.

The marketplace allows downloading structured and normalized datasets without having to deal with all the complex tasks to retrieve data from DeFi protocols, understanding all the different ways this data can be stored on-chain.

In this marketplace users can find analysis-ready datasets. These datasets contain different events triggered by users in DeFi protocols, organized in different categories to create easy to analyze data.

Right now the marketplace provides data from Lending and Decentralized exchanges protocols, but more types of protocols will be added to support all the common entities that can be analyzed.

A DeFi Data Marketplace use case — Analyzing user behavior in Dex protocols

To show you the power of this Dapp, let’s do a deep dive into how you can use DeFi Data Marketplace to compare user retention in several Dex protocols. For this example, we’re going to focus on Uniswap, the largest and most active decentralized exchange in the Defi space, and we will explore:

  • how Uniswap users interact with the exchange
  • measure which kind of users are contributing to Uniswap’s revenue
  • what type of insights this data could provide

After that we will be able to compare Uniswap with other DEXs, using the same analysis, as all the data that we are going to use is standardized and can be analyzed using python.

Step 1 — Getting the data

In order to get the data, we will use a python library that leverages the Nevermined protocol to get all the data structured for us and download it in ready-to-analyze datasets.

First, we need to download the library using pip

Once the library is downloaded, we can start downloading datasets. For this analysis we are going to explore data from Uniswap v3 on the Ethereum blockchain so we can download the data using:

Once the data is downloaded we can join all the files and create a dataset.

Once this dataset is created, we can start digging into the data.

Step 2 — Classifying users

Some of the first queries we can apply to this dataset are about which type of users are interacting with this protocol, the size of their orders, and how often they use the protocol to trade.

All these rows have a field that represents the total amount that was traded in USD dollars. With this number we can group by user and get the median size of the trade in this period. Once we have this aggregation we can plot a histogram and see how the users are distributed.

Also, by grouping by date, we can see that some users are very active, sending several hundred trades per day, while others are trading occasionally. Looking at these addresses we can find some MEV bots.

Step 3 — Measuring retention

In order to measure the retention of the users we can create a cohort analysis measuring how the users interact with the protocols after a period of time. In this case, we will group the interactions on a monthly basis and see the retention in the following months.

This script returns a retention matrix, where we can see the percentage of the users that repeat a trade each month after the first trade.

Step 4 — Comparing protocols

One of the best things about having standardized data is that we can reuse our analysis to get insights into other protocols or into the same protocol in another blockchain. For example, running the same notebook but with the Polygon blockchain, we get different results.

Step 5 — Publishing results

Another cool feature of the DeFi Data Marketplace is that you will be able to publish — and monetize — your reports. While accessing DeFi data from all protocols and creating reports is free, monetizing your reports requires an Analyst subscription (which will be launched soon).

In addition to that, there is a free Community tier, where you can publish reports for other users to download without a fee.

The notebook we highlighted in this article can be found in the marketplace here.


We wanted to show how easy it is to download structured DeFi data and create reports using python and pandas. With this standardized data, any data scientist can do their own analysis and share it with the community using traditional tools and monetize their reports.

We also wanted to make a case for the opportunities Nevermined offers to Dapp builders. Our platform includes advanced functionalities to unleash the utility that’s currently locked into digital assets. From Financial functionalities and Access Functionalities to Storage and Compute functionalities: our SDK has a lot to offer.

And we’d love to hear from you. Got any questions, suggestions or want to chat about your project? Contact us via the website or join our Discord.

Originally posted on 2022-11-30 on Medium.