Cover Image for Bid, Win, Own: Understanding the Process of NFT Auctions

Bid, Win, Own: Understanding the Process of NFT Auctions

Beacon Chain
ETH2

Imagine having the ability to anonymously create an art or a collection of art pieces, auction it, view bids in real-time and transfer its ownership to probably an anonymous user halfway around the world.

This has been achieved in significant events like Beeple’s Everydays: The First 5000 Days . This was and is currently the most famous NFT sale ($69.3 million/38525 ETH) which closed on 11th March 2021. This sale created a widespread effect on how people viewed NFTs with the news buzzing all around popular social media platforms.

All this is made possible with the right tools, user interface and real-time data which can be sourced from a real-time & historical blockchain data provider which provides the token analytics, metadata, historical pricing and trading data from all top NFT marketplaces.

In this detailed blog post, we are going to dive into auctioning, how it works for NFTs and how to analyze it's statistics, events and properties with one of the most powerful blockchain data provider, Bitquery.

How does an auction work in traditional finance?

Traditional Auctioning

Now, traditional auctions work in a very simple principle which is a competitive bidding where interested and potential buyers bid against each other with the minimum price (also known as the reserve price) set by the auctioneer. This goes on till someone bids the highest amount and no further bid is made which results in closing the bidding and the art or item going to the highest bidder after payment is made.

How does an NFT auction work ?

Introducing auctions in web3 will obviously work in a different way but with the same principle with traditional auctioning.

The significant advantages of conducting an auction for NFTs using blockchain technology includes the introduction of decentralization as it leverages smart contracts to facilitate the auction process. This also has to be done on a smart contract platform or network such as Ethereum, Cardano or Solana.

Steps required

This is a step-by-step method of how NFT auctions typically work in Web3

  1. Creating the smart contract: This involves the initial creation of the smart contract (writing the code) and deployment on a network like Ethereum or Solana. You can create the initial NFT contract easily with a less technical tool like OpenZeppelin Contract Wizard with its standard features.

Now let’s continue with the auction contract. By default, it should specify the following:

  • Accepted Payment Type ( ETH or any ERC-20 token if deploying on Ethereum)
  • Minimum Price - when this is met, the auction begins
  • Buy Now Price - which when met by a buyer will automatically conclude the auction.
  • Auction Bid Period - specifies the amount of time the auction will last after the minimum price is met.
  • Fees percentage

The smart contract should also include a transfer, transferFrom, start, bid, withdraw and end functions. The events under the auctions should also include a Start(), End(), Bid(), Withdraw()

Additional functions or events can be added, but the following above are just the basics.

  1. Minting the NFT (Tokenization): This process ensures that the necessary metadata and attributes for the NFT, are stored on-chain with a unique token ID.

  2. Initializing the Auction: The creator or seller can invoke the start function on the auction smart contract to which the start/minimum price and any other rules is set.

  3. Placing Bids: In this step, potential buyers can now interact with the smart contract through a decentralized application interface by connecting their wallet and submitting a transaction (indicating the amount they are willing to purchase the item). This step also progresses to validation, as the smart contract validates each individual bid to make sure that it meets the set rules.

  4. Completing the Auction: This occurs when the time expires or if the seller manually ends the auction by invoking the end function. The highest bidder is now declared the winner of the auction.

  5. Transfer of assets: Upon completion, payment is made to the smart contract and it transfers the ownership of the NFT from the seller to the winner of the auction.

  6. Distribution/Settlement: The proceeds of the auction are now splitted between the seller and any relevant parties, for example a platform that might be hosting the auction or providing the tools for the auction process as they will equally take a percentage as fees.

Finally, the events of the auction are logged on-chain and all transactions can be viewed through a blockchain explorer or data source like Bitquery.

Platforms used

Most NFTs that undergo the auction process always do so on a platform which is also known as NFT Marketplaces which offers the creators or original owner the tools and always charges a percentage or a fee before initiating the process.

Some popular ones include the following:

  • Opensea
  • Rarible
  • Nifty Gateway
  • SuperRare
  • Magic Eden
  • Zora
  • Foundation
  • Binance Marketplace

