Telegram (AI) YouTube Facebook X
Ру
In Search of Truth: How the Witnet Decentralized Oracle Network Works

In Search of Truth: How the Witnet Decentralized Oracle Network Works

Over the past two years, hackers have repeatedly attacked DeFi protocols using flash loans — exploiting price-oracle vulnerabilities and manipulating data.

The Witnet project is building a decentralized network of oracles to protect the blockchain ecosystem from such breaches. It delivers reliable data from external sources to smart contracts on Ethereum and other blockchains. Here we examine how the Witnet protocol works, its ecosystem and the WIT token.

What are oracles and how they enable breaches of smart contracts

A smart contract is a computer program that implements the logic of a defined agreement between blockchain users without intermediaries.

Decentralized exchanges, lending services and other DeFi protocols often rely on data from sources outside the blockchain. These can include the average Bitcoin price on centralized exchanges, the price of gold on the stock market, or balances of addresses on other networks. Smart contracts cannot fetch this data themselves and query them from oracles.

Oracles are applications that, on request from smart contracts, read the required information and relay it to the blockchain. The integrity of the data governs the proper functioning of the application and the safety of users’ funds.

Malicious actors may interfere with an oracle’s operation to substitute the transmitted data and create opportunities for financial manipulation. For example, in November 2020, hackers attacked the DeFi project Cheese Bank, exploiting a vulnerability in price-valuation mechanisms of an oracle on Uniswap. As a result, attackers withdrew $3.3 million in stablecoins USDC, USDT and DAI.

The developers of oracles protect data using cryptographic signatures, integrity checks and averaging of values. The Witnet team has addressed information-security on its own terms: by separating oracles into a decentralized network with a consensus algorithm and rewards for oracle operators.

How the Witnet protocol works

In 2017, Stampery’s CTO Adam Sánchez de Pedro, CEO Danièle Levi and Aragon’s lead developer Luis Iván Cuende published the white paper Witnet: A Decentralized Oracle Network Protocol.

“Smart contracts will not be truly economically decentralized until we create a decentralized oracle that relies not on blind trust but on a digital analogue of the wisdom of the crowd,” say the authors of the paper.

The white paper describes the protocol with a network nodes (witnesses). They connect Ethereum smart contracts with external data sources: stock exchanges, sports sites, weather-forecast aggregators or blockchain explorers.

The veracity of the transmitted information is checked by the nodes themselves. They are rewarded for this with Witnet’s native token (WIT). Thanks to the economic incentive, node operators are motivated to relay truthful information.

Witnet implements a variant of the Byzantine Fault Tolerance (BFT) consensus algorithm using Proof-of-Eligibility (PoE). The BFT algorithm enables consensus even if one third of the nodes in the network do not respond or provide incorrect information.

During data delivery, only a subset of nodes participate at any moment. The network segments user requests into separate tasks, and then selects a subset of nodes to solve it.

To join the subset, a node first “knows” whether it can perform the task. This eligibility method, called the cryptographic sortition scheme, can be likened to checking for a winning lottery ticket by participants.

In Witnet, the probability that a node is suitable for solving the current task depends on its reputation. It is built on the basis of the node’s historical honesty and the quality of its performance on prior tasks.

Data requests to Witnet can be made using:

  • – domain-specific programming language RAD Object Notation (RADON);
  • – the Witnet Truffle box service, which lets you write data requests in Solidity on Ethereum. An instruction for creating data requests in Solidity опубликована on the Witnet site;
  • – using the desktop wallet Sheikah.

Each data request is paid for in Witnet’s native token (WIT). The process of obtaining, verifying and delivering data to smart contracts is called witnessing.

A simplified data retrieval process looks like this:

  1. The user publishes a request and specifies the data they need.
  2. Active nodes are selected via a lottery to perform the task.
  3. The selected nodes fetch data from the specified sources, consolidate it into a single result and verify its truthfulness.
  4. Other nodes record the result in the current block and add it to the Witnet blockchain.
  5. The user receives the data on the blockchain.

The data retrieval, verification and delivery process takes place within a single epoch lasting 90 seconds.

Witnet ecosystem: node, wallet and blockchain explorer

In 2017, Adam Sánchez de Pedro and Danièle Levi founded the not-for-profit Witnet Foundation, which oversees the development of the Witnet ecosystem.

The organisation develops Witnet-Rust — the implementation of the Witnet protocol in the Rust programming language. Witnet-Rust comprises two main components: a node and a wallet.

