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: pages/lazer/how-lazer-works.mdx
+9-5Lines changed: 9 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,9 +28,8 @@ The Relayer service is the ingestion layer that receives and validates all incom
28
28
29
29
Douro Labs operates the relayer service for the Pyth Lazer network. It follows a strict, deterministic processing model:
30
30
31
-
-**No price dropping outside of circuit breakers**: All validated updates are forwarded to the message queue without dropping any prices.
31
+
-**No price dropping outside of circuit breakers**: All validated updates are forwarded to the message queue without dropping any prices (except for when a circuit breaker is triggered).
32
32
-**FCFS processing**: Updates are processed on a first-come-first-served basis without prioritization.
33
-
-**Deterministic operation**: The relayer operates according to its configured logic and does not deviate from it.
34
33
35
34
This ensures reliable, predictable data flow from publishers to consumers.
36
35
@@ -39,8 +38,9 @@ This ensures reliable, predictable data flow from publishers to consumers.
39
38
The system uses a distributed message queue for pub/sub messaging with stream persistence.
40
39
This allows the system to be deployed in a multi-datacenter environment and ensures reliable message delivery between services.
41
40
42
-
**Message ordering**: The message queue guarantees message ordering within a single stream, ensuring that updates from publishers are processed in the order they were received by the Relayer.
43
-
This ordering guarantee is critical for maintaining consistent feed state across all aggregators.
41
+
**Message ordering**: The message queue ensures reliable delivery and maintains the exact sequence of messages within each data stream.
42
+
This means every publisher update will be delivered at least once, and messages will be processed in the same order they arrived at the Relayer.
43
+
This sequential processing is essential for keeping all aggregators synchronized with the same feed state.
44
44
45
45
### Routers
46
46
@@ -51,7 +51,7 @@ It embeds aggregation logic to compute median prices, confidence intervals (usin
51
51
52
52
-**WebSocket streaming**: Provides `/v1/stream` endpoint for real-time price updates
53
53
-**HTTP REST API**: Offers `/v1/latest_price` for on-demand price queries
54
-
-**Channel types**: Supports real-time and fixed-rate channels (1ms, 50ms, 200ms)
54
+
-**Channel types**: Supports real-time and fixed-rate channels (50ms, 200ms)
55
55
-**Multi-chain support**: Generates on-chain payloads for Solana, EVM, and other chains
56
56
57
57
#### Aggregation logic
@@ -63,6 +63,9 @@ Each Router embeds an aggregator component that consumes publisher updates from
63
63
- Determines best bid/ask values filtered to ensure market consistency.
64
64
- Automatically removes stale publisher data based on configurable timeouts.
65
65
66
+
Lazer guarantees deterministic aggregation: all aggregators produce the exact same aggregated results by relying solely on the consistent stream of price updates from the Message Queue.
67
+
This ensures that every Router instance maintains identical feed state, providing consistent data to all consumers regardless of which Router they connect to.
68
+
66
69
### History Service
67
70
68
71
The History Service provides persistence and historical data queries.
@@ -71,3 +74,4 @@ The History Service provides persistence and historical data queries.
71
74
72
75
- Data persistence: Stores all publisher updates, aggregated data, and transactions.
73
76
- Historical queries: Provides REST API for querying historical data.
77
+
- OHLC API: Provides Open, High, Low, Close (OHLC) data for charting applications through the history service.
0 commit comments