DEV Community


Posted on

Analyze stolen NFTs that been marked by opensea


This is a hackathon data analytics project. I analyze the top 2300 nfts sort by volume。 You can find the detail list from my GitHub repo. Or you can click here。

CSV Data

Below is all csv file that i collect.RankNFTs.csv is the top 2300 NFTs list. tokenIds/{contract}.csv is stolen NFTs tokenID list.lastSalePrice/{contract}.csv is the last sale price of each tokenId.

  • RankNFTs.csv
  • tokenIds/{contract}.csv
  • lastSalePrice/{contract}.csv

Python script

You can get the all scripts my github repo above.

  • top volume NFTs && stolen NFTs list)
  • NFT’s last sale price)
  • Result)
def getNftsRankTopVolume(page):
    url = "" + \

    headers = {
        "accept": "application/json",
        "x-ts-api-key": TraitsniperApiKey

    response = requests.get(url, headers=headers)
    resp_dict = json.loads(response.text)

def caculateContractItem(contractAddress, table):
    # get collection detail
    item = getCollectionDetail(contractAddress)

    # read stolen nfts list
    data = pd.read_csv("../data/stolen/lastSalePrice/" +
                       contractAddress+".csv", header=None)
    # caculate items
    num = data.count()
    sum = 0
    for index, row in data.iterrows():
        if row[1] > item["floor_price"]:
            sum += row[1]
            sum += item["floor_price"]
    table.rows.append([item["nft_name"], contractAddress, item["total_volume"],
                       sum, sum/item["total_volume"], num[0]])
Enter fullscreen mode Exit fullscreen mode

Fetch Collections

First and foremost we need to get the list of each collection and then get the list of stolen nfts.

How to calculate the price of each stolen nft?

  • If this item has a history price && the latest_price>floor_price take the latest_price as worth.
  • If latest_price<floor_price take the floor_price as worth.
  • If this item does’t has a history price then take the current floor price as worth.
# worth
# latest_history_price
# floor_price
var worth = 0

    if(latest_history_price> floor_price){
    worth = latest_history_price
    worth = floor_price
    worth = floor_price
Enter fullscreen mode Exit fullscreen mode


I analyze each marked as stolen contract to find out the stolen volume and the numbers of stolen NFTs.Below is the output after i run you can get source code from my github repo above.

Image description

Top comments (0)