Witnet’s reference materials include a detailed guide to installing a node on Windows, Linux and macOS.

Each node stores the history of all transactions in the Witnet blockchain. The developers recommend running Witnet-Rust on a computer with 4 GB of RAM and 100 GB of free disk space. The Witnet team estimates the blockchain will grow by about 75 GB per year.

In June 2021 Danièle Levi founded the startup Other Plane Labs to develop the lightweight desktop Witnet wallet Sheikah. With it, users can send and receive WIT tokens, as well as create and execute data requests such as Bitcoin or Ethereum prices from one or more sources.

In July 2020, an anonymous developer under the pseudonym Dr. CPU introduced the Witnet Explorer blockchain explorer. Users can monitor blocks and transactions and view network statistics such as the number of mined blocks and active nodes.

Tокenomика Witnet: issuance and distribution of tokens

WIT — the native token of Witnet with a total supply of 2.5 billion units. At the time of publication, WIT trades at $0.033. The token is used to reward node operators and pay for data requests from network users.

Validators will receive 70% of the total token issuance. The remaining 30% of WIT were pre-mined in the genesis block of the mainnet. The project team allocated the premine as follows:

  • 250 million (10%) — to founders and early investors;
  • 250 million (10%) — to the Witnet Foundation;
  • 250 million (10%) — to participants of the presale on Republic, which took place in March 2018.

Block time in the Witnet network is 45 seconds. The reward per block is 250 WIT (about $9 at the time of publication). Witnet features a halving: every 3,500,000 blocks (roughly five years) the reward will be reduced by 50%.

Until the first halving in 2025, validators will mine about 1,920 blocks per day. The daily emission will be 480,000 WIT, the monthly 14.6 million WIT, and the yearly 175 million WIT.

Development: grant program, Gate.io listing and cross-chain integrations

On 23 November 2021 the Witnet Foundation launched a grant program to fund projects: protocol improvements, ecosystem development and community expansion. To participate, submit an application on the Notion page Witnet Grant Program.

In July 2021, a group of developers in the Witnet ecosystem launched WitSwap — a cross-chain bridge for wrapping WIT into ERC-20 tokens (eWIT). The bridge enabled a liquidity pool for eWIT on Uniswap v3. In December, centralized crypto exchange Gate.io listed WIT.

In 2021, the Witnet Foundation formed partnerships with Conflux Network, Boba Network and Metis, and in January with KuCoin Community Chain and Celo. According to Adam Sánchez de Pedro, in February the project will integrate Polygon and Harmony, and during 2022 — Avalanche, Moonbeam, Arbitrum, Optimism, Aurora, Klaytn, BSC, xDAI and Solana.

According to the data from the analytics service Witnet Data Feed, there are now more than 50 Witnet price channels deployed across 15 main and test blockchains. In 2022, developers plan to add 150 price channels that will operate in 50 networks. Projects using Witnet oracles include:

  • TriAngle — the leading lending protocol on the Conflux network. It uses the CFX/USDT price channel from Witnet to compute loans in the AUSD stablecoins collateralized by CFX.
  • Agora Space — a social blockchain platform. Using Witnet oracles, smart contracts receive access to decentralized verification of social-media data such as YouTube view counts or Twitter follower counts.
  • Aragon — a framework for creating decentralized autonomous organizations (DAOs). In combination with Witnet oracles it enables governance voting in Discord.

In October 2021, developers integrated a randomness oracle into the protocol. With it, Witnet users can create NFT collections and randomly assign traits to tokens. The organizers of the Ethereum developers conference LisCon used this oracle to issue the NFT collection Witty Creatures 2.0 on OpenSea.

Conclusion

Witnet is a decentralized network of oracles that provides DeFi services on Ethereum and other networks with safe access to reliable data.

Since the 2017 white paper, the Witnet team has built a multi-chain ecosystem, and the number of active nodes exceeded 5,000 as of February 2022.

In 2022 the Witnet Foundation plans to integrate 11 networks and fund ecosystem projects under the grant program. Oracles have become an important infrastructural component of the DeFi sector, so Witnet has every chance to occupy this niche.

Подписывайтесь на ForkLog в социальных сетях

Telegram (основной канал) Facebook X
Нашли ошибку в тексте? Выделите ее и нажмите CTRL+ENTER

Рассылки ForkLog: держите руку на пульсе биткоин-индустрии!

We use cookies to improve the quality of our service.

By using this website, you agree to the Privacy policy.

OK