Skip to content

D3CC [ Crypto ] Fix CrossChainBridge replay attack and EIP-712 signing#1496

Open
D3CC wants to merge 1 commit into
UnsafeLabs:mainfrom
D3CC:fix-920v1-1779026702
Open

D3CC [ Crypto ] Fix CrossChainBridge replay attack and EIP-712 signing#1496
D3CC wants to merge 1 commit into
UnsafeLabs:mainfrom
D3CC:fix-920v1-1779026702

Conversation

@D3CC
Copy link
Copy Markdown

@D3CC D3CC commented May 17, 2026

/claim #920
/bounty $900

Demo Evidence

Demo

Changes

  • Added block.chainid and address(this) to transfer hash to prevent cross-chain replay
  • Added per-sender senderNonce mapping to prevent same-chain replay
  • Added explicit require(recovered != address(0)) check on ecrecover result
  • Added EIP-712 domain separator with NAME, VERSION, chainId, verifyingContract
  • Added EIP-712 typed data hash (TRANSFER_TYPEHASH) for structured signing
  • Added getSenderNonce() for frontend integration
  • Added getDomainSeparator() and getTransferHash() helper functions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant