Chainlink Rival? Pantera Partner Interprets API3 Operation Mechanism
Author: Paul Veradittakit, Partner at Pantera Capital
Recently, Pantera Capital, in collaboration with Placeholder, Accomplice, CoinFund, Digital Currency Group, and Hashed, invested in the API3 project. API3 is a solution we believe can effectively address the oracle problem and provide data for decentralized applications.
The classic oracle problem in blockchain revolves around how blockchain protocols can reliably and trustworthily collect data from third-party sources. Given the highly networked and automated nature of decentralized applications (DApps) and smart contracts, the ingestion of corrupted or invalid data by oracles can have severe consequences for users.
API3 is a solution promoting the development of "decentralized APIs" (dAPI), essentially functioning as on-chain aggregator contracts. dAPIs are managed by DAO third-party service providers, who operate their own oracles that can directly write data to the blockchain. These oracles are all governed by the API3 decentralized autonomous organization (DAO).
Third-party services utilize API3's Airnode, which is essentially an "oracle packager" for Web APIs, enabling third-party service providers to easily host and operate their own oracles. API providers can also benefit from oracle operations, including increased API traffic and blockchain rewards from hosting oracles.
API3 also offers data users a form of "data insurance," where the DAO compensates claims for any 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 without requiring additional work from these providers. While this approach is functional, it poses risks if the intermediary oracle node operators are malicious, and it also excludes the possibility for API services to receive full compensation for how their data is used on the blockchain.
Airnode is managed by API providers. DAO membership is determined by ownership of API3 tokens, which grant holders the right to vote on parameters such as staking rewards, insurance collateral, and DAO fund allocations. From this Monday until December 14, 20 million API3 tokens (20% of the total supply) were distributed on the Mesa decentralized exchange (DEX) at a maximum price of $2.00.
On the first day of the sale, 14 million of the 20 million tokens were already purchased, indicating a huge demand for this service. However, API3 did face a sale attack on the Mesa DEX, where attackers could buy the offered tokens at the lower end of the price range.
Ultimately, API3 provides a powerful method for enhancing trustless interoperability between blockchain and third-party services. By collaborating with API providers to enable them to operate serverless first-party oracle nodes, API3 builds a deep native connection between APIs and blockchains, promising to facilitate explosive growth in oracles, allowing blockchains to ingest trustless, decentralized third-party data.
Oracle Problem
Numerous public chains have driven the rapid development of DApps, necessitating better tools, abstractions, and primitives to interact with existing software and technology services. Multiple DApps connecting with existing APIs, data factories, and cloud service providers could benefit significantly.
However, the fundamental differences between these services and blockchain protocols severely limit relevant capabilities. This is the classic "oracle problem" in the blockchain space—how to securely import trusted data from third-party providers to the blockchain and verify it?
One of the biggest concerns regarding the oracle problem is: how will DApps behave when invalid or corrupted data is imported into the blockchain? Since most DApps operate through automated smart contracts, the code can automatically execute with invalid data, potentially leading to catastrophic downstream consequences.
Particularly because blockchains are well-suited for various financial services, such as lending and trading, importing this corrupted data could pose significant threats to users' assets, identities, and more. There is an urgent need for a reliable method to import external data from third-party providers while ensuring the secure operation of the underlying blockchain.
How Do DApp Developers Solve This Problem?
API3 is a new service for building "decentralized APIs," specifically designed for the interaction between blockchain DApps and third-party services.
API3 describes the oracle problem as "the issue where DApps cannot receive services from traditional API providers in a decentralized manner." Most previous solutions in this space have adopted a "decentralized operability" approach, where various oracles are "built around APIs by intermediaries that package data into a format that can be imported into the blockchain."
Data is fed into an aggregator controlled by centralized third parties, which then medianizes the input values from the nodes to arrive at a value used to execute a function in the consumer contract (DApp). Centralized operators pose a significant risk to the integrity of the network, as they may corrupt data or incorrectly validate it, leading to corrupted data being written to the blockchain.
Figure 1: Decentralized Interoperability vs. Decentralized API, Source: API3 White Paper
In contrast, API3 adopts a decentralized API approach. Multiple APIs feed data directly to the aggregator without the need for third-party intermediaries.
How Does dAPI Work?
API3 has developed Airnode on Ethereum. Airnode is an off-chain solution that uses Ethereum nodes to feed data to an aggregator contract on Ethereum. This aggregator contract is the dAPI called by user contracts. Airnode is essentially a node that can be run and operated by existing API providers with minimal friction.
A classic challenge of the dAPI approach is that traditional API providers are often very unfamiliar with blockchain architecture and need to significantly enhance their capabilities to operate nodes. Airnode essentially acts as a packager for traditional Web APIs, allowing data to be written to the blockchain.
This method of allowing API providers to operate their own oracles enables them to more easily serve blockchain applications and manage traffic, points used, and other metadata, which are crucial for monetization and reliability. During the recent DeFi boom, top node operators of ChainLink earned up to $100,000 in revenue.
Directly pushing these rewards to API providers and third-party services could open up a whole new market for them. The API3 team plans to collaborate with multiple API providers to start offering services to existing blockchain applications. DApps can apply to build decentralized APIs here.
Additionally, API3 provides data users with the option to enable on-chain insurance, compensating users for losses in the event of oracle or API failures (which should be quantifiable to meet claim conditions); the exact mechanism will be determined by the API3 DAO. This approach incentivizes members of the API3 governance body to maintain high standards for data and integration quality, providing a certain suboptimal solution in the event of technical failures.
What Advantages Does It Have Compared to Existing Methods?
The most powerful project in the current field is ChainLink, which adopts the decentralized interoperability model described above. ChainLink's main advantage is that it allows blockchain applications to interact with third-party services without requiring any additional work from these third-party services.
Nevertheless, the fundamental issue with the ChainLink approach is that there are several vulnerabilities when centralized intermediaries are responsible for data transformation and validation. In the short term, it can incentivize developers to quickly build and innovate; however, as these applications mature, there will be a greater emphasis on high standards for data quality and reliability.
API3's approach requires some degree of reliance on third-party providers, but the Airnode packager simplifies matters as much as possible. To scale the available data, there are two realistic options: 1) have API providers operate their own nodes or 2) steal. Third-party systems choose option 2, while API3 opts for option 1 by configuring Airnode.
How Does dAPI Implement Decentralized Governance?
dAPI is entirely managed by the DAO or dAPI service providers, data users, and individuals familiar with the blockchain and API integration space. These DAOs will oversee parameters such as staking rewards, dAPI insurance collateral, and general governance of the DAO, with the authority to invest funds in certain projects (such as building or hosting new decentralized integrations).
Membership in the API3 DAO is determined by ownership of API3 tokens. API3 tokens began public sale on Mesa DEX this Monday and will continue until December 14. A total of 20 million tokens will be sold, representing 20% of the total supply of 100 million API3 tokens. Of the remaining tokens, 30% will be allocated to API3 founders, 35% to ecosystem builders, and 15% to investors.
Figure 2: API3 Token Allocation, Source: API3 Blog
When the token sale began, each token was priced at $0.30, and as of the time of writing, it hovers around $1.28. The final price cap is set at $2.00. More information about token allocation, including vesting structure and joint curves, can be found on the API3 Blog. Here is a guide on how to participate in the token distribution.
On the first day of the token sale, approximately 14 million tokens were already purchased, and the DAO has raised around $14 million through the token sale in USDC stablecoin. However, the token issuance faced an attack on the Mesa Gnosis protocol, where attackers were able to purchase tokens at a uniform price of $0.57 across the first four price tiers.
Attackers could not "steal" any tokens themselves, as they purchased at prices above the tiered prices, but this attack did affect the appreciation of the token price, with most users purchasing API3 at $1.06, rather than the expected price after the initial sale price of $0.98. The API3 team is working closely with Mesa to understand the mechanisms behind the attack and determine patches and next steps.
Conclusion
As developers bring more exciting and diverse use cases to blockchain protocols, DApps will require higher quality and more trustworthy methods to interact with existing third-party data providers and storage.
While existing solutions have this functionality, they carry fundamental architectural assumptions that may introduce corrupted data that jeopardizes the blockchain, effectively leading DApp users to distrust the underlying blockchain services. Given the highly networked and automated nature of DApps and smart contracts, writing corrupted data could lead to significant downstream disasters.
API3 enables third-party services to run their own oracles—the Airnode solution allows blockchains to achieve interoperability with third-party services in a decentralized manner. The API3 DAO manages the operation of dAPI and is financially incentivized to ensure that services provide high-quality, trusted data.
Given that node operators can earn substantial returns from blockchain-API integration, it is likely that more API providers will operate their own nodes to capitalize on the explosive growth of DeFi applications; Airnode will make this goal extremely easy. Ultimately, API3 provides a powerful solution to bridge the compatibility gap between traditional tech services and application services on decentralized blockchains.