Skip to content

ADR 003/005: Rate manipulation 30-second window is fragile due to clock skew #13

Closed

Description

@thiras

Category: Security Gap

ADR 003/005 define rate manipulation slashing: a signed ProbeResponse at rate X and a signed StreamResponse at rate Y > X within 30 seconds is slashable.

Problem — clock skew:

  • The 30-second window uses timestamp_us from the probe response
  • The probe timestamp is requester-generated (good), but the stream response timestamp is node-generated
  • An on-chain verifier only sees two signed messages with timestamps — it can't know real-world time
  • If the node and client have different clocks, legitimate rate changes could appear as manipulation
  • Conversely, a malicious node could set its clock forward to make a 5-second gap appear as 35 seconds

Questions

  1. Should the 30-second check be based on the difference between the two timestamp_us values (both in the signed messages)?
  2. Who generates which timestamp? The probe timestamp is requester-generated, but what about the stream response timestamp?
  3. How does the on-chain verifier evaluate the time constraint?

Recommendation

Make the 30-second check explicit: it should compare stream_response.timestamp_us - probe_response.timestamp_us < 30_000_000. Both timestamps should be present in the signed messages so the on-chain contract can verify the delta without needing wall-clock time.

ADRs affected

  • ADR 003 (Payment Model — rate bait-and-switch)
  • ADR 005 (Wire Protocol — signed responses)

Activity

  1. added
    kind:security
    on Mar 29, 2026
  2. added a commit that references this issue on Mar 30, 2026
    277a8c8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind:security

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions