Threshold Monitor Boundary Fuzzing
Last updated: 16 August 2026
This page is in the archive: it documents a Soroban contract surface with no implementation in any Grainlify repository, verified 16 August 2026. Kept as a design record, not as a description of working software.
The threshold monitor starts a new window when timestamp >= window_start + time_window_secs.
Its property test generates ordered success/failure sequences at end - 1, end, and end + 1.
For every sequence, the test compares check_thresholds with an independent current-window model.
It asserts that the breaker opens exactly when the current window contains at least the configured
number of failures. The test uses proptest, so a failing sequence is automatically shrunk to a
small boundary-focused reproducer.
The generated inputs contain no token amounts and exercise no authorization paths. This keeps the security assertion focused on the monitor's window-membership boundary: failures before a rotation must not leak into the new window, while failures immediately before it must remain counted.