4

I know one of the goals of Iota is to allow off-tangle transaction, wether that is with side chains or flash channels or some other offline solution. These seperate transaction deliberately do not interact with the main tangle so they will not detect double spends happening between the side chain and the main tangle.

The problem will only rear its head when the side chain attempts to merge with the tangle. If there has been a double spend it cannot merge.

Can this scenario be prevented? What would happen to all the valid transactions on the side chain?

5

1. If you consider flash channels : double-spend is not possible because when creating a flash channel all participants MUST transfer the exact same amount of iota to a multi-sig wallet (signed by all participants). The amount of iota "in" the flash channel cannot be double-spend because transaction initiating the flash channel (and so the multi-sig address) must be approved before starting the flash channel.

2. If you consider "offline" tangle (aka side-chain) with malicious actors (i.e. a tangle managed by one or more fullnode totally disconnected from the main tangle) : in this case kind-of double-spend is temporary possible. One can indeed double-spend by issuing 2 malicious transactions: one on the main tangle and one on the "offline" tangle. Both transactions can be seen as valid in their respective tangle (except if the coordinator is still running). Double spend will eventually be detected when offline tangle is re-connected with main tangle. It means that transactions that where considered as confirmed in the offline tangle will loose this status when they "re-connect" to the main tangle (simply because there will be no tips from the main tangle approving them)

3. If you consider "offline" tangle (aka side-chain) with only good actors, then, at re-connection, all transactions from the offline tangle can be accepted on the main tangle (because we make the assumption that there is no double spend). It's possible that we need to fix a small technical problem to ensure that new transactions on the main tangle will select tips from the ex-offline-tangle (but I don't know enough about the current tip selection algorithm to go into more details here).

Note that scenario 2 and 3 don't make sense when coordinator is in place and consensus driven by the rule : "milestone transaction must approve a transaction before considering it as 'confirmed' "

  • So in case 2 it seems you are saying that double spend will only be detected "eventually" but that sounds like you are saying that double spend can take place. Why do you say the side chain needs to be managed by a bad node? If it was a good node that is not checking the main tangle they would also be fooled. – Spamalot Dec 7 '17 at 18:41
  • What I mean is if all participants in the side chain are good actors and don't try to double-spend, there is no reason to not being able to re-connect all transactions easily (scenario 3). As soon as there is a double-spend, reattachment of all other valid transactions will be more difficult (but it can be done).(scenario 2) – ben75 Dec 7 '17 at 19:43
7

You can't. Just consider the complete flash channel as two transactions. Opening channel. Closing channel. Neither transaction is allowed to conflict with the network.

  • On opening a channel both parties deposit IOTAs to a multi-signatory address.
  • On closing you get the IOTAs back with a different distribution.

Basically like Poker. You buy in and get chips. You play with the chips (exchange IOTAs in the flash channel). Still you'll only be able to pay the pizza guy if you have some other money (IOTAs on the main tangle).

1

The flash channel has collateral placed in it, which both users risk losing if they try to submit an invalid transaction.

Therefore there is a financial incentive for off-tangle transactions to be submitted and confirmed properly.

When you enter into a Flash channel you define the amount of collateral you will add to the channel. If you are starting a channel with an unknown partner you may open a low value channel or require the unknown partner to deposit a larger collateral into the channel.

If there is a dispute part way through a channel, a user can release the funds that have been approved during transactions by attaching the most recent channel state. The remaining funds will be deposited into the remainder address (generated at channel opening). These funds will remain here until both users agree to a division of funds and then sign a transaction releasing them.

Source: https://blog.iota.org/instant-feeless-flash-channels-88572d9a4385

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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