Skip to content

Fix/quote write and accept signature - #351

Merged
james2177 merged 3 commits into
stellar-vortex-protocol:mainfrom
martinzhames:fix/quote-write-and-accept-signature
Sep 2, 2026
Merged

Fix/quote write and accept signature#351
james2177 merged 3 commits into
stellar-vortex-protocol:mainfrom
martinzhames:fix/quote-write-and-accept-signature

Conversation

@martinzhames

Copy link
Copy Markdown

closes #321
closes #322
closes #292
closes #291

quote() is intentionally unauthenticated for price discovery, but when
dto.intentId is supplied it persists quotedDstAmount onto that intent.
Any caller who knows an intent's UUID (public via list/create responses
and the WS feed) could overwrite quotedDstAmount with a value computed
from an arbitrary, unrelated token pair/amount.

Now the request's srcChain/srcToken/dstToken/srcAmount are cross-checked
against the target intent's stored fields and a mismatch is rejected
with a 400. Kept ownership-agnostic (no signature) rather than requiring
proof of ownership, since adding auth to this write path would mean
adding signature verification to quote(), which is out of scope and
inconsistent with the endpoint remaining public for price discovery.
Strict content-matching closes the arbitrary-write vector without
changing quote()'s access model.
accept() checked that the solver was registered, active, and bonded,
but never called verifyStellarSignature() despite AcceptIntentDto
already carrying a signature field intended for exactly this. Since a
solver's public address is public (visible on the leaderboard), any
caller could accept an intent "as" that solver by supplying any
string >= 10 chars as signature, letting an attacker grief a
competitor solver into a fill obligation it never agreed to (and, once
slashing lands, get its bond slashed for missing the window).

Now accept() calls verifyStellarSignature(dto.solver,
buildAcceptMessage(id, dto.solver), dto.signature) before
acceptIfOpen(), mirroring fill()'s and cancel()'s existing pattern.
scripts/solver-bot.ts already signs via buildAcceptMessage() + sign()
and needs no changes.
@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@martinzhames Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@james2177
james2177 merged commit f29cb59 into stellar-vortex-protocol:main Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment