Skip to content

Reject stale transaction quotes - #261

Draft
KevinMehrabi wants to merge 1 commit into
trunkfrom
fix/stale-quote-revisions
Draft

Reject stale transaction quotes#261
KevinMehrabi wants to merge 1 commit into
trunkfrom
fix/stale-quote-revisions

Conversation

@KevinMehrabi

Copy link
Copy Markdown
Contributor

Summary

  • bind quote responses to a monotonic revision and an exact transaction/context fingerprint
  • reject delayed responses when the account, network/chain, pool, direction, assets, amount, or slippage has changed
  • centralize quote application so stale responses cannot mutate the active amount, minimum output, direction, pool, or status
  • require a fresh adapter quote immediately before wallet submission and reject tampered or non-prepared quotes
  • add deliberately out-of-order lifecycle and quote-safety regression tests

Why

Quote requests may resolve out of order. Without binding each result to the exact transaction inputs and wallet context that produced it, an older response can overwrite a newer active transaction.

Impact

This changes quote state management and submission validation only. It does not include deployment addresses or token-specific configuration. Active Beacon account/chain re-reading remains separate work under #247.

Validation

  • npm run verify
    • production audit threshold passed (12 low, 2 moderate; no high or critical)
    • TypeScript passed
    • 23 suites / 68 tests passed
    • optimized production build passed
  • changed-file ESLint passed
  • git diff --check passed

Closes #246

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prevent stale quotes from updating active transactions

1 participant