ARGO swap questions - Argoneum/argoneum GitHub Wiki

I got my Argoneum for the Argo that I send from new chain. But why my coins from old chain are send too? I thought they must stay in old argo wallet 1.0 because I don´t send it away from this chain?

This is a so called transaction replay and is valid, let's explain how all things work together.

At block 390000 the Argo chain was split into two different blockchains: with old block reward (version 1.1.x) and with new one (version 1.2.x). So block 390001 is different in both chains being mined by different miners with different chain parameters (network consensus). Every coin that existed at block 390000 got a copy in each of 2 forked chains.

After the fork all the network nodes (wallet is also not a masternode, but simple node) still are connected to each other and still broadcast and rebroadcast new transactions between chains. Each send operation makes a transaction that has to be included into a block by a miner. Transaction records from what source address coins were sent to what destination address. This transaction is the same in both chains and is, thus, valid in both chains as much as coins existed at the time of its generation. Remember, that we talk about coins that existed in pre-fork chain before the block 390001, so they are valid in both chains either.

Let's assume that you make a transaction in a new chain using such old coins (existed at block 390000). This transaction is broadcasted to both old and new nodes. Old subnet mines a block with old reward, and this block includes this transaction. New subnet also mines a new block with new reward, but it also includes this transaction. Blocks are mined independently, but because the transaction was valid for both chains, it was included into both chains (different blocks). So the same coins spent in the new net, were also spent in the old one. This is a so called transaction replay. It is because the transaction itself does not prevent to be mined in both forks.

Is it possible to prevent this?

Yes, you just have to ensure that there is no same coins in the same blocks in both chains existed before making a new transaction.

How to do this?

The easiest way is to send all coins from own wallet to the same own wallet first. They will be spent in both chains in the same transaction (same tx hash), but recorded into two different blocks (different hashes), each in own chain. You still own coins in both chains because you've sent them to your own address and have a private key in the wallet for that address.

Now, if you send coins again, they will not be sent in the other chain because that other chain has different previous block hash, and such transaction will be invalid in the other chain and rejected. You still can send same coins in the other chain.

Can such a copy transaction be recovered somehow?

Transactions are irreversible, but you can ask the receiving party to send your coins back in the other chain. To do so he should have a wallet running in that other chain and import a private key for receiving address (where you have sent coins) to this wallet (dumpprivkey address, then importprivkey key). Then he is able to send coins back, still keeping them in the other chain, being recorded in the other block.

Is it a bug of a feature?

It's rather a feature explained above. That is why all exchanges on similar forks (say, ETH/ETC or BTC/BCH) replaced user deposit addresses - they made this way a replay protection, preventing undesired results. We considered old Argo chain as dead, so did not include any replay protection for old Argo chain.