Bend protocol uses NFT floor price from OpenSea and LooksRare as data of price feeding for NFT collateral. Bend protocol only supports the bluechip NFT asset's floor price for price feeding on-chain. Bluechip NFT's floor price is not easily manipulated. Besides that bend protocol calculate TWAP of floor price to filter the price fluctuate from OpenSea and LooksRare marketplace.
Bend oracle design and running mechanism:
- The off-chain node obtains the raw floor price of NFTs from OpenSea and Looksrare trading markets;
- Filter the raw floor price data, such as the floor price difference between opensea and looksrare is too big;
- Calculate the floor price according to the transaction volume of opensea and looksrare;
- Compare the difference between the price on the chain and the latest floor price to determine whether the floor price needs to be uploaded to the chain;
- Call the contract interface to upload the floor price to the on-chain contract and calculate the time-weighted average price (TWAP) on-chain to weight the floor price, ensuring the price is reasonable;
- The twap algorithm is open sourced on the on-chain contract, and everyone can verify the validity of the data;
{% hint style="info" %} For CryptoPunks, we get floor price from CryptoPunksMarket contract directly! {% endhint %}
For security and reliability, we will run multiple nodes to ensure that valid price data can be upload to on-chian oracle contract in a timely manner at all times and the on-chain contract limits the frequency of price feed and the difference between two price feed cannot exceed a threshold.
Bend devs are working with Chainlink team to complete the NFT oracle price feeding.
As shown in the figure, the floor price of the oracle for CryptoPunks is consistent with the average deal price and TWAP price.
As shown in the figure, the floor price of the oracle for BAYC is consistent with the average deal price and TWAP price.