Skip to content

fix(abstract-eth): verify fillNonce, transferToken, bridgeFunds, and DeFi native value (CECHO-2690) - #10241

Open
dpkjnr wants to merge 1 commit into
masterfrom
deepakjangid/cecho-2690-evm-tss-verify-fillnonce
Open

dpkjnr wants to merge 1 commit into
masterfrom
deepakjangid/cecho-2690-evm-tss-verify-fillnonce

Conversation

@dpkjnr

@dpkjnr dpkjnr commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements fail-closed EVM TSS transaction verification for fillNonce, transferToken, bridgeFunds, and DeFi native value under CECHO-2690 (child of CECHO-2679 / CECHO-1905).

What changed

  1. fillNonce (verifyTssFillNonce)

    • Enforces to === wallet.coinSpecific().baseAddress, empty calldata (0x), value in {0, 1} wei (confirmed 2,331 EVM prod rows in Snowflake all self-send 1 wei with empty data), and matching nonce when declared (caller or stored intent.nonce).
    • Preserves numeric stored intent.nonce (including 0) in resolveEffectiveTxParams.
  2. transferToken (verifyTssTransferToken)

    • Enforces single-recipient ERC-20 transfer(address,uint256) via raw-serialized txHex + isCanonicalTssCalldata, value == 0, exact same-network @bitgo/statics contract resolution (fixing cross-network bare-symbol collisions such as usdt on arbeth:usdt), recipient binding, and COINS-2263 amount/quantity consistency (supports both prod eth/arbeth amount.value: "0" + tokenData.tokenQuantity and equal-amount shapes while rejecting conflicting nonzero values).
    • Preserves tokenData in resolveEffectiveTxParams so stored pendingApproval re-signing works without caller txParams.
    • Keeps NFT transferToken (ERC721 / ERC1155, plus Hedera HTS NFT transferFrom excluding registered ERC-20s) warning-only while requiring positive NFT classification, exact same-network contract binding, canonical calldata, zero native value, and decoded recipient match.
    • Tightens resolveTssToken so known token conflicts / cross-network / explicitly empty token names set mismatch: true and fail closed across single payment, batch payment, consolidation, and transferToken.
  3. bridgeFunds (verifyTssBridgeFunds)

    • Snowflake prod check showed 100 real hypeevm bridgeFunds rows calling HyperCore CoreWriter (0x3333...3333, selector 0x17938e13 sendRawAction(bytes), action header 0x01000006, system address 0x2222...2222, tokenId, scaled amount amount / 1e10, value == 0).
    • Verifies HyperEVM (hypeevm/thypeevm) bridgeFunds strictly against CoreWriter, zero value, canonical outer & inner ABI, header, system address, token ID, scaled uint64 bounds (rejects zero/dust/overflow), and empty recipients; rejects bridgeFunds outright on all non-HyperEVM EVM coins (including sdk-coin-tempo's verifyTransaction override).
    • Propagates intent.amount → txParams.intentAmount in resolveEffectiveTxParams + BuildParams.ts for stored pendingApproval and default hot-signing paths.
  4. DeFi native value (defiApprove, defiDeposit, defiWithdraw)

    • Decodes raw serialized txHex, enforces value == 0 on all three (wrap-native is the sole value-bearing DeFi intent), and adds isCanonicalTssCalldata checks.

Surgical sdk-core note

  • Small compat shim in recipientUtils.ts (+35), iBaseCoin.ts (+6), BuildParams.ts (+3), baseTypes.ts (+1) mirroring #10206's intent.tokenName propagation so stored pendingApproval re-signing for bridgeFunds, transferToken, and numeric fillNonce does not regress in prod.

Verification

  • yarn --cwd modules/sdk-core build && yarn --cwd modules/abstract-eth build — passed
  • Full unit test suites green: sdk-core (1220), abstract-eth (220), sdk-coin-eth (714), sdk-coin-arbeth (56), sdk-coin-flr (61), sdk-coin-evm (71), sdk-coin-tempo (151)
  • eslint --quiet and prettier --check clean on all 12 files

Ticket: CECHO-2690

@dpkjnr
dpkjnr requested review from a team as code owners November 25, 2026 12:10

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@linear-code

linear-code Bot commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

CECHO-2690

@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Compatibility checks are failing on Node.js 27-nightly (experimental, non-blocking). This does not block merge, but it signals an incompatibility to fix before this release becomes supported.

View run

Add fail-closed EVM TSS transaction verification for fillNonce,
transferToken, HyperEVM bridgeFunds, and DeFi native value, plus
surgical sdk-core propagation for stored bridgeFunds intent.amount,
transferToken tokenData, and numeric fillNonce nonce.

Ticket: CECHO-2690
@dpkjnr
dpkjnr force-pushed the deepakjangid/cecho-2690-evm-tss-verify-fillnonce branch from eacf25d to c33fcb2 Compare November 25, 2026 12:32

This branch has not been deployed

No deployments
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