Skip to content

NonceStore: In-memory only, replay after restart #13

@a6b8

Description

@a6b8

Classification

  • Blocker

Problem

NonceStore is a simple in-memory Set(). On server restart all nonces are lost — an attacker can replay previously signed payments after a restart.

Affected Files

  • src/v2/exact/evm/ServerExact.mjs (NonceStore class, lines 16-30)

Expected vs Actual

  • Expected: Nonces survive server restarts and are synchronized cluster-wide
  • Actual: Nonces only in process memory, lost on restart

Recommendation

Persistent NonceStore (Redis/PostgreSQL) with distributed locking. Keep interface (isUsed, markUsed), make backend swappable.

Severity

CRITICAL

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingsecuritySecurity vulnerability or hardening

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions