Skip to content

Security of the checkValueSent function #19

Description

@achempion

Due to some Hash160 so-called collisions we cant use checkValueSent function.
For example, we can have two BTC addresses that both have the same Hash 160, for instance:
https://blockchain.info/ru/address/17AXqoGmJ71Noc2hZvDnP1wGPZTVykXsPd
https://blockchain.info/ru/address/37rYmLmCr1Kktmj8h1tNoeJCY5kDaGHpjp

My proposition is that we need to add another argument to specify the type of BTC address (p2p, p2sh or both).

Here we need to check specifically for our type of an address.
https://github.com/rainbreak/solidity-btc-parser/blob/master/src/btc_tx.sol#L286

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions