project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4

PriceFeeder.xyz

The world's first permissionless no-code tool for launching on-chain price oracles for NFT collection stats.

PriceFeeder.xyz

Created At

ETHSanFrancisco 2022

Winner of

trophy

🥇 Dune — Best Use

trophy

🥇 Tellor — Best Use

Project Description

PROBLEM: It is extremely difficult to build prediction markets for NFT collections because (a) there is no robust oracle solution addressing this use case, (b) the few blue-chip NFT collection price feeds that do exist only report on floor price, which is very easy for a bad actor to manipulate.

SOLUTION: We've created the world's most user-friendly, fraud-resistant, and robust solution for launching new NFT collection price oracles.

HOW IT WORKS: In less than 60 seconds anyone in the world who wants to sponsor a new NFT collection price feed can (a) visit pricefeeder.xyz, (b) connect their wallet, (c) search for an NFT collection by name, (d) select Market Cap or Time Adjust Market Index as the collection stat, (e) identify how much TRB token they'd like to offer data reporters, and (f) sign a transaction.

How it's Made

In order to describe how this project is made we will walk you through the journey from the moment you'd visit pricefeeder.xyz, to the moment you'd consume an NFT collection price feed into your application.

The pricefeeder.xyz website GUI was build with NextJS and Chakra UI. The site leverages RainbowKit for the wallet connection.

When you submit the form to sponsor a new price feed, your data will be sent to the price-feeder smart contract on Polygon Mumbai, along with a few opinionated constants that describe how the funding mechanism for data reports is meant to work. If a record does not exist that matches your feed's query parameters (chainId, nftCollectionContractAddress, statType), then we create one. Our contract uses Tellor, so any committed TRB token is passed to their autoPay contract.

When our contract runs, it emits events. These events are indexed in a custom subgraph. This subgraph is used on our web site to display a list of all active Price Feeder feeds.

Once a feed is sponsored, data reporters will be incentivized to begin to write the price feed data on-chain in order to earn tips in TRB. We've made it extremely easy for reporters to get the necessary collection stats by creating an open-source API endpoint. This way reporters can either run their own instance, or use our free hosted version.

Our hosted API also uses the subgraph to known which collections to backfill NFT sales history for. The sales history is used every time a data reporter might want to check a collection's Market Cap or Time Adjusted Market Index, which could be once per minute or more. You see, data reporters make money by being the first to report a value, so they race against each other to identify when to write new data on-chain. In our use case, this would be when the reference price they are monitoring changes by 0.5%, or when 60 minutes have passed since the last on-chain write, whichever comes first.

Speaking of data, we wrote a custom Dune query that leverages the NFT_Trades spell in order to streamline the process of populating the MongoDB database connected to the hosted price feeder API.

We leveraged Reservoir protocol for NFT collection metadata and the auto-complete search field on the form where someone would sponsor a feed.

Our Market Cap calculation also leverages Reservoir to get collection floor price in USDC, and we've modeled the Market Cap algorithm after NFTGo's published spec.

We've leveraged an existing NPM module to calculate the Time Adjusted Market Index, which is a modified market cap that is more resistant to fraud than the Market Cap spec published by NFTGo.

background image mobile

Join the mailing list

Get the latest news and updates