Oracle
Last updated
Last updated
In nftperp v1, we used a concept called "True Floor Price," which was the TWAP of NFT trade data after filtering outliers. This average often deviated from the floor price people see on Blur, leading to a mark/index gravitation where the mark gravitated more towards Blur's floor. Responding to this preference, nftperp v2 introduces a significant change to implement a more straightforward floor price mechanism. This mechanism is derived from multiple components.
Trade Weighted Floor Price: Volume and floor price of different NFT marketplaces are averaged by their trading volume to create a trade-weighted floor price
Sales Floor Price: We remove outliers and potential manipulation from NFT sales data throughout all centralized markets and perform a weighted calculation on the last couple of trades to create a sales floor price.
Bid-Ask Floor Price: We average the best bid and best ask on top NFT trading venues. We receive this price from multiple internal and external venues to guarantee uptime.
We then take the median of existing components for a given collection to get the current floor price. If any feeds exceed the median by 5%, we Winsorize that feed and update the median to reduce the effect of any outliers. If the rolling Confidence Interval of Standard Deviation concerning the original median is >95th percentile, the market is volatile, and we use a TWAP of 15 minutes. Else, we use a longer TWAP. If this TWAP deviates more than 0.3% from the current floor price, our Oracle Keepers push the price onchain into the nftperp Contract.
This value can be returned from the nftperp contract with a getPrice() call on the price feed contract.
The Ordinals Oracle uses a Sales Floor Price, calculated in a similar manner to the Sales Floor for Ethereum-based NFTs. This price is derived by filtering outliers and potential manipulation from Ordinal sales data across various marketplaces. The key components are:
Outlier Detection and Removal: The Ordinals Oracle employs robust outlier detection mechanisms to ensure that manipulated or anomalous sales do not skew the floor price. This involves tracking addresses and tokenIDs to identify and exclude washed sales.
Weighted Calculation: After filtering outliers, the Oracle performs a weighted calculation on the most recent trades to determine a sales floor price that closely reflects the true market value of the Ordinals.
Bid-Ask Integration: Once bid data is supported by marketplaces, the Ordinals Oracle will be upgraded to include a Bid-Ask Floor Price. This will involve averaging the best bid and best ask prices from top trading venues, similar to the methodology used for Ethereum NFTs.
The TWAP length for Ordinals is set to 1 hour, and sales from MagicEden and OKX are used to create the index price. Similar to Ethereum NFT price feeds, the current price feed for Ordinals can be returned by using a getPrice()
call on the price feed contract.