OrFeed is a pricing oracle for Ethereum-based smart contracts. This post assumes you are already familiar with the basics of smart contracts and oracles. If you’re not, here is a post to get you up to speed.
The Story Behind OrFeed
Two weeks ago, I attended DevCon 5 in Osaka. I ran into quite a few startups that were working on bringing data from outside of the Ethereum blockchain onto the Ethereum blockchain (DeFi Oracle startups). At a few of the after-conference events (OffDevCon), I had the chance to learn more about some of these projects, and realized that all of them were charging or planning to charge around $.50 — $2 per data point request for data you could get outside the blockchain for free.
When I arrived back from the conference, I continued previous development on DAI-backed synthetic assets (from pricing data that was both on and off-chain). In order for this to work well, I would need very good pricing oracles for things like equities, currencies, ETFs, etc. Luckily, I discovered a platform called Synthetix, which actually does something very similar…. No reason to reinvent the wheel. Fortunately, Synthetix has pretty reliable price feeds on-chain for currencies such as USD, EUR, CHF, JPY, etc. In fact, our team was able to use their platform to build a diversified currency portfolio generator.
That’s part of a project called Structured, and you can check that out here. Structured was built for a global DeFi hackathon which is currently ongoing. In that hackathon, I met many awesome developers in many of the group channel chats in the hackathon’s Discord. Turns out, one of the leading oracle platforms was one of the sponsors, so our team decided to dig in and see if their oracle system could help with some of the DeFi products we were building that needed off-chain data.
Most oracles on the Ethereum blockchain require you to receive data asynchronously. By asynchronously, I mean that when you write a smart contract you can’t do this:
uint jpyusd = pricefeed.getCurrencyPrice(‘jpyusd’);
Instead, you must request the data, and then you have to have a centralized server ping your smart contract on the next block, track all the requests that were made and then answer with the response. This is the case for most API calls with ChainLink, as well as with the oldest player in town, Oraclize. Band Protocol does not have this issue, but they are quite expensive. Most other oracle protocols are either really expensive, don’t work very well, or are highly centralized, so your smart contract (that is permanent and can never be fundamentally changed) can’t rely on them.
To solve this problem, we propose a kind of of “proof-of-stake” system, in which data providers deposit ether (ETH) in order to be the sole provider of a particular ticker (APPL:NYSE, VIX:CBOE, etc). However, unlike many of the other blockchain-based price feed oracles today, the most popular price feeds will be free forever. This is because price feeds for cryptocurrencies (BTC as wBTC on Ethereum blockchain, ETH/USD, DAI/USDC etc) are all available via decentralized swapping platforms Kyber and Uniswap, with currency pairs pricing data available on-chain via Synthetix. However, the “staking” mechanism comes into place for all data that is not available on these decentralized feeds/swapping platforms.
With OrFeed, Data providers can deposit 0.5 ETH (this number is for starters and this number is adjustable by a decentralized autonomous organization (DAO)). 10% of the deposit goes to the DAO which constantly checks that the prices are within a small percentage bounds of the real-world price. If the price is not within bounds, then the data providers’ deposit is slashed (and goes to the DAO). The deposit amount to maintain a single price feed rises with the popularity of the oracle system and the amount of liquidity that depends on the prices being accurate (systematic risk). For subscribers of premium price feeds, they can may .1 ETH per month (again adjustable by the DAO based on popularity) and the data provider receives 90% of that amount as incentive to continue providing accurate data to other smart contracts via the OrFeed contract.
Confused yet? It’s okay. Documentation, examples and the site are launching later this week.
Who Needs/Will Need This?
All financial institutions that use smart contracts to trade on the blockchain. Over the last 12 months, those groups profited over $10m in smart contract DeFi arbitrage (pure profit, not trading volume). That number is growing and more liquidity is pouring into the space. So, pretty large market one day.
Soon, once the smart contract is audited, we will launch the platform on the Ethereum mainnet. Anyone can sponsor a price feed. Sponsors are required to ensure that the price they update the smart contract with is consistent with real-world prices. Later, sponsors can sell their sponsored feeds to other providers for potentially higher prices and/or collect fees monthly from smart contract providers. We will need a lot of sponsors for a lot of price feeds. That might be harder than getting the smart contract to work. However, the incentive mechanisms are there.
More info coming soon!
Update (10/28/2019): OrFeed’s alpha is live here: https://www.orfeed.org