Determining the creator of an NFT contract on Ethereum using Flipside
In this post I want to determine the following: given the address of some NFT contract on Ethereum, how do I identify the externally owned account (EOA) that created this contract? I am working with data from Flipside Crypto, so will be attempting to answer this question in that context.
To answer the question, let’s first collect a set of NFT contract addresses to attempt to link to creators. For a generic set, we can collect the set of NFT contracts with at least one “mint” event in the past month from the ethereum.nft.ez_nft_mints
on Flipside (table docs here):
This turns out to be a set of 11,155 distinct NFT contracts. To link these to creator EOAs, one approach would be to use the ethereum.core.dim_contracts
table in in Flipside. This table has a creator_address
field that would seem to solve the problem. To examine, let’s try merging with dim_contracts
and looking at the distribution of NFT contracts created per creator. Here is the new query:
First, I note that all 11,155 contracts are indeed linked to a creator_address
here. There are a total of 4038 distinct creator addresses. Let’s look at some of the most prolific contract creators. Here are the top 5 (with links to their etherscan pages):
Creator Address | Num Contracts Created |
---|---|
0x000000f20032b9e171844b00ea507e11960bd94a | 2399 |
0x612e2daddc89d91409e40f946f9f7cfe422e777e | 1840 |
0x3b612a5b49e025a6e4ba4ee4fb1ef46d13588059 | 323 |
0x000000008924d42d98026c656545c3c1fb3ad31c | 243 |
0x76f948e5f13b9a84a81e5681df8682bbf524805e | 200 |
We see that the top two addresses alone account for 4,239 of our 11,155 contracts. Further, checking the Etherscan links, we see that none of these top five creator addresses are actually EOAs; instead, they are all contracts that can be used to deploy NFT contracts. For example, the most prolific creator is called ERC1155SeaDropCloneFactory and describes itself as “A factory contract that deploys ERC1155 token contracts”.
What share of our NFT projects are, in fact, created by other contracts like this one? We can join back to dim_contracts
to find out:
Here is a summary of this query:
Is Creator Contract? | Num NFT Contracts | Num Creators |
---|---|---|
No | 4821 | 3826 |
Yes | 6334 | 212 |
The table shows that of our 4038 distinct creators, only 212 are contracts. However, these contracts actually account for the majority of our 11,155 NFT contracts (6334/11155 or about 57%). Hence, if we are interested in the EOA that originally created the NFT contract (as I am), this approach will not suffice.
As an alternative approach, we can try the following:
- Using
dim_contracts
, identify the transaction hash that created the NFT contract of interest (via thecreated_tx_hash
field). - Join to the
fact_transactions
table (link) to look up the EOA that iniated the transaction that created the NFT contract (i.e.from_address
in thefact_transactions
table).
This approach should identify an EOA regardless of whether the NFT contract was created via a factory contract or deployed directly (since only EOAs can initiate transactions). Further, I would hope that it will identify the same EOA as creator_address
in dim_contracts
in the case where the NFT was deployed directly by an EOA. Here is a query to investigate further:
This query creates a table with one row for each of our 11155 NFT projects with a new field tx_creator_address
that is the address that initiated the transaction that created the NFT contract. Using this new field, let’s again look at the most prolific NFT project creators:
Creator Address (Tx init) | NFT Contracts Created |
---|---|
0xfbc3b76a206f03f1edbf411f280444cd3fd9c7c8 | 24 |
0xff1896cfc912ceda37319eba452906dea8cb343c | 17 |
0x2f2d07d60ea7330dd2314f4413ccbb2dc25276ef | 16 |
0x9f218c1380ad55e4a40b4da89795bd56e93e90ea | 15 |
0x868964fa49a6fd6e116fe82c8f4165904406f479 | 14 |
As desired, these are indeed all EOAs. Further, as we might expect, the distribution of NFT contracts created per creator is far less skewed; the most prolific creator now has only 24 NFT creations. We can also confirm that the transaction initiator address differs from the creator_address
we were using previously if and only if the creator_address
is a contract. This is indeed the case:
Creator_addr is Contract | Creator_addr == Tx init addr. | Num NFT Contracts |
---|---|---|
No | Yes | 4821 |
Yes | No | 6334 |
Finally, for some additional sanity checking, let’s pull a random sample of creator addresses (based on the tx initiator) where the creator_address
was a contract and see if they line up with the “creator” listed on OpenSea. Here is a random ten with links to the corresponding OpenSea pages for the project and creator address:
Manually inspecting, this seems to work decently well; however, there is one case where things do not line up with OpenSea: this collection. I am not sure why this case behaves differently. In my next phase of analysis, I will explore comparing with OpenSea more systematically using the OpenSea API to better understand the magnitude of misalignment. The OpenSea API in general could be another way to identify the creator of an NFT project, and so is worth better understanding for this purpose as well (e.g. what is the process that OpenSea is using to link projects and creators?).
Thank you to Kassandra for working through much of this with me!