Over the last two years the Decentralized Finance (DeFi) ecosystem has rapidly expanded as a core use-case in crypto. Today, there are close to $1B in assets actively pooled in DeFi protocols and applications that offer a wide range of programmable financial services. In many of these protocols, there is a reliance on trusted price feeds, known as "oracles", that need to report on asset prices in order for the protocol to function. These prices are used for many things, including the construction of novel derivatives, algorithmic stablecoins or to liquidate debt positions.
There are two main approaches to making asset prices available for DeFi: publishing signed price data from an off-chain source like an exchange, or using prices from algorithmic decentralized exchanges (DEXes) such as Uniswap or Kyber. Unfortunately, both suffer from major problems. Using data from an off-chain source requires trusting the publisher to post correct prices and keep the signing key safe — the latter historically has proven to be a difficult problem, especially when stakes are high. Similarly, relying on DEX-generated on-chain feeds exposes protocols to various novel yet to be fully explored.
Coinbase is one of the most trusted companies in the crypto space and a major part of our mission is growing the cryptoeconomy. A highly reliable price feed anchored into Coinbase’s secure infrastructure can help make the DeFi ecosystem safer, reduce systemic risks and unlock the next wave of growth and adoption.
Today, we are proud to announce Coinbase price oracle — a signed price feed that anyone can publish on-chain.
Starting today, anyone can use the Coinbase price oracle API to get signed price data for BTC-USD and ETH-USD markets. The price feed is sourced from Coinbase Pro — one of the most liquid crypto exchanges in the world — and updates each minute. Anyone can publish the prices on-chain and since the data is already signed by Coinbase’s private key, there is no need to trust the publisher. Using the Coinbase price oracle public key, anybody can verify the authenticity of the data.
“Coinbase price oracle will increase the security and decentralization of Compound’s price feed, which is mission-critical to the protocol and the ecosystem of applications built on top of Compound. We’re not alone — the rest of DeFi will benefit with faster development, consistent data, and shared standards.”
— Robert Leshner, Compound CEO
The Coinbase price oracle is secured by the same infrastructure that is storing large amounts of crypto assets on behalf of Coinbase customers. Our security experts developed many best-in-class key storage techniques — these same techniques are used to ensure the safety of the private key signing the Coinbase oracle prices. In addition, the oracle implements protections against exchange price manipulation or invalid data.
Once on chain, the data can be combined with other trusted sources and used by DeFi protocols to perform various functions such as lending, margin trading, collateral liquidations, derivatives and more.
“A Coinbase price oracle will be hugely impactful for the DeFi ecosystem — price oracles are used in every lending & derivatives protocol. Coinbase is uniquely positioned to provide oracle prices as they’re the most trusted and secure institution in the space. These prices can be used as an input to help create more decentralized and secure price oracles for the ecosystem.”
— Antonio Juliano, CEO of dYdX
The payload returned by the API is designed to be compatible with the Compound open oracle — a set of Ethereum smart contracts that the Compound team developed and open-sourced to facilitate standardization and interoperability between different sources of oracle price data.
Multiple publishers can submit prices from various sources to the Compound open oracle smart contract. This data then becomes available on-chain for individuals and smart contracts who can choose which sources to include in the calculation of a median price returned by the oracle contract.
For an oracle to provide a reliable price feed it is important to address various scenarios in which a data point to be signed does not reflect an actual market price of an asset. There are three layers in the Coinbase price oracle architecture designed to solve this:
Price source: We use the Coinbase Pro API as the source of the price data. Coinbase Pro is one of the most liquid crypto-exchanges in the world. There is already an ecosystem of oracles, market makers and traders that rely on an accurate data feed provided by the Pro API. As such, Coinbase is making continuous investments in the quality of the API itself, as well as the market, as measured by liquidity.
Off-chain filtering: The Coinbase price oracle implements a filtering mechanism that rejects data points that significantly deviate from the expected volatility of each asset.
This website contains links to third-party websites or other content for information purposes only (“Third-Party Sites”). The Third-Party Sites are not under the control of Coinbase, Inc., and its affiliates (“Coinbase”), and Coinbase is not responsible for the content of any Third-Party Site, including without limitation any link contained in a Third-Party Site, or any changes or updates to a Third-Party Site. Coinbase is not responsible for webcasting or any other form of transmission received from any Third-Party Site. Coinbase is providing these links to you only as a convenience, and the inclusion of any link does not imply endorsement, approval or recommendation by Coinbase of the site or any association with its operators.
Coinbase does not endorse or promote any of the projects or cryptocurrencies mentioned in this blogpost. Any descriptions of functionality and services provided are for information only. Coinbase is not responsible for any loss of funds or other damages caused as a result of using any of the projects described above.
Sep 22, 2022,
2 min read time
Sign up for a Coinbase account today and see what the world of decentralized finance can do for you.