API3 Review: Building Decentralized APIs for Web 3.0

Last updated: Mar 30, 2023
18 Min Read
AI Generated Summary
Summary
Summary

Decentralized Autonomous Organizations, more commonly called DAOs, are an increasingly common way of providing hands-off governance for blockchain projects, and one of the projects recently in the spotlight is API3.

The project is an ambitious one that is looking to tackle the “Oracle problem” and find a way to connect the various APIs of data providers. The approach of building a decentralized API network (dAPI) is what’s drawn so much attention to the project. It has also been called the “Chainlink Killer” and that name is also bringing a lot of hype to the project.

In the following review we will take a look at the API3 project and how it works, while also discussing its approach to solving the Oracle problem. We will also look at the tokenomics of the project, while discussing the use cases and key features of API3.

What is API3?

In order to get a grasp on the concept of what API3 is doing we first have to understand what the API itself does. The acronym API stands for Application Programming Interface, and it is a well documented protocol that enables the transfer of data and services.

APIs have long been in use by web and mobile applications and programmers are extremely familiar with them. One example of an API is the method that’s used by the various cryptocurrency exchanges to provide data to the aggregators like Coinmarketcap.com.

API3 Logo
The API3 project is a potential solution to the oracle problem. Image via API3.org 

The API is extremely handy for all types of applications. It’s also been used to monetize data in many cases where data providers allow developers to include their data in an app for a fee. This is quite positive for software development since it is one way for developers to more efficiently build their app without having to create everything themselves. Think of APIs like a Lego set, where developers can choose what they need and then snap it into their applications. Without APIs many applications would fall apart.

While all of this sounds wonderful for application development, there is a problem occurring due to the evolution to dApps and Web 3.0. That problem is the API infrastructure is not compatible with these new technologies. However, API3 is working to make it possible for the older API data providers to connect their data sources to smart contracts without the need for a third-party intermediary. They are accomplishing this through the dAPI decentralized blockchain API network.

Value Proposition of dAPI

Prior to the API3 solution it was thought that oracle technology could provide data to smart contracts as a middleware solution. One of the best known of these is Chainlink. The Chainlink solution has a node that sits between the API provider and the smart contract that requires data. The problem is that this adds a new intermediary to the process, and one of the guiding principles in decentralization is to remove third-party solutions.

One issue with this design is that often an oracle network will be rent-seeking, meaning the cost of everything is continually rising. And since Chainlink has become a dominant oracle network it is also gaining a monopoly over data feeds, which is creating a type of centralization. Additionally, there is no way to govern the data being provided to the oracles. Yes, the nodes are punished for providing bad data, but there’s no penalty enforced on the data provider.

Chainlink Oracle
Requests on Chainlink are distributed across both oracles and data sources. 

API3 believes the solution is to allow the API providers to run their own nodes. This creates competition that will lower inflation, it promotes decentralization, and it allows a way to actually govern the data providers themselves. With the immense growth of the DeFi economy it is crucial that applications are able to source trustworthy and reliable data. And one way to ensure this is to make the process as transparent as possible.

Under the API3 system each oracle would own their data and the services being provided, making them first-party oracles. This not only increases decentralization, it will also allow the data feeds to be curated transparently, which is an important consideration in DeFi applications.

The Oracle Problem

One of the most well known issues facing smart contracts for years has been the oracle problem. It arises because when you have an on-chain smart contract with enforceable functions and rules it seems very useful. Until you realize that it is only useful with the data already inside the Ethereum network.

As an example from financial markets, there’s no way to make a smart contract on the price of an asset, such as an equity or gold, when the only source of data is off-chain. And there’s the heart of the oracle problem.

Oracle Problem
What's a blockchain to do when it needs off-chain data? Image via InfoQ.com 

How is it possible to get this data on-chain, and how do you do it in a decentralized and trustless manner? And in addition to that how can you protect against an attack on the data source, and verify the truth of the data? When relying on oracles you are increasing the available attack vectors on the smart contract and on the oracle provider.

Ever since smart contracts were developed blockchain engineers have been looking for ways to solve the oracle problem, and they’ve gone at the solution in a number of ways. Some of these, like Augur and Gnosis, use the very circuitous method of prediction markets. But the preferred method has always been an oracle provider that will deliver data anonymously, cost-effectively, and without the need for any third-party intervention.

That’s led to the creation of Chainlink.

Chainlink Onchain
Behavior of an on-chain Oracle as defined by Chainlink. Image via: Chainlink Whitepaper 

Considering the current state of solutions that include oracles we can’t very well discuss the oracle problem without discussing Chainlink. It’s become the most well-known oracle solution, and in the past several years the project has made significant strides in the blockchain industry. They have a large and invested community, and their LINK token is positioning itself to be one of the blue-chip crypto tokens that could stand the test of time.

However all is not perfect with Chainlink. It does have problems. Problems that API3 can solve.

The API Problem

So basically the oracle problem is really just an oversight in the development of smart contracts on the Ethereum network. The development of oracles did not consider the decentralization of the nodes collecting and delivering oracle data. And we shouldn’t overcomplicate the problem by considering that anyone could deliver oracle data, should we?

