Unfortunately, due to circumstances outside my control, I was only able to start the project today. I was able to write down what I want to accomplish here https://github.com/0xEconomy/clerp-protocol#readme, but It'll take me about 1 week to implement it fully.
Clerps is a platform for creating liquid perpetual swap markets for illiquid Non-Fungible Tokens (NFTs). A clerp is synthetic NFT tracks the price of a given rarity class in an NFT project and can be minted by locking up NFTs from that rarity class in that project.
Clerps give NFT holders access to liquidity and protection against fluctuations in the price of their NFT without requiring them to give up ownership of their NFTs.
Placeholder for here: Determining the class and price of an NFT
Step 1: Classification
Divide the NFT project into classes from A-G based on the rarity of the NFT.
Class A (Top 1% rarity score).
Class G (Bottom 20% rarity score)
In the case of crypto punks with 10K collection.
Punks with rarity score from 0 - 100 get class A.
Punks with rarity score from 8K - 10K get class G.
Step 2: Ingestion
Get the most recent sale events on the Ethereum blockchain for PUNKS.
Step 3: Indexification
Create an index price for each class.
Map avg sales price for each class to determine an index price, which is time-weighted
For classes with no sales e.g. Class A Punks who have diamond hands, use logistic interpolation to determine a price.
Also, using actual time-weighted sales data makes it less susceptible to manipulation.
Step 4: Modification
When there's a new sale event, update the index price for each class.