Skip to content

client-pull: profitable rate manipulation leaves no evidence, and the buyer has no rate ceiling #1375

Closed

Description

@yigitdot

Found during review of #1367 (G-GOV-03).

Two related gaps on the paid-pull buyer path

1. A delivered rate bait-and-switch produces no evidence

SlashJudge's rate predicate is s.ratePerMb > p.ratePerMb (contracts/src/SlashJudge.sol:415) — it does not require !ok. So a node that quotes low on the probe, quotes high on the open-stage StreamResponse, and then delivers is equally slashable. That is the version of the attack where the operator actually gets paid.

#1367 made UpstreamRefused carry the signed StreamResponse out of the refusal path (response: Option<StreamResponse>), which covers the refused case. But on the success path both fetch_inner and open_progressive_pull keep only rate_per_mb / total_bytes / interval_bytes and drop the signed response entirely — so the profitable variant is exactly the one we cannot evidence.

2. There is no client-side rate ceiling anywhere in client-pull

The only rate gates are StreamResponse::validate's MAX_RATE_PER_MB and non-zero checks (crates/protocol/src/client.rs:424-434). fetch_inner reads the quoted rate off the open-stage response and pays it. A buyer that probed at rate 10 will silently pay a stream quoted at 900 as long as it is under the protocol max — no comparison against the probe, no configured ceiling, no abort.

These compound: the client neither refuses the overcharge nor retains the proof of it.

Suggested direction

  • Retain the verified open-stage StreamResponse on the success path too (it is already verified against expected_signer by verify_response before delivery starts), so a caller can file a rate challenge after a completed transfer.
  • Add a buyer-side rate policy: at minimum abort when the stream quote exceeds the probe quote the candidate was selected on; ideally a configurable absolute ceiling.

Pre-existing on main; not introduced by #1367.

Activity

  1. added
    kind:security
    rust
    design:economics
    prio:high
    on Jul 22, 2026
  2. assigned and unassigned on Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

design:economicskind:securityprio:highrust

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions