Repository navigation
Conversation
1ce3ccc to
df2acc0
Compare
Preserve caller-declared intent and reject unresolved or contradictory asset and calldata combinations. Ticket: CECHO-2460
The previous commit made the caller's txParams authoritative over the stored tx request intent and bound EVM TSS payments to a locally resolved asset. These tests pin that: stored calldata cannot fill a caller recipient, a server-named token cannot replace the caller's token, native and token shapes cannot be swapped, batches must move one asset with the matching batch method, and unresolvable or conflicting token identity fails closed. ECDSA and MPCv2 wiring tests check that callerTxParams and the stored intent both reach verifyTransaction, and that pending approval passes no caller params. The README documents the verifier's contract and the strictTssVerification opt-in. Ticket: CECHO-2460
df2acc0 to
ab76aae
Compare
|
|
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
|
Superseded by #10121, which carries the whole CECHO-2460 stack as three commits against |
What
Fixes the three blocking findings from the stack review on #9972 (all in part 2's
tssVerification.ts) and adds regression tests for each.txParamsare the only intent source when they declare atypeorrecipients. The signing paths (ecdsa,ecdsaMPCv2) pass the untouched caller input ascallerTxParams, soresolveEffectiveTxParamsback-filling cannot make server data look caller-declared. The stored tx request intent applies only when the caller declared nothing (pending-approval signing). It can no longer pick the handler, add calldata, name the token, or turn a caller-declared payment into a consolidation.tokenAddress/tokenName, the top-leveltokenName, and the coin instance. Identity that cannot be resolved to a contract, or that names two different assets, is a violation instead of a skipped check.batchfor native,batchTransferFromfor tokens).abstract-ethREADME documents the verifier contract and thestrictTssVerificationopt-in.Why
TOB-BITGOEDMPC-2 / INFOSEC-671 review on this stack, all three findings P1:
approve(attacker, MAX)passed as an exact dApp call.Test plan
New tests: sdk-coin-evm
declared intent isolation and asset binding(on kavaevm and hbarevm), sdk-coin-bscbatch asset binding, and ECDSA / MPCv2 wiring tests checking thatcallerTxParamsand the stored intent reachverifyTransaction(and that pending approval passes no caller params).Bite check: 18 sdk-coin-evm, 4 sdk-coin-bsc and both wiring tests fail on part 3's head and pass here.
Before/after on
verifyTransaction(default mode /strictTssVerification):approve(attacker, MAX)under a native payment intentcontractCallintentSuites on the stack rebased onto current master: abstract-eth 188, sdk-coin-evm 124, sdk-coin-bsc 56, sdk-coin-eth 517, sdk-api 253, sdk-core 1063.
Pending:
BitGo SDKCI on this head (it doesn't trigger for a non-master base; run it viaworkflow_dispatch). Part 3's run, covering everything below this PR, is green.Pending: prod backtest of ~563k EVM TSS payments from the last 90 days (release gate, tracked on CECHO-2460).
Risk
callerTxParamstoVerifyTransactionOptions(iBaseCoin.ts). Purely additive, but out-of-repoverifyTransactionimplementations won't get the caller/stored split until they read it.Stack
This PR is part 4 of 4; review and merge in order:
master)CECHO-2460-evm-tss-fail-closed-handlers-pt1)CECHO-2460-evm-tss-fail-closed-handlers-pt2)CECHO-2460-evm-tss-fail-closed-handlers-pt3) ← you are hereTicket: CECHO-2460