Tracking & Analysis of an auctioned NFT with Bitquery

In case you’re new and reading this piece, let me give a short overview of what Bitquery does and how its services are critical in the blockchain industry.

Bitquery is a blockchain data provider with a wide range of API products and solutions which includes NFT Marketplaces and data sourcing in this context. Also to mention that it supports over 40+ blockchains and provides GraphQL APIs and additional interfaces, including WebSocket.

Now, the real question is how does Bitquery help you to analyze or track an auctioned NFT?

Very simple,

Let's take a sample auctioned NFT and throw some analytics prowess via queries with the platform.

In this case, we will be using Fidenza #725, which was one of the NFTs belonging to bankrupt cryptocurrency hedge fund Three Arrows Capital. The NFT sold for over $1 million fetching the highest price at the auction house Sotheby.

The auctioned NFT also known as Fidenza by Tyler Hobbs which is part of Art_Blocks Collection with over 999 items.

Plugging in the main smart contract address for the [Art Blocks NFTs] (https://explorer.bitquery.io/ethereum/token/0xa7d8d9ef8d8ce8992df33d8b8cf4aebabd5bd270/nft_smart_contract) on the explorer, we get this results below, showing the token info and the most popular NFT

explorer

most popular nft

But we are looking for Fidenza #725 which is the NFT that was auctioned with the token id (78000725)

Searching for the unique id on the Arts Block NFT collection page on the explorer we see this

The page shows us the properties and the values and also transfers which we can also view on the IDE

Now let’s get more deeper by writing queries for further analysis on the Art Blocks NFT collection.

  1. NFT Collection Trade Volume

Let’s get the trade volume of the collection (in ETH) with the query below

{
  EVM(network: eth, dataset: combined) {
    DEXTradeByTokens(
      where: {Trade: {Currency: {Fungible: false, HasURI: true, SmartContract: {is: "0xa7d8d9ef8d8ce8992df33d8b8cf4aebabd5bd270"}}, Dex: {ProtocolName: {is: "seaport_v1.4"}}, Side: {Currency: {Name: {is: "Ethereum"}}}}}
    ) {
      sum(of: Trade_Side_Amount)
    }
  }
}

We get this result

{
  "EVM": {
    "DEXTradeByTokens": [
      {
        "sum": "24419.215181700253849799"
      }
    ]
  }
}

This shows that 24146.65 ETH has been traded on the NFT collection

You can run the already saved query here

  1. NFT Collection Sales

Let us check for NFT sales on the collection after Jan 1st 2024. You can also edit this code in the IDE and set it to any date you desire.

{
  EVM(network: eth, dataset: combined) {
    DEXTradeByTokens(
      limit: {count: 10}
      orderBy: {descending: Block_Time}
      where: {Trade: {Currency: {Fungible: false, SmartContract: {is: "0xa7d8d9ef8d8ce8992df33d8b8cf4aebabd5bd270"}}, Dex: {ProtocolName: {is: "seaport_v1.4"}}}, Block: {Date: {after: "2024-01-01"}}}
    ) {
      Block {
        Time
      }
      Trade {
        Amount
        Buyer
        Currency {
          Name
          ProtocolName
          SmartContract
        }
        Dex {
          ProtocolFamily
          SmartContract
          ProtocolName
          ProtocolVersion
        }
        Ids
        Price
        Seller
        Side {
          Amount
          Buyer
          Currency {
            Name
            SmartContract
            Symbol
          }
          Type
        }
        URIs
      }
      Transaction {
        Hash
      }
    }
  }
}

You can also run the already saved query here

  1. Fetching Owner

Let us write a query to fetch the owner of the Fidenza #725 NFT that was auctioned.

query MyQuery {
  EVM(dataset: combined, network: eth) {
    BalanceUpdates(
      orderBy: {descending: Block_Time}
      limit: {count: 1}
      where: {BalanceUpdate: {Id: {eq: "78000725"}}, Currency: {Fungible: false, SmartContract: {is: "0xa7d8d9ef8d8ce8992df33d8b8cf4aebabd5bd270"}}}
    ) {
      Currency {
        Name
        SmartContract
      }
      BalanceUpdate {
        Address
        Amount
        Id
      }
      Block {
        Number
        Date
      }
    }
  }
}

This query returns an output that shows us the address that currently own the NFT as this address (0x95b9f6e91212014ed3224c8ccc17dcd5895a7f53)

You can run the already saved query here

  1. NFT Metadata

Writing a query to get the metadata of the desired NFT, if you notice in the code below, the Fidenza #725 id is used to get the exact metadata with the Arts Block Collection smart contract address.

{
  EVM(dataset: archive, network: eth) {
    Transfers(
      where: {Transfer: {Currency: {SmartContract: {is: "0xa7d8d9ef8d8ce8992df33d8b8cf4aebabd5bd270"}}, Id: {eq: "78000725"}}}
      limit: {count: 1, offset: 0}
      orderBy: {descending: Block_Number}
    ) {
      Transfer {
        Currency {
          SmartContract
          Name
          Decimals
          Fungible
          HasURI
          Symbol
        }
        Id
        URI
        Data
        owner: Receiver
      }
    }
  }
}

You can run the query here

  1. Explore creator's portfolio

We can identify the original owner/creator of the Fidenza #725 . So we write this query which searches for the earliest transfer.

query MyQuery {
  EVM(dataset: archive) {
    Transfers(
      limit: {count: 1}
      orderBy: {ascending: Block_Time}
      where: {Transfer: {Currency: {SmartContract: {is: "0xa7d8d9ef8D8Ce8992Df33D8b8CF4Aebabd5bD270"}}, Id: {eq: "78000725"}}}
    ) {
      Block {
        Time
      }
      Transfer {
        Amount
        Currency {
          Symbol
          SmartContract
          ProtocolName
          Native
          Name
          HasURI
          Fungible
          DelegatedTo
          Delegated
          Decimals
        }
        Data
        Id
        Receiver
        Success
        Type
      }
    }
  }
}

This query returns the creator address which is 0x429c8a65f4858ab2e6dc7112e88f0c0796a42692

You can find the saved query here

Now we will find the balance of the creator’s address

Writing this query to find the ETH balance of the creator’s wallet address

{
  ethereum {
    address(address: {is: "0x429c8a65f4858ab2e6dc7112e88f0c0796a42692"}) {
      balances(currency: {in: ["ETH", "0xdac17f958d2ee523a2206206994597c13d831ec7"]}) {
        currency {
          symbol
        }
        value
      }
    }
  }
}

It returns the following which shows the balance of the address as 0.38 ETH, you can find the query [here

](https://ide.bitquery.io/Address-Balance_1)


{
  "ethereum": {
    "address": [
      {
        "balances": [
          {
            "currency": {
              "symbol": "ETH"
            },
            "value": 0.38017523843271966
          },
          {
            "currency": {
              "symbol": "USDT"
            },
            "value": 0
          }
        ]
      }
    ]
  }
}

Conclusion

This piece offers a solid knowledge about how NFTs are auctioned in a decentralized infrastructure, including its process and how you can use an advanced platform like Bitquery to dive deep and perform diligent analytics in order to make well informed decisions about assets like non-fungible tokens.

To learn more about NFTs and the underlying technology that makes everything in the decentralized web (Web3) possible, visit our blog to learn more about blockchain and related products. You can also sign up for our newsletter via the blog page to become an analytics pro on-chain.

Helpful Links

https://docs.bitquery.io/docs/category/nft/

https://docs.bitquery.io/docs/examples/nft/nft-api/

https://docs.bitquery.io/docs/start/first-query/

https://docs.bitquery.io/docs/ide/login/

Disclaimer : This post does not in any way or medium serve as an investment guide in NFT trading or purchasing. It only aims to explain how NFT auctioning works and how you can use Bitquery to track and analyze its events.


This blog was written by Eugene

Subscribe to our newsletter

Subscribe and never miss any updates related to our APIs, new developments & latest news etc. Our newsletter is sent once a week on Monday.