@@ -6,30 +6,31 @@ slug: /publication-models
6
6
7
7
# Publication models
8
8
9
- How data is brought on-chain through an Orcfax oracle feed depends entirely on
10
- the use case and the needs of integrating dApps; there are many different oracle
11
- use cases, and each needs something different from Orcfax. While there can be
12
- overlap in the data needs of smart contracts, many of these use cases have their
13
- own distinct requirements regarding when data is needed. Because of the varied
14
- needs of our integrators, Orcfax is developing publication options that allow
15
- integrators to choose services that best meet their needs. Orcfax feeds will now
16
- support two distinct publication models: our existing heartbeat model, and a new
17
- on-demand model.
18
-
19
- By providing the ability for consumers to choose the publication model, Orcfax
9
+ How data is brought on-chain through an Orcfax oracle feed depends largely on
10
+ the use case and the needs of integrators and their dApps; there are many
11
+ different oracle use cases, and each needs something different from Orcfax.
12
+ While there can be overlap in the data needs of smart contracts, many of these
13
+ use cases have their own distinct requirements regarding when data is needed.
14
+ Because of the varied needs of our integrators, Orcfax is developing publication
15
+ options that allow integrators to choose services that best meet their needs.
16
+
17
+ Orcfax feeds will now support two distinct publication models: our existing
18
+ heartbeat model, and a new on-demand model.
19
+
20
+ By providing integrators the ability to choose the publication model, Orcfax
20
21
will enable dApps to increase flexibility and cost efficiency by choosing how
21
22
best to receive their data: hourly, daily or when there’s a real-time
22
23
requirement for the data (e.g. liquidations).
23
24
24
25
## The heartbeat publication model
25
26
26
27
The heartbeat publication model gives integrators the ability to access data at
27
- regular intervals which can be set according to their needs (e.g. every 5
28
- minutes, once per hour, etc.). This model can be further enhanced when paired
29
- with a monitoring feature which adds a deviation formula; heartbeat publication
30
- models with deviation add improved precision by guaranteeing data at both a
31
- consistent interval and when user -stipulated thresholds have been met (e.g.
32
- publish immediately before the next heartbeat if price changes by x%).
28
+ regular intervals which can be parameterized according to their needs
29
+ (e.g. every 5 minutes, once per hour, etc.). This model can be further enhanced
30
+ when paired with a monitoring feature which adds a deviation formula; heartbeat
31
+ publication models with deviation add improved precision by guaranteeing data at
32
+ both a consistent interval and when integrator -stipulated thresholds have been
33
+ met (e.g. publish immediately before the next heartbeat if price changes by x%).
33
34
34
35
In the heartbeat publication model, nodes request and cache primary source data
35
36
every minute. Publications are made at a fixed rate (in this case on the hour)
@@ -38,28 +39,29 @@ utilizing the monitoring function in the event of deviations.
38
39
39
40
![ the heartbeat model] ( /img/2024-02--heartbeat.gif )
40
41
41
- This publication model is often referred to as a Push based oracle, as the
42
- oracle service is parameterized to publish (push)
43
- data, and does so continuously at predefined intervals so long as the feed
44
- remains funded.
42
+ This publication model is often referred to as a * push* based oracle, as the
43
+ oracle service is parameterized to publish (push) data, and does so continuously
44
+ at predefined intervals so long as the feed remains funded.
45
45
46
- The benefits of the heartbeat (or push) publication model is that integrators
47
- receive data continuously. However, if the dApp provides services which only
48
- need data inputs for specific actions, at unpredictable times, or to verify
49
- components of a transaction, then this model can be nonoptimal or costly given
50
- the rate at which data is received versus instances of data use.
46
+ The benefits of the heartbeat publication model is that integrators receive data
47
+ continuously. However, if the dApp provides services which only need data inputs
48
+ for specific actions, at unpredictable times, or to verify components of a
49
+ transaction, then this model can be nonoptimal or costly given the rate at which
50
+ data is received versus instances of data use; this inefficiency for some of our
51
+ integrator's use cases led us to begin development on the Orcfax on-demand
52
+ model.
51
53
52
54
## The on-demand publication model
53
55
54
56
The on-demand publication model allows complete flexibility and gives dApps even
55
- more control of data use by allowing them to request data collection, validation
56
- and publication whenever it’s needed by their smart contracts.
57
+ more control of data use by allowing them to request data collection,
58
+ validation, and publication whenever it’s needed by their smart contracts.
57
59
58
- If an Orcfax feed consumer needs a more current update for a given datum feed
59
- (e.g. ADA/ FACT) than is available on-chain or through an existing heartbeat
60
+ If an Orcfax feed integrator needs a more current update for a given Orcfax feed
61
+ (e.g. ADA- FACT) than is available on-chain or through an existing heartbeat
60
62
publication schedule, then:
61
63
62
- 1 . A dApp can request an updated datum by posting an utxo with a specific datum
64
+ 1 . A dApp can request an updated datum by posting a utxo with a specific datum
63
65
in an orders smart contract;
64
66
1 . This request is observed by the validator scripts;
65
67
1 . A validator node will be selected to submit the requested datum to the feeds
@@ -71,10 +73,10 @@ And all of these actions can happen within the same block.
71
73
72
74
![ the on-demand model] ( /img/2024-02--on-demand.gif )
73
75
74
- This publication model is often referred to as a Pull based oracle, as the
76
+ This publication model is often referred to as a * pull * based oracle, as the
75
77
oracle service is directly triggered by requests made through a smart contract.
76
78
77
- The benefits of the on-demand (or pull) publication model is that integrators
79
+ The benefits of the on-demand publication model is that integrators
78
80
experience greater control over when data is made available. This service
79
81
dramatically increases feed utility for dApps with use cases that can’t justify
80
82
a consistent heartbeat. Instead, the on demand publication model allows their
0 commit comments