5

This question already has an answer here:

When the Ethereum fork happened a few months ago, users were cautioned to protect against so called "replay attacks". A replay attack, as far as i understand it, is when a transaction occurs on one fork and an adversarial player submits the exact same transaction onto a second fork. A contrived example would be an XMR->BTC exchange that takes your XMR on one fork and then, secretly, replay that same transaction on the older fork.

This question is mostly theoretical rather than a pratical concern of mine. i imagine that Monero hard forks very rapidly reduce in value and so replay attacks are probably not worth much (you have to have a buyer, afterall) and after a few weeks the Mixin Transactions likely make an exact replay impossible.

But there is anything i need or can do to protect myself against a replay attack? Are replay attacks "features and not bugs" in the case of short one-to-three orphan blocks (a vendor could probably resubmit a transaction trapped in an orphan block if they notice it in an hour or so)?

marked as duplicate by user36303, Smart Kid Oct 2 '16 at 13:46

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

5

The most obvious way is doing something like gratuitously increasing the Tx version or changing Tx structure. However, wallets have to be aware of this too, so it's a little more complicated (plus you waste version numbers). We haven't done that as the prior chain forks (especially in the recent one) haven't been extended much at all (i.e., they weren't controversial); it's just been not a concern.

In the future, if an old chain fork does pick back up, the easiest thing for you to do as a user (assuming RingCT is enabled) would be to add a coinbase transaction from your fork to your transaction as a mixin. This will ensure it's always invalid on the other chain. This solution is pretty simple and would likely be preferable to mucking with version numbers or other params. Coinbase transactions are locked for 60 blocks, so just make sure you don't spend for approx 120 minutes after a fork, and include an unlocked-but-only-on-your-chain coinbase as a mixin (again, only works for RingCT unless you're spending denominations that match the coinbase). This could be pretty easily implemented if it became necessary.

Not the answer you're looking for? Browse other questions tagged or ask your own question.