crossclaim / xclaim-sol

XCLAIM(BTC,ETH): Solidity implementation for Bitcoin backed tokens on Ethereum
https://xclaim.io/
GNU General Public License v3.0
24 stars 8 forks source link

redeem process - add replay protection #19

Open alexeiZamyatin opened 5 years ago

alexeiZamyatin commented 5 years ago

Add replay protection to redeem protocol, to prevent a vault from re-using the same Bitcoin transaction as proof for multiple redeemRequests.

Require the following digest is included in OP_RETURN of the redeem Bitcoin transaction:

alexeiZamyatin commented 5 years ago

Requirements:

1) generate digest in requestRedeem. Emit raw data as event + return digest from function 2) verify digest is in OP_return in confirmRedeem function