Quark Protocol is a first-of-its-kind derivatives exchange for the NFT space, built on top of on-chain pricing algorithms. It allows anyone to buy, sell, and create cash-settled derivatives (specifically European options) on any ERC721 collection.
Cash-settled derivatives are the holy grail of NFT finance â the way that derivatives are for the space scale. Mainly, they differ from physically-settled derivatives in that they don't require anyone to hold the underlying and allow for extreme capital efficiency through partial collateralization (i.e., leverage). Further, the flexibility of cash-settled derivatives allows traders and hedgers to combine them in novel ways to form new instruments with whatever payoff function they had in mind.
Derivatives of this sort have been an impossible problem in the emerging field of NFT finance, which can be traced to the issue of NFTs having no efficient price discovery -- they are illiquid and heterogeneous. There are numerous startups building off-chain price feeds too. These predict prices with high accuracy (98% accuracy rates very often) but are closed source and inaccessible for protocols looking to build on-chain public, decentralized infrastructure.
We propose a way to navigate these issues. Through our protocol, anyone can create their pricing algorithm (we develop one with a 95% accuracy rate) and easily deploy it on-chain through our interface, allowing for any kind of derivatives to be settled using this price feed.
This is an important step -- we show that it's scalable to build pricing algorithms on-chain (in this case, through a linear regression-based approach known as Hedonic pricing) and then that it's safe to use this as a reference index to allow for cash-settled options. This is the first time that cash-settled derivatives are used with NFTs.
Quark Protocol users can enjoy of three main use cases:
Hedging: Buy put options in order to hedge downside risk. For example, if the price of a BAYC is currently $80,000 and you're worried about its price crashing, you can buy a put option with a strike price of $75,000. Then say the collection crashes to $50,000, you can still sell a BAYC for $75,000 using your put option. While you own the put option, you've basically created a price floor of $75,000 as the lowest amount you'll sell the BAYC at.
Leverage: Buy call options to gain leverage without having any liquidation risk. For example, if the BAYC price is currently at $80,000 and you think its price is going to increase, you could buy a call option with a strike price of $90,000 â this call option costs much less than buying a BAYC ERC721. Then say the BAYC price runs up to $100,000, you buy the BAYC at $90,000 using your call option. There is no liquidation risk because you are not putting down any collateral (no need to hold any NFT) to borrow - you are simply paying a premium to buy an option.
Yield: Sell put or call options to earn "high yield". In order to sell a put or call option, you put down collateral. When you sell the option, you earn a premium. Because selling options is higher risk than, say, lending in a money market, since you could be exercised if the option hits the strike price, you earn a higher premium for taking on that risk, which people often view as "high yield."
For example, if you think the BAYC price isn't going to move too much, you could sell a covered call on BAYC, earning the premium ("high yield" on BAYC), and if you aren't exercised, you can leave with your original collateral and your premium. However, it is important to remember the additional risk that comes with these positions.
Presentation (including demo): https://docs.google.com/presentation/d/1hNV19qqd8nHvkseG6gDRg8mzUFGETalevsKsJ0mtz24/edit?usp=sharing
Quark Protocol is represented in two different areas: interface (DApp/front-end) and smart contracts. The smart contracts are composed of a central exchange and a factory of indices. To understand what the factory does, it is important to lay out the pricing mechanisms of the protocol.
The protocol allows anyone to create a pricing index with the use of linear models and collection data. Say we want to create an index for a collection. To do so, we first select the metadata attributes we want to track and train a linear model off-chain. This linear model will generate a series of coefficients and an intercept, which are passed to the index factory to bring the whole model on-chain for future re-fitting on new data sales.
The index factory follows the gas-optimized clone factory pattern, which allows bringing dawn deployment costs while allowing any user to bring any type of linear model on-chain. The newly created index can return its current price, as well as request new data to train on.
Each index is equipped with its own custom access to the UMA protocol in order to submit a data request to the Optimism oracle when the index is requested to train on new data. This UMA request is formatted with the following ancillary format âQ: Was there a new sale for the collection (NFT collection address) containing (array of tracked attributes)?â.
With this request sent, a proposer will make a series of API requests to track the latest sale, filtered by the tracked attributes. These API requests include Covalent and Reservoir (Opensea, LooksRare, X2Y2, and more marketplaces). If there is a new sale, the proposer will pass the sale price to the index, which in hand would re-fit on this new data, returning a new index price. Thanks to the UMA protocol, the Quark ecosystem can be trusted as disputers supervise the work of the proposers.
The index contract also contains helper functions to, for example, return volume used with the index, options running on index count, and data for the interface.
On the other hand, we have the exchange contract, which plays a key role in matching option buyers and sellers, as well as locking collateral and ensuring payouts.
To get a put or call option, the option buyer needs to call the ârequestOptionâ function with the given option parameters (type of option, strike, expiry, and index to trade on). Now, an option seller can spot the request and send an offer to the option buyer (through the exchange using the âcreateOfferâ function) with a premium cost (that is lower than the previous one if any). If the option buyer is happy with this premium, they can execute the âacceptOfferâ function that pays the premium to the option seller, locks the option sellerâs collateral, and mints an ERC721 token representing the option.
The holder of the ERC721 token has the power to exercise the option after its expiry using the âexerciseOptionâ function, which calls the index to fetch the latest data and calculate profits or losses. This function pays the option seller and buyer and consequently burns the ERC721 token.
The contracts are deployed on Goerli, Polygon, Optimism, SKALE, Gnosis, and Evmos.