Skip to content

fix(tempo): always bind payments to the challenge memo - #28

Closed
raubrey-stripe wants to merge 1 commit into
mainfrom
fix/tempo-explicit-memo-challenge-binding
Closed

fix(tempo): always bind payments to the challenge memo#28
raubrey-stripe wants to merge 1 commit into
mainfrom
fix/tempo-explicit-memo-challenge-binding

Conversation

@raubrey-stripe

Copy link
Copy Markdown
Contributor

Summary

  • PR 27 skipped challenge-bound memo checks whenever a merchant memo was present. TempoMethod.Builder.memo() is method-wide, so distinct challenges A and B advertised the same memo and the first presenter of a matching hash won.
  • Always require the MPP attribution memo (realm + challenge id). An explicit memo remains an extra exact-match constraint, not an escape hatch.
  • A static Builder.memo() cannot satisfy that binding; omit it unless the advertised memo is unique per challenge. This is the invariant issue 25 needs before replay claims can expire.

Test plan

  • ./gradlew test
  • Same explicit memo, two challenge IDs: presenting B's hash under A is rejected with memo is not bound to this challenge
  • Attribution memo for B still verifies under B and is rejected under A without consuming the replay claim
  • Automatic attribution path still accepts matching realm/challenge and rejects wrong realm/challenge, plain Transfer, and replay

Made with Cursor

A method-wide explicit memo skipped challenge binding, so one settled
transfer could satisfy every equivalent challenge. Require the MPP
attribution memo on every path, including when a merchant memo is set.

Co-authored-by: Cursor <cursoragent@cursor.com>
Committed-By-Agent: cursor
@raubrey-stripe

Copy link
Copy Markdown
Contributor Author

Closing; this is only an issue when a server sets its own explicit memo that replaces a challenge-bound memo that's auto created by the SDK. This issue exists today in mppx, was flagged in wevm/mppx#291 and not fixed.

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.

1 participant