Rainbow is a dashboard for Decentralized Finance Options trading.
For this hackathon, we at Teal Finance, built Rainbow, a dashboard for people to access DeFi market data. Why? To ride 3 trends: crypto and DeFi getting bigger, crypto options trading growing (hopefully) bigger than the spot market, like in tradFi and a mutli-chain and multi-layer world. We want to help develop this part of the crypto ecosystem. This POC is meant to be a first step in that direction. So what did we build? A tool for traders to see market data across multiple venues, CEX and DEXes. We first got data from Deribit, because that is the main options trading place. Then we added Opyn, because we are active users of this protocol. They use the 0x Protocol for the exchange of their options. We integrated their API to retrieve this trading data. But first we need a list of available options and that's where TheGraph comes in. We plan to add more (Ethereum) protocols in the near future: Thales, Lyra, Hegic... Most recently, we look at the Solana ecosystem and found PsyOptions, the main DeFi options protocol: we have also added it into Rainbow. Now, using Rainbow, you can compare to arbitrage options across these markets, or simply get the best prices.
How it's made
The back-end is developed in Go. Deribit data retrieval was pretty straightforward and well documented. They even have an API playground, which all projects should also provide. We then look into Opyn. We had to use TheGraph to be able to access the list of the available options. To do so we use a GraphQL library for Go and got some help from the Opyn team for queries examples. Then we battle with the 0x API to correctly get the bid/ask prices of those options. We got some help from the 0x team to identify which API call was the most suitable. This help advance our work a lot and enables us to add other protocols like Thales that use 0x fairly quickly. We finally took our first plunge in the Solana ecosystem to understand and use the Serum Go library enough finish our goals. Our next step is to work on a proper UI that enables users to trade.