In reality the problem that oracles solve isn’t as complex as many might have you believe. What oracles are trying to solve, in a fairly complex manner, is simply the ability to pull off-chain data into on-chain smart contracts. In that respect oracles have been compared with APIs used in web and mobile apps since both solutions are used to deliver data to an end consumer.

Data Transfer
Oracles are just one way to pass data to a blockchain. Image via 3commas.io 

So, rather than thinking of an oracle as an abstraction of the API, why not just use the actual design philosophy of the API in the blockchain?

Wouldn’t it be better to design an network where you can use an API call to get data rather than paying an oracle several dollars? Even if the oracle cost is brought down to pennies it would be quite expensive over time. And wouldn’t it be good if you actually knew where the data was coming from rather than trusting in a series of anonymous nodes?

Finally, wouldn’t it be great to avoid all the possible attack vectors opened by the use of oracles and just deliver data in a seamless integration without any additional security risks?

That’s exactly what Chainlink can’t do, but what API3 is trying to do.

The API3 Solution

Now that we know all the problems in delivering data on-chain to smart contracts let’s look at how API3 plans on solving the problems more effectively than the current oracle-based solutions.

Basically API3 wants to take all the value that would be passed to the nodes in Chainlink and deliver it to the actual data providers. This gets rid of the middleware. Rather than plopping some nodes in between the data providers and the smart contracts, API3 suggests it would be better to simply make the data providers themselves nodes.

That gets rid of an additional, and unneeded layer and solves a number of the problems that Chainlink is already working against, and others that it will face in the future as it scales.

Chainlink vs API3
The chainlink solution (left) vs the API3 solution (right). Image via API3 Whitepaper 

Consider that the data providers under API3 will now have a reputation to uphold. They are no longer anonymous, but are providing their data directly to consumers, and if that data is flawed it is immediately known and there are repercussions.

In oracle solutions the node is punished, but the data provider can continue providing false data with no penalty. And because nodes in Chainlink are anonymous no one ever knows which node was involved in the bad data either. The API3 solution means that the data providers are directly invested in the process and in the truthfulness of their data.

The API3 solution removes the possibility of ‘oracle bribing’ and it’s done so in a most cost effective manner. To be certain Chainlink has also solved the oracle bribing problem, but the solution they’ve used is prohibitively expensive. In order to avoid the possibility of a node being bribed Chainlink has designed its network to use multiple nodes to deliver the true data, but each node is expensive, and using multiple nodes becomes very expensive.

Airnodes
Airnode is designed to be deployed once by the API provider, then not require
any further maintenance. Image via API3 Whitepaper 

The API3 solution is called Airnode. It is deployable on-chain and it requires very little in the way of onboarding for the API provider. The API3 team is able to assist, making the addition of Airnode easy. And it is a set it and forget it solution, requiring no maintenance on the part of the API provider. The data is there, live on-chain and available to anyone who wishes to call it. There’s no nodes required, no need for incentive costs, and no added attack vectors.

It’s a simple and elegant solution.

How does Airnode Work?

Airnode was developed by API3 on Ethereum’s network. It is an off-chain system that feeds data to an aggregator contract using Ethereum nodes. That aggregator contract is a decentralized API that is callable from other contracts. In essence Airnode is an oracle node, but it is operated by the API providers in an almost frictionless way.

A challenge to decentralized API solutions has been that the API providers are relatively unfamiliar with blockchain architectures and systems, meaning it is extremely difficult to transition them to the operation of oracle nodes. By providing a solution like Airnode, which is basically a wrapper on a traditional Web API, the API providers can easily have their data written to a blockchain.

Airnodes Cloud
The Airnodes API gateway works just like a piece of cloud service infrastructure. Image via API3 blog. 

By allowing API providers to run their own oracles it becomes far easier for them to service blockchain applications and to manage all the metadata that’s needed for reliability and monetization of the data. In the oracle system the top Chainlink node operators have been able to earn as much as $100,000 per month as DeFi becomes increasingly popular.

If those rewards were extended directly to the API providers it could open up a whole new market for the providers, and decreased costs for the applications that use the dAPI data.

An additional benefit of API3 is that is allows a data consumer the option of using on-chain insurance. This insurance protects them from the malfunction of an oracle or API, and compensates data consumers for quantifiable losses. This method provides an incentive for the API3 governing body to maintain integration and data quality, while also allowing a fallback in the event of a technology failure.

API3 Token Use Cases

API3 intends on using a decentralized autonomous organization (DAO) for its governance, which means every participant in the ecosystem will have their own say in the development and security of the network.

API3 Ecosystem
The complete ecosystem and interactions on API3. Image via API3 Whitepaper. 

