xclaim-sol icon indicating copy to clipboard operation
xclaim-sol copied to clipboard

issueToken: implement replay protection for BTC lock transaction

Open alexeiZamyatin opened this issue 6 years ago • 2 comments

Problem: transaction can be replayed by a user to trick contract into issuing multiple tokens, possible with different contracts

Fix:

  • Contract must check that contract address is in Bitcoin transaction -> prevent issuing on multiple issuing chains
  • Contract generates a nonce which must be included in the Bitcoin tx -> counter

As a result, the contract returns a digest of:

  • user eth address
  • contract address
  • counter

alexeiZamyatin avatar Jan 11 '19 17:01 alexeiZamyatin