Skip to content

the-caliber/Blockchain-bridge-vulnerabilities

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bridge vulnerabilities

This project shows blockchain smart contract bridge vulnerabilities.

It currently shows some vulnerabilities from SCSVS v2:

Warning

The smart contracts used in the project are not audited and are vulnerable. Not to use in the production.

About:

BridgeSafeTokenSend

  • The contract uses the EIP-712 standard.
  • Integrates an external signal processor.
  • Allows burning tokens on the source chain and minting the same amount on the destination chain.
  • Allows transferring tokens on the destination chain to a new address on the destination chain itself.

BridgeSignatureReplay

  • Does not use the EIP-712 standard.
  • Allows burning tokens on the source chain and minting the same amount on the destination chain.
  • Allows transferring tokens on the destination chain to a new address on the destination chain itself.
  • Demonstrates message replay, signature replay, and cross-chain signature replay attacks.

BridgeSpoofChainId

  • The contract uses the EIP-712 standard.
  • Allows burning tokens on the source chain and minting the same amount on the destination chain.
  • Allows transferring tokens on the destination chain to a new address on the destination chain itself.
  • Demonstrates chain ID spoofing in the bridge implementation.

BridgeHashCollision

  • Does not use the EIP-712 standard.
  • Allows burning tokens on the source chain and minting the same amount on the destination chain.
  • Allows transferring tokens on the destination chain to a new address on the destination chain itself.
  • Demonstrates hash collision.

Vuln Explanation:

ToDo: Add explanation for every test/vulnerabilities.

Usage

Build

$ forge build

Test

$ forge test # run all tests.
$ forge test --mc <test_contract_name> # run specific test file.

About

Blockchain bridge smart contract vulnerabilities with example.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published