API3 are building a network of first-party oracles – run by data providers themselves – to connect any real-world Web2 API to any on-chain smart contract. Operating as the second-biggest DAO on Aragon, API3 are also working together to design smart contracts to aggregate data from multiple first-party oracles that can function as decentralized APIs (dAPIs).
One of the limitations of distributed ledgers (DLs) such as Ethereum is that they are not compatible with off-chain APIs. This splendid isolation is known as the Oracle Problem and means, for example, that if a smart contract is programmed to purchase $ETH once it reaches a certain price in $USDC, it cannot query the UniSwap API directly to determine if that price has been reached.
To solve this lack of an on- / off-chain interface, networks of third-party oracles have sprung up as notary middleware to relay off-chain data into smart contracts that can be called by other smart contracts. To secure the integrity of this data, oracle networks usually require nodes to post their version of the data with collateral, which is forfeited if a majority of the other nodes on the network disagree.
Unfortunately, an issue common to all middleware solutions is that the security and decentralization of Ethereum does not extend beyond Ethereum nodes. This means that any smart contract that receives data from an oracle network is only as reliable as the external nodes that have supplied the data. Despite not having the security guarantees of Ethereum, oracle networks are still fully functioning DLs / blockchains that have to manage a similar stack of technical, economic and governance vulnerabilities. Prime among these are collusion between nodes to skew the data in a favorable direction and Sybil attacks that fabricate node identities for the same purpose. These risks can be mitigated if the network is of sufficient size but that cannot be achieved without a significant rent being extracted from the ecosystem to pay all of the node operators – usually node fees that are high enough to deter misreporting. This is sometimes pejoratively called a ‘middleman tax’.
API3’s approach has been to reframe the issue, not as an Oracle Problem, but as an API Connectivity Problem. From this perspective, an alternative to third-parties relaying data from APIs is to dispense with middleware networks entirely and for data providers to run their own nodes – first-party oracles – that feed data directly from an API into smart contracts.
Most data providers would not have the expertise to run full crypto nodes, so to facilitate their data provision, API3 have built a simple, open-source oracle node called Airnode, which data providers can run without gas fees, maintenance or having to to purchase the collateral token of a third-party network. Effectively wrapping their API in a Web3 gateway enables Airnode operators to sign their data with their own private keys at the platform protocol level (e.g. Ethereum), giving it the highest degree of possible integrity. Given that data providers have a bigger stake in their own reputation than third-parties, this is reasoned to be a more secure solution, technically and game-theoretically.
If there is only a single provider for one data stream, Airnode can serve that data more economically than a network of third-party oracles and without the risk of Sybil attacks. In the case of multiple first-party oracles for data such as the $BTC/USD price, API3 have written smart contracts to aggregate multiple Airnode streams together. These contracts declare which Airnodes they are aggregating, remove outlier results and average out the data to provide a single source of truth. These smart contracts then become de-facto dAPIs that can be called by any other smart contract.
Enabling data providers to serve their own data into smart contracts opens up a world of business models that had only previously been available to third-party networks. Aside from the obvious model of selling data, API3 expects that aggregation and curation services will spring up to provide decentralized access to all kinds of offline data via dAPIs.
dAPIs open up the possibility for DAOs to create conditional proposals that only execute upon certain real-world conditions being met.
For example, a viticulture DAO member might propose to purchase and plant vines during the last week of February, but only if the temperature is forecast not to fall below 16° in their region. To achieve this, the proposal contract could directly call a weather dAPI that aggregates data from AccuWeather, The Weather Channel, and Darksky (all running Airnodes), and execute if the dAPI consensus is 16° or above.
Another example in a world of possibilities would be for a DAO to cover the cost of members’ flights to a conference as long as the flights are not cancelled, with the data being fed into the proposal contract via an aviation dAPI.
In short, dAPIs allow DAOs to graduate from being exclusively on-chain organizations into entities that are able to traverse both on-chain and off-chain worlds simultaneously.
In every technological revolution there is an inflection point where a new development equips a technology for mass adoption. Enabling data providers to profit on-chain could be that point, as Web2 bridges to Web3 and users stream across to take advantage of its borderless trade, transparency, and frictionless governance.
This article only briefly mentions weather and HR applications but the possibilities for cross-pollination between Web2 and Web3 are only beginning to be explored. If you have an idea for an Airnode integration or are part of a DAO that needs access to API data, reach out to the API3 Discord and Aragon Discord communities to make it happen.
The API3 Foundation is a Decentralized Autonomous Organization (DAO) leading the movement from legacy third-party oracle networks to first-party oracle solutions that deliver more security, efficiency, and regulatory compliance. Powered by Airnode first-party oracles, API3’s Decentralized APIs (dAPIs) are decentrally controlled, blockchain-native data feeds with quantifiable security.
Aragon is building the future of decentralized governance for Web3 communities & organizations. Deploy a DAO, manage your community, resolve disputes and run enterprise-level votes, all within our open-source stack. See the latest at aragon.org, subscribe to our monthly newsletter, join the conversation on Discord, or follow us on Twitter.