Skip to content

Implement cross-network transaction audit trail and replay protection #28

Description

@grantfox-oss

Transactions and refunds can be retried if a response is lost, but there is no durable cross-network audit trail that distinguishes safe retries from duplicate submissions.

Affected areas: app/backend/src/transactions/transaction.service.ts, app/backend/src/refunds/refunds.service.ts, app/backend/src/audit/audit.service.ts, app/backend/src/transactions/transaction.repository.ts, app/backend/src/common/idempotency/*.

Implementation scope:

  • Persist transaction requests with client-provided idempotency key, network, contract call details, and resulting hash.
  • Use the audit trail to detect duplicate on-chain submission attempts across retries.
  • Add replay protection for stale or replayed client requests.
  • Add monitoring for duplicate transaction hash generation.

Acceptance criteria:

  • Replayed or retried requests return the original transaction record instead of resubmitting.
  • Audit trail exposes whether a transaction was a retry, duplicate, or new submission.
  • Tests cover same payload across different networks and repeated retries.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions