Comparing two oracle projects: Witnet 2.0 versus API3

The next step in our series where we discuss oracle projects is API3.

Rokowski
The Witnet Oracle Blog
6 min readDec 1, 2023

--

Before we get into the meat and potatoes of this article, I should make note of the fact that while Witnet 2.0 is not live yet, we are choosing to compare it to other projects due to the fact that we have a solid foundation for how the network will look when its migrated and data and models based on that understanding.

Take a look at the comparison article about Witnet 2.0 versus Band Protocol, the Chainlink one, the Pyth one, or this article about choosing the correct oracle.

The Layer 1

If you have been following this series, you undoubtedly know by now that Witnet is a layer 1 blockchain oracle, the first Proof of Stake layer 1 oracle in the cryptocurrency industry. Aside from the robust security system that Proof of Stake offers, Witnet was able to be specifically crafted to solve the oracle problem that states that you can’t receive off-chain information on-chain without breaking the consensus mechanism (think of Ethereum).

By being a layer 1, Witnet is also not boxed in by the chain it’s reporting to. When a network is particularly congested or expensive, Witnet is still able to perform its job flawlessly because it is not relegated to the chain. Additionally, if that chain fails, Witnet will live on because it’s uptime isn’t related to the uptime of any other chain, only the nodes running the Witnet software.

API3 isn’t a blockchain or network, but rather a series of nodes, dubbed “Airnodes” that essentially aggregate data information from off-chain and bring it on-chain. From the getgo, this means that API3 is relegated to the rules, consensus mechanisms, and security from the chain(s) it is operating on. This can create a single attack vector or point of failure.

Gathering data

Within Witnet, data is gathered when various, anonymous, and randomly selected nodes go to different data points to retrieve a piece of information. That information is aggregated together into one data piece after all faulty data has been removed- this protects the final endpoint from being wildly off due to a node retrieving information that could be faulty for whatever reason. The Witnet data request must be within a consensus threshold for it to be valid, which means nodes must agree on the final data.

Witnet nodes go to differing first order sources to retrieve information. This means they go directly to the source; for the price of Bitcoin they would go directly to various exchanges as opposed to CoinMarketCap or CoinGecko that just aggregates the data from different exchanges. This means that the data can’t be tampered with by the nodes, because they don’t have the ability to present faulty information via the source. These sources are also chosen by the requester of the data, and not the node itself.

In the case of API3, the owners of the data are allowed to become the reporters of the data. These are referred to as “airnodes” within the API3 protocol and it allows API providers to become dAPI providers and create data points that can be used by decentralized applications. Sound familiar? Well that’s very similar to Pyth.

API3 is considered a first-party oracle because there is no intermediary that retrieves the data. Based on this definition, Witnet would be a “third party oracle”. As is the case with many definitions in the cryptocurrency sphere, there is no standard or protocol to define things and decentralization can be a spectrum. That’s why the Alliance of Decentralized Oracles is trying to determine the correct way to define these things. Either way, API3 has some major holes.

API3’s system is entirely based on trust. By allowing data owners to control whatever data is being put on-chain, they have essentially a zero sum game because there is no cost to attack protocols using these data feeds if you own the data they’re receiving.

By using API3 for your smart contracts, you are trusting the data owners to do the right thing. This is the antithesis of a decentralized internet and equitable access to the internet.

Coming to Consensus

Information on API3 and Witnet, as is the case with most oracles, is aggregated together to form one point of data that is readable and usable. These aggregation functions can help avoid data that is also way outside a specific deviation from the pack. In the case of Witnet, that data is filtered out based on the parameters set by the developer requesting the data (i.e. any data point that strays outside of 1.5%).

Witnet has a highly decentralized system for the aggregation of data. Developers choose how many nodes they want to retrieve some information and the percentage that need to agree on that data. These nodes will retrieve this piece of data and cryptographically commit to it, so that they can’t change it after it has been revealed. The data is then aggregated based on the parameters set and communicated to the requesting chain.

$WIT and $API3

The WIT coin has a very practical use case for oracle data solutions when compared to API3.

The WIT coin directly secures the Witnet network, data feeds, and thus DeFi applications. The WIT coin is required to be staked as collateral for nodes to be able to fulfill data requests. This means that in most cases it is much more profitable for nodes to work to fulfill data requests honestly than it would be to attack a given data request.

API3 has a DAO that allows token holders to stake and vote on protocol measures, similar to Pyth. In addition to this, the staked tokens are used as a collateral measure to provide some level of security but it seems as though that this comes directly from stakers and not data owners which means that these data owners have no cost to attack the protocols using their data.

Developer experience

Witnet has easily one of the best developer experience for those that care about security and stability. Developers can choose where the data sourced comes from, how often they get updated, how much they’re willing to pay for it, how much $WIT must be used as collateral, how many nodes they want to go query the data, how to aggregate it together, what to do with outlier data, how secure the feed should be, and much more. This is arguably one of the best systems in Web3 for those looking for highly parameterized data feeds. Witnet isn’t as scalable as API3 but that was a clear design principle because by being scalable you lose decentralization and security.

API3 is highly scalable but loses some security and decentralization. API3 does allow for anyone to use their feeds without permission, which is a huge plus. API3 also has a system for accessing real world data feeds which can be beneficial to help grow the Web3 circular economy and bringing institutions on chain.

Both oracles allow developers to create their own feeds which can be powerful when building permissionless protocols. For API3, this is referred to as self-funded feeds or managed feeds. Via Witnet, there isn’t a specific “product” but rather it’s just built into the protocol. Either way, it is very refreshing to see oracles built with this design in mind.

Conclusion

We have now taken a look at multiple oracle projects and compared them to Witnet and Witnet 2.0. API3 is a strong project helping to lead the world on-chain. It remains to be seen how the market will determine the importance of decentralization in the long run. One thing is clear though: Witnet is the best choice for truly decentralized applications.

Connect with Witnet

Website | Twitter | Telegram | Discord | YouTube | Reddit | LinkedIn

--

--