docs: bind sellToken and buyToken into EIP-712 signature (COW-1272) - #8
Merged
Merged
Conversation
…(COW-1272) Reflect the contract change that binds sellToken and buyToken into the EIP-712 signed ProposalData struct (9 fields, up from 7) and removes the separate token parameters from execute().
5 tasks done
yvesfracari
reviewed
Aug 21, 2026
yvesfracari
left a comment
Contributor
There was a problem hiding this comment.
The documentation update is directionally correct once the companion contract and service changes land. Please keep the dependency tracked before exposing this flow to sub-solvers.
| ```solidity | ||
| struct ProposalData { | ||
| bytes32 orderUidHash; // keccak256(order_uid) — ties to a specific order | ||
| address sellToken; // the trade's sell token, signed to prevent cross-pair reuse |
Contributor
There was a problem hiding this comment.
should — byos-contracts#40 doesn't add buyToken into the signed interface. Don't forget to add it in a next PR.
yvesfracari
approved these changes
Aug 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ProposalDatastruct in the design document from 7 to 9 fields (sellToken,buyTokenadded)execute()signature in contracts reference: remove separate_sellToken/_buyTokenparameters (tokens are now in the signed proposal struct)execute(proposal, route, signature)Context
Companion to bleu/byos-contracts#39 (COW-1272 audit findings). The audit identified that
_buyTokenwas free calldata — not part of the EIP-712 signature — allowing a signature to theoretically be reused with an unrelated measurement token. Both trade tokens are now bound into the signed struct.Test plan
ITrampoline.solexecute()signature matches the contract interface