As a result the API3 token will have the following use cases:

  • Staking: API3 token holders can stake API3 to earn rewards and participate in on-chain governance.
  • Governance: There is a direct economic incentive for voting, as stakers receive a portion of dAPI revenue and their staked tokens are collateral for on-chain insurance.
  • Collateral: The staking pool will act as collateral for on-chain insurance.
  • Payments: There will be a subscription fee for dApps using the dAPI network. Additionally, data providers will receive payment in API3 tokens.
  • Disputes: In the case of loss of revenue due to malfunction, downtime, or incorrect data, dApps using will be able to open disputes to raise an insurance claim. The team plans to use Kleros to resolve insurance claims.

Governance Hype

Governance, specifically decentralized governance, seems to be a requirement of any blockchain projects these days. API3 has that covered as it plans on following a DAO governance model. That adds to the value of the tokens beyond a simple monetary value.

It means those who own and stake API3 tokens have a say in the governance of the blockchain. They can decide to vote for or against any updates to the fee structure, or other governance changes that could have an impact on their investment in the project. Considering that API3 will be a data marketplace this could be quite powerful, and is a bullish signal for the project.

API3 DAO
The concept of DAOs and sub-DAOs put forward by API3. Image via API3 Whitepaper 

Included in the governance aspect is a staking mechanic, which not only allows for voting and governance, but also rewards those who are willing to stake their tokens as insurance against data errors or malfunctions in the system.

It would be naïve to think that this won’t happen, but with a good design they should be few and far between. We’ve already seen similar errors occur on other platforms, and it is good to see that API3 is acknowledging this and putting in a solution for the possibility.

The other benefit to staking is that it reduces the circulating supply, which is always good for price.

The API3 Team

API3 was co-founded by three individuals. The team lead is Heikki Vanttinen who led a development team of about 20 members. He is a veteran in the segment of the language machine.

He was joined by Burak Benligiray, a former Google scholar. He is also the former CTO at CLC Group and Honeycomb. According to his own curated online resume he does oracle and vision stuff. He has a passion for smart contracts and bringing cutting-edge technology into real-world use. Previously he has worked at start-ups and provided freelance research consultancy in computer vision and artificial intelligence.

Heikki Burak Sasa
The three API3 cofounders. Image via LinkedIn.com 

The third co-founder of the project is Saša Milić, who describes herself as a software engineer / data scientist / researcher in the cryptocurrency / blockchain space. Prior to joining API3 she worked in software engineering (both small startups and large tech companies including Facebook), data science in venture capital, research (computational linguistics, cognitive science) and teaching (computer science, data science) in both academia and industry.

The API3 Token

API3 raised $3 million this past November in a private funding round. That was followed by a public sale in December 2020. That public sale raised $23 million and API3 tokens were sold on a bonding curve starting at $0.30 each and going up to $2.00. Since then the token has done very well, returning roughly 1,300% on a USD basis to the early investors.

With a total supply of 100,000,000 API3 tokens there were a total of 30,000,000 sold in the private (10 million) and public (20 million) sales. It’s notable that only the public tokens are unlocked. All the other tokens are subject to either 2-year or 3-year vesting schedules. Tokens are required for staking and governance as well, so the early investment seems to be quite a smart move.

API3 Token Allocation
Most of the API3 tokens will remain unvested for 2-3 years. Image via API3 blog, 

The tokens began trading on December 1, 2020 at $1.30 and immediately began climbing higher. Within a week they were solidly above the $2.00 level. There was a dip back under $2.00 at the end of 2020. The price climbed steadily in early 2021, and jumped sharply in mid-January 2021, basically doubling to a high of $4.70 on January 17, 2021.

That sharp move higher was part of a broader move in all the DeFi linked names at the time, so it’s uncertain if the gains will hold, or if the token will drift back down in the coming weeks.

Conclusion

There’s no doubting that as blockchain usage grows, and developers come up with more novel and complex use cases the dApps created will also need better ways to interface with third-party data sources. The existing oracle solutions are functional, however there have been compromises made in their design that could lead to serious problems as the solutions need to scale.

Data could be compromised, and costs are likely to increase to the point of exclusion. In the case of data compromise or corruption the impacts could be huge as the highly automated nature of smart contracts and dApps could see any data corruption spread throughout the entire network.

The solution from API3 that enables the API providers to operate the Airnode oracle would give us interoperability with third-party services in a decentralized manner. And it will also ensure that the API providers are incentivized to provide trusted, high-quality data.

When you consider the huge returns that node operators in oracle systems have seen it is pretty likely that API providers will be glad to capitalize on their ability to easily provide data and services via the incredibly easy to implement Airnodes.

Unless something superior comes along it appears that API3 is bringing a powerful solution to the problem of connecting traditional API services and decentralized blockchain technology.

It’s certainly too early to determine if API3 will be the solution to the oracle problem, but things do look very promising in these early days. You may want to keep your eyes on this project and see how it develops and grows.

Steve Walters

Steve has been writing for the financial markets for the past 7 years and during that time has developed a growing passion for cryptocurrencies.

Disclaimer: These are the writer’s opinions and should not be considered investment advice. Readers should do their own research.

Previous article
Reef Finance Review: The Gateway To DeFi
next article
NEAR Protocol Review 2024: Updates You Don't Want to Miss!