You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/data-streams/concepts/calculated-streams.mdx
+15-6Lines changed: 15 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -95,23 +95,30 @@ Calculated streams inherit risks from their underlying inputs and introduce addi
95
95
96
96
### Multiple dependencies
97
97
98
-
If a required input becomes unavailable or unreliable, the calculated stream might stop updating or cease to reflect current conditions. Integrators should not assume any specific fallback behavior and must design their protocols to handle this scenario explicitly.
98
+
If a required input becomes unavailable or returns errors, the calculated stream stops producing reports until all inputs recover. This prevents potentially incorrect values from being published.
99
+
100
+
Single-source inputs (such as a specific protocol API or contract) carry higher risk than decentralized aggregates. If a single source experiences downtime, report production halts entirely until the source recovers. Review which inputs are single-source vs. decentralized aggregates when assessing a calculated stream for your application.
99
101
100
102
#### Mitigation
101
103
102
-
- Design your protocol to handle missing data gracefully (pause operations, use last-known values, or implement fallbacks based on your risk tolerance)
104
+
- Design your protocol to handle report gaps gracefully (pause operations, use last-known values with appropriate staleness checks, or implement fallbacks based on your risk tolerance)
105
+
- Implement staleness checks to detect when reports stop arriving and trigger appropriate protocol responses
106
+
- Understand your input sources and assess the reliability of each, particularly single-source APIs or contracts
103
107
104
108
### Timing and synchronization
105
109
106
110
Inputs update at different frequencies and are read via separate calls, so they may reflect slightly different block heights or timestamps. The calculated value is an approximation based on the latest available data from each input, not a single-block atomic snapshot.
107
111
108
-
Users should expect small, transient differences between the calculated stream value and values observed on block explorers, vault dashboards, or DEX charts—especially during rapid changes such as large deposits, withdrawals, or sharp market moves. This does not necessarily indicate an issue with the stream, but is a natural consequence of combining multiple inputs with different update cadences.
112
+
During rapid market changes or protocol events (such as large deposits, withdrawals, or sharp market moves), you may observe temporary differences between the calculated stream value and values from other sources like block explorers, vault dashboards, or DEX charts. These differences typically resolve as all inputs update to reflect the new state.
113
+
114
+
If any input source experiences an outage (API errors, RPC failures, or contract issues), report production pauses until all inputs are available again. Your application should be prepared to handle gaps in report availability.
109
115
110
116
#### Mitigation
111
117
112
118
- Implement max deviation checks against expected ranges
113
119
- Use time-weighted averages or circuit breakers for extreme moves
114
120
- Monitor trends over time rather than reacting to individual updates
121
+
- Set alerts for report gaps to detect input source issues early
0 commit comments