docs(amendment): 2c-E — TradeIntent under the exact-output market model - #825
Merged
Merged
Conversation
5c-2 Step 1 listed four documents to be reviewed before code. Three landed inside 2c-A.1 and 2c-B. The fourth — the canonical TradeIntent commitment I, and what "the selected route satisfies I" means to a verifier — never did, and amendment 2c already recorded that it was left as prose. It is still prose. This replaces it. The mismatch, found while checking whether the 5c-2 producer could be written: MarketTerms field 1 carries a complete nine-field TradeIntent, but RouteCommit is pinned at version 2 and carries no min_out, max_fee, max_fanout or k. Their absence is deliberate — v1's slippage floors and pre-signed fallbacks were deleted for "one route, one anchored state, one exact output, one signature", with fields 11 and 12 reserved. A fifth member, max_hops, is derivable only by inverting the authority direction the registry states, since Route validity reads its bound out of the intent. So the producer could not build a faithful intent, and inventing the absent members would hash invented values into I, a canonical commitment no verifier could re-derive. Owner ruling, taken before any code: amend the object to the shipped model. Do not invent the fields, do not derive them from the already-selected route, and do not restore them to RouteCommit to preserve an obsolete schema. Write the amendment first. Schema 2 is six fields, each a genuine signed trader commitment reconciled against the canonical RouteCommit the trader signs with its signature zeroed: token_in, amount_in, token_out, exact_out, fee_bps, nonce. Schema 1 is burned. Every dropped member is accounted for rather than simply removed. The floor is gone because the output is exact. The fee cap is gone because the rate is exact and the vault's own fee policy is the authority the settle is checked against. The hop bound becomes an exact correspondence with the signed RouteCommit hops, which is a stronger check against a signed fact. The fanout and route-retention bounds had no wire source, and per the ruling k is not trader intent material merely because binding later uses it. Section 6 states the satisfaction predicate normatively, in six clauses. The clause that matters is SAT.5: exact_out is checked by re-simulating the market policy against the authenticated vault state that c_n names, never against the route's own account of itself. Without that the predicate would be a self-attestation of the selected route, which is the failure the ruling names. Section 7 records the transitive schema cascade, which is mechanical rather than a judgement: bumping TradeIntent bumps MarketTerms, which bumps SettlementBundle, which moves every market bundle's identity and address. All three are at schema 1 today, verified in source. The close arm changes no substance but shares the enclosing class. Nothing is broken by this: there is no production producer of TradeIntent or of the canonical MarketTerms anywhere in the tree. Something that was never constructible is being made constructible. Scope is deliberately narrow. TA_B and the bundle-acceptance leaf remain 2c-D's, market realization stays unreachable until 2c-D by Ruling V3, and RouteCommit is not amended — its exact-output model is what is being conformed to. This does not lift the market emission refusal; it removes the reason the producer that lifts it could not be written. Markdown only; neither pre-push gate reads markdown.
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.
Why this exists
5c-2 Step 1 listed four documents to be reviewed before code. Three landed inside 2c-A.1 and 2c-B. The fourth — the canonical
TradeIntentcommitmentI, and what "the selected route satisfiesI" means to a verifier — never did. Amendment 2c already recorded that it was left as prose. It is still prose. This replaces it.The mismatch
Found while checking whether the 5c-2 producer could actually be written.
MarketTermsfield 1 carries a complete nine-fieldTradeIntent.RouteCommitis pinned at version 2 and carries nomin_out,max_fee,max_fanoutork. That absence is deliberate — v1's slippage floors and pre-signed fallbacks were deleted for "one route, one anchored state, one exact output, one signature", with fields 11 and 12 reserved.A fifth member,
max_hops, is derivable only by inverting the authority direction the registry states:Routevalidity reads its bound out of the intent, so deriving the bound from the route is not a derivation.So the producer could not build a faithful intent, and inventing the absent members would hash invented values into
I— a canonical commitment no verifier could re-derive.The ruling
Taken before any code was written: amend the object to the shipped model. Do not invent the fields, do not derive them from the already-selected route, and do not restore them to
RouteCommitto preserve an obsolete schema. Write the amendment first.Schema 2
Six fields, each reconciled against the canonical
RouteCommitthe trader signs with its signature zeroed:token_in,amount_in,token_out,exact_out,fee_bps,nonce. Schema 1 is burned.Every dropped member is accounted for rather than dropped:
min_outexact_outis exact and must be reproduced exactlymax_feemax_hopsRouteCommithops — stronger, and against a signed factmax_fanoutkThe clause that matters
§6 states the satisfaction predicate in six clauses. SAT.5 is the one carrying the weight:
exact_outis checked by re-simulating the market policy against the authenticated vault state thatc_nnames, never against the route's own account of itself.Without that, the predicate would be a self-attestation of the selected route, which is precisely the failure the ruling names.
Transitive cascade
Mechanical, not a judgement call, per the registry's own propagation rule:
All three are at schema 1 today, verified in source. Every market bundle's identity and address move. The close arm changes no substance but shares the enclosing class.
Nothing is broken
There is no production producer of
TradeIntentor of the canonicalMarketTermsanywhere in the tree — every construction is a fixture or the decoder. Something that was never constructible is being made constructible.Scope
TA_Band the bundle-acceptance leaf remain 2c-D's. Market realization stays unreachable until 2c-D by Ruling V3.RouteCommitis not amended — its exact-output model is what is being conformed to.This does not lift the market emission refusal. It removes the reason the producer that lifts it could not be written.
§8 lists what the adopting change owes, including that the market class-1 vector is regenerated exactly once, from the genuine producer, and never before it exists.
Verification
Markdown only. Neither
make lintnorci/production_safety_checks.shreads markdown, so neither gate's result can change; CI runs both regardless. Every factual claim — the three current schema numbers, the absent wire fields, the fee authority check, the unencoded route-set class, and the absence of any production producer — was read from source rather than assumed.