Quadro

Price risk market, that matches risk-takers and risk-averse players.

Description

In crypto, there is exist 2 very huge demand categories: First, it is hedging the price risk, and second is leveraged price exposure. People don't need crypto-backed stablecoins, they just want to get high yields without taking on the price changes risk and then be able to quickly convert into real dollars. And from the other side people, risk-takers type of people, that would like to get leveraged ETH exposure and get even more profits from the price growth. What if, we will match these 2 types of players into a single liquidity pool and create a kind of price risk market? When building this pool, we will be inspired by coin-margined perps (Bitmex style), as their unique mechanics with collateral margin in underlying asset allows us to create a synthetic USD from one side and a quadratic payoff from the other side. The thing is that by open inverse short position our PnL calculates as margin in the underlying asset and short position profit or loss, in such a way that by using zero leverage we are creating what is called a delta neutral position - position, value of which always remain the same in USD terms. And by opening inverse long position our PnL is calculated by the same formula, the difference is that by price growth we are receiving our PnL in an underlying asset, which means that we receive a (price change)^2 payoff, which is actually needed for the price-takers. However, due to the technical constraints of the blockchain, we cannot use the "classic model" with the CLOB as a price discovery method to build our mechanism. Let`s try to create an AMM, that will emulate perps market design and where the price will determine as a ratio between the issued amount of long (x) and short (y) contracts. For our AMM, 2 principles are important: 1) If the player bought contracts and after him, there were no operations with a pool, he can sell his contracts and get the same payoff. Thus, he buys contracts at the current price but sells at the price that will be after his interaction. 2)The price must change! Thus, the next player will buy at a higher than the first player price. Which is pretty close to how the LOB perps work. Use cases As I mention earlier short contracts payoff always remains the same in USD terms, which means that we can for example hedge wstETH price risk, while still earning all the yields. And then create a Uniswap V3 very narrow price range pair with an aUSDC and get an additional yield from this pool. Note: that you can always redeem your short position for the ETH, which means that you can easily swap USDC into ETH by this scheme. This scheme actually means 4 yield flows: from stETH, AAVE lending, Quadro fees, and Uni V3 fees for the USDC - ETH swaps.

Quadro showcase

How it's made

Smart contracts were written using Vyper. For testing, I have used Brownie + web3.py + Metamask and: 1) Ganache for local testnet deployment and testing. 2) Infura for local deployment and testing against forked mainnet. The front-end did not have time to finish, it is now only static, I will continue to work on it after the hackathon. For its development, I use React + web3.js.

Technologies used

AaveCircleETH2InfuraMetaMaskUniswap