Skip to content

Commit 0577014

Browse files
committed
best practices update
1 parent 1a03749 commit 0577014

File tree

2 files changed

+93
-3
lines changed

2 files changed

+93
-3
lines changed

src/content/data-streams/concepts/best-practices.mdx

Lines changed: 92 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,19 @@ This page provides best practices and recommendations for using Chainlink Data S
3939

4040
---
4141

42-
## Market Hours
42+
## Real-World Assets (RWA)
43+
44+
Apply these RWA best practices when integrating or operating markets that use tokenized real-world assets. Developers and operators are responsible for assessing market integrity, implementing mitigations, and managing application-level risks — see the [Developer Responsibilities](/data-streams/developer-responsibilities) guidance for details.
45+
46+
### Market Hours
4347

4448
Markets for Real-World Assets (RWA) operate during specific hours and are subject to various market conditions that can create risks for applications. The following sections outline common market issues and how to mitigate them.
4549

4650
<Aside type="note" title="Market Hours Overview">
4751
For detailed market hours and trading schedules, see the <a href="/data-streams/market-hours">Market Hours</a> page.
4852
</Aside>
4953

50-
### Market gaps
54+
#### Market gaps
5155

5256
Market gaps occur when there are interruptions in trading or price discovery, leading to periods where the last available price may not reflect current market conditions. These gaps can create risks, particularly around market opens, closures, and unexpected disruptions.
5357

