API3: Solving the Oracle Problem
Paul Veradittakit
Investor at Pantera Capital—Solving Problems with a Value-Add Perspective [ODA5]
- The classic oracle problem of blockchain revolves around how blockchain protocols can ingest data from third-party sources in a reliable, trusted way. Since dApps and smart contracts are highly networked and automatic, corrupt or invalid data ingestions can create huge consequences for users when they do occur.
- API3 is a solution that promotes the development of “decentralized APIs” (dAPIs), where third-party service providers operate their own oracle that can write data directly to a blockchain. These oracles are governed by the API3 decentralized autonomous organization (DAO).
- Third-party services leverage API3’s Airnode, which is essentially an “oracle wrapper” for web APIs that makes it simple and easy for third-party service providers to host and operate their own oracles. This cuts out the role of centralized middlemen who transfer data from these services to the blockchain and can thus corrupt or control the data flow. It also allows API providers to reap the benefits of operating oracles, including more API traffic and blockchain rewards from hosting the oracle.
- API3 also enables a kind of “data insurance” for data consumers, where the DAO pays out any claims of invalid or corrupted data ingestion. This financially incentivizes the DAO to maintain high standards for data quality and validity.
- API3’s biggest competitor in this space is ChainLink, which essentially operates oracles on behalf of third-party API providers, requiring no extra work from these providers. While this approach is functional, it poses risks if the middlemen oracle node operators are malicious and it also precludes API services from being fully compensated for how their data is being used on the blockchain.
- Airnode is governed by API3’s DAO. Membership in the DAO is based on ownership of the API3 token, which gives the owner the right to vote on parameters like staking rewards, insurance collateral, and allocation of DAO funds. 20 million API3 tokens (20% of the entire supply) will be distributed on Mesa DEX from this Monday to 12/14, with a maximum price of $2.00. In the first day of sale, 14 million of the 20 million tokens were purchased, indicating a huge demand for the service. However, API3 did face a sale attack on Mesa DEX that affected the token’s inflation curve slightly.
- Ultimately, API3 presents a powerful approach to increasing trusted interoperability between blockchains and third-party services. By partnering with API providers to enable them to host oracles, API3 formulates a deep, native connection between APIs and the blockchain, and will hopefully contribute to an explosion of oracles for blockchains to be able to ingest trusted, decentralized third-party data.
The Oracle Problem
The rapid development of decentralized applications (dApps), powered by various blockchains, demands better tools, abstractions, and primitives for interfacing with existing software and technology services. Several decentralized applications could significantly benefit from connecting with existing APIs, data plants, and cloud compute providers, but are limited in their capabilities to do so due to fundamental differences between these services and blockchain protocols. This is the classic “oracle problem” of the blockchain space –– how do we validate and safely import trustable data onto the blockchain from third party providers?
One of the biggest concerns of the oracle problem is a dApp’s behavior when invalid or corrupted data is imported to a blockchain. Since most dApps operate via automatic smart contracts, code could automatically execute using the invalid data, which can lead to disastrous downstream consequences. Particularly since the blockchain is well-suited for various financial services like lending and trading, these corrupt data imports could pose a significant threat to user’s assets, identity, and more. There is a pressing need for a trustable way to import external data from a third-party provider, while ensuring the safe, trusted operation of the underlying blockchain.
How do dApp developers solve this?
API3 is a new service that builds “decentralized APIs,” specifically designed for interfacing decentralized blockchain applications with third-party services.
API3 frames the oracle problem as “the problem of decentralized applications not being able to receive services from traditional API providers in a decentralized way.” Most previous solutions in the space take the approach of “decentralized operability,” where various oracles (essentially various middlemen building wrappers around APIs) feed data into an aggregator, which is governed by a centralized third party, that then converts the data into a format that the blockchain can ingest. The centralized operator poses a huge risk to the integrity of the network, because they have the potential to corrupt the data or incorrectly validate it, which can lead to corrupted data being written to the blockchain.
Fig 1. Decentralized interoperability versus decentralized APIs (API3 White Paper)
In contrast, API3 pursues a decentralized API approach. Here, several APIs feed their data to an aggregator, which then undergoes a round of decentralized governance. Once the governance protocol has validated the data, the data is then converted into a format that can be natively interpreted by various blockchains.
How do decentralized APIs (dAPIs) work?
API3 developed Airnode on Ethereum, which is essentially a decentralized oracle that can be run and operated by existing API providers, with almost no friction. One of the classic challenges of the decentralized API approach is that traditional API providers are often extremely unfamiliar with blockchain architectures, and it requires a ton of lift for them to be able to operate decentralized oracles. Airnode is essentially a wrapper on a traditional Web API that operates in a decentralized manner, allowing the data to be written to a blockchain.
This approach of having API providers operate their own oracles allows API providers to much more easily service blockchain applications, and manage metadata like traffic, credits used, etc. which are critical for monetization and reliability. ChainLink’s top node operators earned up to $100,000 in recent DeFi crazes; extending those rewards directly to API providers and third-party services could open up an entire new market for decentralized API providers. The API3 team plans to work with several API providers to begin rolling out services to existing blockchain applications. dApps can request the build of a decentralized API here.
Additionally, API3 offers data consumers with the option to enable on-chain insurance, where in the case of an oracle or API malfunction, data consumers are compensated for their losses and inconveniences; the exact mechanisms are to be determined by the Airnode’s governing body. This approach incentivizes those in the API3 governing body to maintain high standards for data and integration quality, and also provides a deterministic fallback in the case of a technology failure.
How does this compare with existing approaches?
The biggest other player in this space is ChainLink, which takes the paradigm of decentralized interoperability as described above. ChainLink’s key advantage is that it allows blockchain applications to interface with third-party services, without requiring any additional effort from these third-party services. This fundamentally means the marketplace of services available on ChainLink greatly exceeds that of API3 today.
Nonetheless, the fundamental problem with the ChainLink approach is that there are several vulnerabilities when centralized middlemen are responsible for data conversion and validation. In the short-term, while developers are incentivized to build quickly and break things, the middlemen approach works out just fine; as these applications become more and more mature however, there is a stronger emphasis on high standards for data quality and reliability. API3’s approach requires some leverage from third-party providers, but makes things as simple as possible with their Airnode wrapper.
How is decentralized governance implemented for dAPIs?
dAPIs are fully governed by a decentralized autonomous organization (DAO) or dAPI service providers, data consumers, and folks familiar with the blockchain and API integrations space. These DAOs will govern parameters like staking rewards, collateral for dAPI insurance, and broad governance for the DAO, which has the power to invest funds in certain projects (like building or hosting a new decentralized integration, etc.).
Membership in the API3 DAO is determined by ownership of the API3 token. The public token sale for API3 began this Monday on the Mesa DEX and will continue till December 14th. 20 million tokens will be for sale, which constitutes 20% of the total token supply of 100 million API3 tokens. 30% of the remaining tokens will be allocated for API3’s founders, 35% will be allocated to ecosystem builders, and 15% will be allocated to investors.
Fig. 2: API3 token allocations (API3 Blog)
The sale began with a price of $0.30 per token and is currently hovering at $1.28 at time of writing. The final price is capped at $2.00. More information about the token distribution, including the vesting structure and bonding curves, can be found on API3’s blog. Here’s a guide into how to take part in the distribution.
In the first day of sale, roughly 14 million of the tokens have been purchased, and the DAO has raised roughly $14M in USDC via the sale. However, the distribution did face an attack on Mesa’s Gnosis protocol in which the attackers were able to purchase the first four price tiers of tokens at a flat rate of $0.57. The attackers were not able to “steal” any tokens per se, since they purchased at a price higher than the tiered prices, but the attack did affect the token’s inflation, and most users purchased API3 at a price of $1.06 instead of the expected price after the first batch of $0.98. The API3 team is working closely with Mesa to understand the mechanism behind the attack and to determine amends and next steps.
Final Thoughts
As developers come up with more exciting and diverse use cases for blockchain protocols, dApps will need better, trusted ways to interface with existing third-party data providers and stores. Existing solutions, while functional, make fundamental architectural assumptions that could compromise the data being ingested into a blockchain, essentially invalidating the trust that dApp users have in underlying services. Corrupted data writes can lead to immense downstream catastrophes, due to the highly networked and automated nature of dApps and smart contracts.
API3’s solution of enabling third-party services to operate their own oracle, an Airnode, enables blockchain interoperability with third-party services in a decentralized fashion. The API3 DAO governs the operation of the Airnode, and is financially incentivized to ensure that high quality, trusted data is being serviced. Given the immense returns that oracle node operators can earn from blockchain-API integrations, it’s likely that more third-party services will begin capitalizing on the explosion of DeFi applications by operating their own oracle nodes; Airnodes make this ridiculously easy for them. Ultimately, API3 presents a powerful solution to bridging the compatibility gap between traditional technology services and those implemented on a decentralized blockchain.
Financial Advisor within ING
4 年The oracle of web3! Backed by great investors, no doubt about its potential.
Entrepreneur. Investor. Advisor. Podcaster.
4 年really loved this write-up. API3 seems like an exciting opportunity.
Great article on API3, thank you for sharing Paul! Excited about the future where blockchains will interface seamlessly with the real world and dramatically expand the TAM for smart-contracts beyond DeFi. I think API3's Airnode will be a game-changer.
Web3 and DAO founder, contributor, investor, community incubator, advisor, musician and event producer
4 年Really great article! Thanks for sharing Paul Veradittakit welcome to the DAO!
Great newsletter, Paul!