Taking a look at two oracle projects: Witnet 2.0 versus Pyth

Moving on in our comparison series where we discuss differences between Witnet and other oracles, today we have Pyth; a major player in DeFi.

Rokowski
The Witnet Oracle Blog
5 min readNov 16, 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, or this article about choosing the correct oracle.

The Layer 1

If you’ve done any research on how Witnet operates, you should undoubtedly know at this point that it is a layer 1 oracle. The point of being a layer 1 is to specifically tailor the operation of the chain to that of the oracle problem. The oracle problem states that blockchains can’t receive off-chain information in such a way that the consensus of the network is retained. By being a layer 1, Witnet does one thing incredibly well- fulfill data requests. By Bitcoin being a layer 1, it does one thing incredibly well- act as money and store and transmit value.

Pyth isn’t a layer 1 or 2, but rather a series of protocols running via the “Pythnet”, powered by Solana, that allows for different actors to publish and read from different data feeds that can be cross chain, if needed. Pythnet is the same validator software as Solana mainnet but is a “Pyth specific chain” independent of the SOL mainnet altogether. Similar to Witnet, Pyth is able to deliver all features even when any specific chain is congested, because these oracles don’t rely on the base-chain’s technology to function.

Gathering Data

Pyth has a very interesting system for publishing data, but it requires an enormous amount of trust of the publishers- which can work in practice, until it doesn’t. As defined in the Pyth whitepaper and documentation, publishers are market participants of information (as is the case with many oracles, price feeds are the most popular), typically the owners of the information or the APIs. Some of these publishers are exchanges like Gemini, OKX, Gate.io, etc., and others are market makers, trading firms, and capital management groups- no doubt a dangerous precedent to set.

Some of these firms that provide data could find incentives in co-opting it with other firms to break the feed and attack a protocol using it. Of course they would likely need to work with other data providers to make it happen at a specific time, but in essence this can be done because all the data providers are permissioned, known, and trusted by Pyth and users. In other words, by using Pyth you are trusting these data owners not to do this.

For Witnet, on the other hand, nodes are randomly selected based on a few different parameters. First of all, because nodes aren’t providing KYC in order to fulfill data requests like Pyth, Chainlink, and Band, they are not to be trusted. So how can we assume the data they provide is correct? Pure cryptoeconomic incentives. Witnet node operators are incentivized to remain honest because they lose out on a portion of their staked WIT, damaging their profit margins greatly. This mechanism is based on the cryptoeconomics of Bitcoin, in a way.

Because node operators running Witnet are anonymous and must cryptographically commit to the data they are fulfilling, it is near impossible to corrupt a specific data feed because an attacker doesn’t know who or what is the actual person or entity fulfilling it, making it impossible to co-opt.

Coming to Consensus

Arguably the most important thing for an oracle is to ensure consensus of information when fulfilling a data request. For Witnet, any outlier beyond a reasonable and predetermined (by the requester) deviation will be filtered out and their data won’t be used so that the final product isn’t magnitudes off. Pyth has a different system in place that is a two-step process based on the data fulfilled and the confidence interval. The process is supposed to act as a hybrid mean/median but relinquishes a lot of power to the publisher. “Even if a small percentage of publishers submit a price far from the market.” Pyth has a heavily trusted system in place that allows reporters to decide their confidence interval- that is, they are trusted to both provide accurate price feeds and tell the network how honest or confident they are. This can be a rather large attack vector.

$WIT and $PYTH

The WIT coin is used in the network to pay transaction fees, pay for data request updates, create and receive transactions, and most importantly: secure data requests. At any given time, there are hundreds of thousands of $WIT staked for a data request meaning that you, as an attacker, would need to command significantly more $WIT to pull of a profitable attack. This means that Witnet data requests are the most secure in the world.

Pyth recently announced their token launch that mainly centers around governance and fee payment of feeds. However there is no mention of staking or collateral described in the initial announcement, making Pyth data feeds vulnerable to many attack vectors and even clunkier than the initial rollout of Chainlink.

Developer experiences

Witnet has arguably the best developer experience out of any oracle on the market. 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. In addition, developers get to pay for the data feed in their native coin (the coin of the chain they’re building on) and there is an advanced bridging method to exchange the native coin for $WIT on the Witnet network. Additionally, developers can launch a data request on their own in a truly permissionless manner.

Pyth data feeds are actually set by the token holders. As they are launching their $PYTH coin, they have given token holders voting power via a DAO to help determine rewards, new feeds and the data the feeds come from, permission data publishers, and the size of the feeds. While this is one way to do it, it’s arguably far less efficient and developers must ask permission both for a feed and for certain parameters for their use case.

Conclusion

Witnet and Pyth both focus on different parts of the oracle problem and the blockchain trilemma independently. Witnet is secure and decentralized, and Pyth is scalable. It remains to be seen how important either of these properties are in the future, but one this is certain: truly unstoppable, freedom technologies must be decentralized from day 1.

Connect with Witnet

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

--

--