Skip to content

Commit c06488e

Browse files
committed
docs: enhance downSlotsRatio comment to clarify its purpose and usage in TWAP calculations
1 parent c88c2f5 commit c06488e

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

target_chains/ethereum/sdk/solidity/PythStructs.sol

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,15 @@ contract PythStructs {
4040
uint endTime;
4141
// TWAP price
4242
Price twap;
43-
// Down slot ratio
43+
// Down slot ratio represents the ratio of price feed updates that were missed or unavailable
44+
// during the TWAP period, expressed as a fixed-point number between 0 and 1e6 (100%).
45+
// For example:
46+
// - 0 means all price updates were available
47+
// - 500_000 means 50% of updates were missed
48+
// - 1_000_000 means all updates were missed
49+
// This can be used to assess the quality/reliability of the TWAP calculation.
50+
// Applications should define a maximum acceptable ratio (e.g. 100000 for 10%)
51+
// and revert if downSlotsRatio exceeds it.
4452
uint32 downSlotsRatio;
4553
}
4654

0 commit comments

Comments
 (0)