Demonstrates a replay vulnerability in the Solana Exact payment scheme where the same signed transaction can be submitted multiple times, granting access for each request while only one transaction settles on-chain.
Without duplicate transaction checking, a client can:
- Request a protected resource and receive 402 with payment requirements
- Build and sign a single valid payment transaction
- Send the same payment header to multiple parallel requests
- Get successful responses for all requests (only paying once)
pnpm install
cp .env.example .envEdit .env with your keypair paths and server URL.
Against an existing server:
pnpm demoOr run a local test server:
pnpm run-server
pnpm demoThe demo fires 10 parallel requests with the same payment. If multiple succeed, the vulnerability is present.