Skip to content

Commit

Permalink
659 dAPI intro roadmap (#662)
Browse files Browse the repository at this point in the history
* update reference >  dAPI intro page

* missing flex tag

* update flex indexes

* fix broken links

* fix image background

* Airseeker name correction, S > s

* Change suggested by Derek

* update flex indexes
  • Loading branch information
wkande authored Nov 15, 2023
1 parent 20a9cfe commit 92a11fe
Show file tree
Hide file tree
Showing 15 changed files with 826 additions and 51 deletions.
2 changes: 1 addition & 1 deletion docs/public/indexes/all-dev/map.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/public/indexes/all/map.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/public/indexes/latest/map.json

Large diffs are not rendered by default.

159 changes: 158 additions & 1 deletion docs/reference/dapis/assets/diagrams/.$beacons-airnode.drawio.bkp

Large diffs are not rendered by default.

158 changes: 158 additions & 0 deletions docs/reference/dapis/assets/diagrams/.$beacons-airnode.drawio.dtmp

Large diffs are not rendered by default.

105 changes: 104 additions & 1 deletion docs/reference/dapis/assets/diagrams/.$beacons.drawio.bkp

Large diffs are not rendered by default.

101 changes: 101 additions & 0 deletions docs/reference/dapis/assets/diagrams/.$beacons.drawio.dtmp

Large diffs are not rendered by default.

159 changes: 158 additions & 1 deletion docs/reference/dapis/assets/diagrams/beacons-airnode.drawio

Large diffs are not rendered by default.

102 changes: 101 additions & 1 deletion docs/reference/dapis/assets/diagrams/beacons.drawio

Large diffs are not rendered by default.

Binary file modified docs/reference/dapis/assets/images/beacons-airnode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/reference/dapis/assets/images/beacons.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
81 changes: 39 additions & 42 deletions docs/reference/dapis/understand/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ such as the latest cryptocurrency, stock, and commodity prices. They can power
various decentralized applications such as DeFi lending, synthetic assets,
stable coins, derivatives, NFTs, and more.

## Data feeds values stored on-chain
## Values stored on-chain

API providers, owners of first-party Airnodes, store data feed values on-chain
as individual beacons that in are turn sourced by the
API providers, owners of first-party Airnodes, provide the signed data used to
store individual beacon values on-chain. A dAPI's value is in turn an aggregate
of beacon values. dAPI values are held in the
[Api3ServerV1.sol](https://github.com/api3dao/airnode-protocol-v1/blob/main/contracts/api3-server-v1/Api3ServerV1.sol)
contract as dAPIs.
contract.

<img src="../assets/images/beacons.png" style="width:80%;">

Expand All @@ -50,47 +51,26 @@ to get the value of a dAPI.
## The role of Airnode

Airnode is a flexible off-chain module that can support multiple protocols. Most
noticeably are its implementation of the request-response protocol (RRP) and
data feeds.
noticeably is its implementation of the request-response protocol (RRP) and data
feeds.

An Airnode is owned by an API provider and integrates itself along side their
API operations. Functionality within Airnode monitors one or more API operations
hosted by an API provider and looks for a preset deviation of a data feed value
(e.g., plus or minus 1%). When the deviation threshold is reached, Airnode
pushes the new value on-chain into the beacon store. Each beacon represents a
value from a single API operation.
An Airnode is owned by an API provider and is used to call API provider
endpoints to fetch and sign data. An Airnode is owned by an API provider and
integrates itself along side their API operations. Airnode interfaces with these
operations and gathers its signed data at the request of Airseeker. Airseeker
uses the signed data to determine if the deviation of a dAPI value (e.g., plus
or minus 0.25%, 0.5%, 1%) warrants an on-chain update of its beacon(s).

<img src="../assets/images/beacons-airnode.png" style="width:80%;">
<img src="../assets/images/beacons-airnode.png">

In the diagram above, company ABC has two API operations (B and C) and a single
Airnode that monitors the API operations. When the deviation threshold is
reached for either operation it will update the corresponding beacons, in this
case `1FeexV6A` and `1AC4fMwg`.
In the diagram above, companies XYZ and ABC both provide ZIL/USD values, A and
B, respectively, that are aggregated to determine the dAPI ZIL/USD value.
Airseeker regularly checks the deviation of ZIL/USD using the sign data from
these Airnodes. Airseeker will update the corresponding beacons behind ZIL/USD
when deviation is detected.

Note that company XYZ has an operations (A) that provides the value of ZIL/USD
just like operation (B) from company ABC. A dAPI can now aggregate the value of
operations (A) and (B) since they are the same data feed but from different
companies.

## dAPI roadmap

Currently dAPIs are under an expansive development cycle and as of August of
2023 both **Self-funded dAPIs** and **Managed dAPIs** are available.

| Self-funded dAPIs | Managed dAPIs |
| ------------------------------------------------------------------------------- | ----------------------------------------------------- |
| March 2023 | \* Summer 2023 |
| Single public [proxy contract](/reference/dapis/understand/proxy-contracts.md) | Single public proxy contract |
| 1% deviation | Multiple deviations<br/>(0.25%, 0.5%, 1%) |
| 60 second [interval](/reference/dapis/understand/deviations.md#update-interval) | 30-60 second interval |
| 24 hour [heartbeat](/reference/dapis/understand/deviations.md#heartbeat) | 2 minute or 24 hour heartbeat |
| Sourced from a single<br/>data feed (beacon) | Sourced from multiple<br/>data feeds (beacons) |
| Gas costs are community funded | Gas costs are managed <br/>by API3 using upgrade fees |

Development and expansion of dAPIs beyond self-funded and managed dAPIs will
include OEV and service coverage. More details on these concepts will be
forthcoming. Please feel-free to ask questions about the evolution of dAPIs on
[Discord](https://discord.com/channels/758003776174030948/765618225144266793).
When a dApp requests the value of ZIL/USD, it will get the aggregated value of
the beacons behind the dAPI ZIL/USD.

## Self funded dAPIs

Expand Down Expand Up @@ -128,6 +108,23 @@ This is advantages as the dApp owner does not need to worry about the community
based funding model that might cause the dAPI to shut down due to lack of
funding.

<FlexEndTag/>
## Availability

Both **Self-funded dAPIs** and **Managed dAPIs** are available on the
[Market](https://market.api3.org/dapis).

| Self-funded dAPIs | Managed dAPIs |
| ------------------------------------------------------------------------------- | ----------------------------------------------------- |
| Single public [proxy contract](/reference/dapis/understand/proxy-contracts.md) | Single public proxy contract |
| 1% deviation | Multiple deviations<br/>(0.25%, 0.5%, 1%) |
| 60 second [interval](/reference/dapis/understand/deviations.md#update-interval) | 30-60 second interval |
| 24 hour [heartbeat](/reference/dapis/understand/deviations.md#heartbeat) | 2 minute or 24 hour heartbeat |
| Sourced from a single<br/>data feed (beacon) | Sourced from multiple<br/>data feeds (beacons) |
| Gas costs are community funded | Gas costs are managed <br/>by API3 using upgrade fees |

Development and expansion of dAPIs beyond self-funded and managed dAPIs will
include OEV share. More details for OEV share will be forthcoming. Please
feel-free to ask questions about the evolution of dAPIs on
[Discord](https://discord.com/channels/758003776174030948/765618225144266793).

<FlexEndTag/>
2 changes: 1 addition & 1 deletion docs/reference/dapis/understand/managed.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ managed by the dAPI team within [API3 DAO](/explore/dao-members/).

## How it works

[Datafeed values are stored on-chain](/reference/dapis/understand/#data-feeds-values-stored-on-chain)
[Datafeed values are stored on-chain](/reference/dapis/understand/#values-stored-on-chain)
within the
[`Api3ServerV1.sol`](https://github.com/api3dao/airnode-protocol-v1/tree/79b509f0e88a96fa4ea3cd576685051d37c9a504/contracts/api3-server-v1)
contract and are updated on the basis of `beaconIds`. To provide aggregated
Expand Down
2 changes: 2 additions & 0 deletions docs/reference/dapis/understand/proxy-contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,5 @@ using its proxy contract address.
```solidity
(value, timestamp) = IProxy(0x4a40Ed2Dbd51e655eD64371737C81883B0524eB2).read();
```

<FlexEndTag/>
2 changes: 1 addition & 1 deletion docs/reference/dapis/verify-beacon.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ tags:

# {{$frontmatter.title}}

[Datafeed values are stored on-chain](/reference/dapis/understand/#data-feeds-values-stored-on-chain)
[Datafeed values are stored on-chain](/reference/dapis/understand/#values-stored-on-chain)
within the
[`Api3ServerV1.sol`](https://github.com/api3dao/airnode-protocol-v1/tree/79b509f0e88a96fa4ea3cd576685051d37c9a504/contracts/api3-server-v1)
contract and are updated on the basis of `beaconIds`.
Expand Down

0 comments on commit 92a11fe

Please sign in to comment.