@@ -182,3 +186,89 @@ Announcements can cause sharp price spikes or sustained moves.
182186
| Data Stream behavior | User guidance |
183187
| :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :----------------------------------------------------------------------- |
184188
| <ul><li>`midPrice`: Closing price is repeated until the ex-date trade prints.</li><li>`marketStatus`: `1` (Market Closed).</li><li>`lastUpdateTimestamp`: Last close.</li></ul> | Monitor liquidation thresholds closely to prevent accumulating bad debt. |
189+
190+
---
191+
192+
### Stock splits
193+
194+
Corporate actions that change the share count (splits and reverse splits) alter per‑share pricing while leaving the underlying economic exposure unchanged. These events can produce abrupt per‑share price moves and must be handled carefully to avoid incorrect onchain price computations and unexpected liquidations.
195+
196+
In the [v10 report schema](/data-streams/reference/report-schema-v10), continuity is preserved by staging a multiplier change with a scheduled `activationDateTime` so the Calculated Tokenized Price remains continuous. Split ratios are typically known in advance, but activation may occur while markets are closed, so some external price sources may not reflect the split until trading resumes.
197+
198+
<Aside type="note" title="Note">
199+
This guidance focuses on multiplier handling in the [v10 report schema](/data-streams/reference/report-schema-v10) and
200+
what integrators should expect around activation windows and protocol behavior. Similar principles may apply to future
201+
schemas that host tokenized stocks, but applicability and exact behavior will depend on each schema's design and are
202+
not guaranteed.
203+
</Aside>
204+
205+
#### Guiding principle
206+
207+
Follow these principles when handling multiplier changes during corporate actions:
208+
209+
1. The protocol considers the xStock price to be Theoretical Price = `price` \* `currentMultiplier`
210+
1. Ahead of the event, `newMultiplier` and `activationDateTime` are staged.
211+
1. At `activationDateTime` (unix), `currentMultiplier` becomes `newMultiplier`.
212+
- The underlying `price` from traditional markets should start reflecting the split the next time trading opens, so at the next `price` update, the Theoretical Price should remain continuous.
213+
214+
#### Example (10:1 split)
215+
216+
The following hypothetical scenario demonstrates how a 10:1 stock split is handled through the staged multiplier system, showing the progression from announcement through protocol reopening with proper price continuity maintained throughout.
217+
218+
The following timeline outlines the key events and actions taken at each stage:
219+
220+
- **T-2**: [Split announcement and multiplier staging](#announcement-t-2)
221+
- **T-1**: [Protocol preparation and monitoring setup](#protocol-engagement-t-1)
222+
- **T0**: [Multiplier activation (split effective date)](#activation-t0)
223+
- **T+1**: [Market reopening with adjusted prices](#market-reopening-t1)
224+
- **T+2**: [Protocol resumption after verification](#protocol-reopening-t2)
225+
226+
##### Announcement (T-2)
227+
228+
A 10:1 stock split is announced. [The report](/data-streams/reference/report-schema-v10) updates to stage the split:
229+
230+
- `newMultiplier` is set to 10x the value of `currentMultiplier`.
231+
- `activationDateTime` is set to the unix timestamp of the split.
232+
- `currentMultiplier` is unaffected until activation.
233+
234+
##### Protocol engagement (T-1)
235+
236+
At this stage, users are advised to monitor for changes in `activationDateTime` and inspect the upcoming change to prepare appropriate action, such as preparing the protocol for a pause around the `activationDateTime` in order to ensure appropriate handling of the stock split.
237+
238+
##### Activation (T0)
239+
240+
When the provider applies the split, [the report](/data-streams/reference/report-schema-v10) updates:
241+
242+
- `newMultiplier` remains the current value.
243+
- `activationDateTime` is set to `0`.
244+
- `currentMultiplier` is updated to the same value as `newMultiplier`.
245+
246+
If activation occurs while the underlying market is closed, prices may still show the pre‑event last trade. Do not compute the Calculated Tokenized Price during this pre-adjustment window. Monitor `marketStatus` and keep the protocol paused until the first post‑event trade prints and the Theoretical Price is continuous.
247+
248+
##### Market reopening (T1)
249+
250+
The stock split has taken effect. Generally, this occurs after the market closes or over the weekend, meaning `price` may not yet reflect the new economic value per share. Upon the market reopening, `price` should start reflecting the split-adjusted value.
251+
252+
##### Protocol reopening (T2)
253+
254+
Users should pause markets before `activationDateTime` and keep them paused until:
255+
256+
- the market has reopened (monitor `marketStatus`),
257+
- `price` has updated in line with the split ratio (e.g., 10:1), and
258+
- you have verified the Theoretical Price matches expectations.
259+
260+
After all the above checks have been confirmed, users can unpause their protocol and continue and resume normal operation.
261+
262+
#### Activation-time convention
263+
264+
The default `activationDateTime` is 00:00 UTC on the effective date. Once `activationDateTime` is reached, `currentMultiplier` becomes `newMultiplier`.
265+
266+
Because underlying venues may be closed at activation, some external price sources may not reflect the split immediately. If `activationDateTime` occurs while the underlying market is closed, the report’s `currentMultiplier` will become `newMultiplier`; however, `price` can remain at the pre-event level until the market reopens. During this post-activation, pre-adjustment interval (after the multiplier has changed but before the underlying `price` updates), the Theoretical Price can be incorrect. Use `marketStatus` to pause until `price` reflects the event.
267+
268+
#### Integrator risk & handling
269+
270+
Computing `price` \* `currentMultiplier` when the price has not adjusted (e.g., market closed) can produce large errors. It is critical to ensure that the Theoretical Price is again reflective of actual market conditions before allowing live trading.
271+
272+
Treat any multiplier change (splits, dividends, etc) and `activationDateTime` as a maintenance window; pause/guard the protocol, then verify post-activation conditions before resuming.
273+
274+
For broader guidance around market hours and event handling, refer to the [Market Hours](#market-hours) guidance.

src/content/data-streams/reference/report-schema-v8.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ RWA streams adhere to the report schema outlined below.
3434
**Notes**:
3535

3636
- `marketStatus`:
37-
- Users are responsible for handle market status changes in their applications.
37+
- Users are responsible for handling market status changes in their applications.
3838
- For further guidance, refer to the [Market Hours Best Practices](/data-streams/concepts/best-practices#market-hours) documentation.
3939
- Future RWA streams may use different report schemas.

0 commit comments

Comments
 (0)