1

I do not understand how the IOTA Tangle DAG indicates by its structure the temporal order when two spends are on separate, independent, branches.

It is possible that two transactions occur and are found at two different sites within the Tangle. All the Tangle shows me is that the transaction occurred at some time after the two previous transactions that it referenced (trunk and branch).

Furthermore, branch and trunk transactions are determined by a 'best-attempt' random method. This is known as the MCMC Walk and it works using a set of transactions known to the local node. This creates a random transaction graph and does not enforce an order on where a subsequent transactions appear within the graph.

Tf = (Ta,Tb)

Tg = (Ta,Tc)

All that we know is that Tf and Tg come after Ta,Tb, Tc. We know the 'graph-order' but we do not know the transaction events as they happened in time (temporal order) for Tf and Tg.

Suppose there is a double-spend and someone needs to determine which one is the first (legitimate) spend. When that happens, how is the temporal order of them determined?

How is temporal order of transactions determined?

3
  • It is also worth noting that any kind of protocol that tries to resolve double spends by determining which transaction was first seen by (a part of) the network will open new attack vectors and therefore using timestamps for deciding which transaction of a double-spend is legitimate is not a wise idea, even if these timestamps could be determined.
    – mihi
    Commented Dec 19, 2018 at 22:59
  • Fraud detection is mostly useless in cryptocurrency land, as fraud cannot be prevented and it is hard to prosecute fraudsters. A common attack vector of a timestamped signature [which, by the way, also works with some "tamper-proof" bookkeeping software which uses X.509 TSP] is to create a small controlled part of the network which only receives and never sends transactions, and inject a version of your double-spend transaction there, then (later) inject the other version to the "big" network. Once you join the networks, double spend occurred.
    – mihi
    Commented Dec 20, 2018 at 13:04
  • [for the bookkeeping software, you install it in a VM, create a snapshot, do the "hidden" transactions (let them sign by TSP but not publish them), revert the snapshot, do the "visible" transactions, publish them, and later claim that these transactions are invalid since you have a valid signature of conflicting "hidden" transacions, whose timestamp is earlier]
    – mihi
    Commented Dec 20, 2018 at 13:05

2 Answers 2

4

Due to the dag structure of the Tangle a complete ordering of transactions is impossible. Therefore, the protocol don't relies on transaction time ordering to determine which of two conflicting transactions is the legitimate one. By design, the protocol will decide that the transaction with most weight will be the accepted one.(here is a brief explanation of this mechanism)

Note that making the assumption that the legitimate transaction is the first one (from timing perspective) is an arbitrary choice, just like the random walk that at some point select randomly one of the 2 conflicting transaction. (History shows us that in the context of the "online seed generator incident" : the legitimate transaction issued by victims in an attempt to keep their funds safe was issued after the illegitimate one).

To summarize : if you try to build an application requiring complete ordering of transactions, then you cannot use the Tangle.

0
2

All that we know is that Tf and Tg come after Ta,Tb, Tc

...and the transactions (directly or indirectly) referenced by Ta, Tb, Tc.

That is all the Tangle "knows" about the temporal order of these transactions. It makes no statement about the temporal order of the independent (neither directly or indirectly referencing each other) transactions Tf and Tg.

But be sure to notice that this "independence" of transactions only happens if the transactions occur fairly close in time; due to the exponential nature of validation (one transaction validates two others), if a new transaction happens a long enough time after another, older transaction, the newer transaction will definitely reference the older one which allows you to be sure about the temporal order.

This is similar to how in Bitcoin a miner can order transactions in the same block (which means these transactions must have happened fairly close in time) arbitrarily (i.e. irrespective of when they actually happened or arrived at the miner).

Suppose there is a double-spend and someone needs to determine which one is the first (legitimate) spend. When that happens, how is the temporal order of them determined?

If two conflicting transactions (meaning that they can't both be true at the same time) are submitted at the same time (or very close in time) one of them will randomly win out as MCMC tip selection is biased towards transactions with higher cumulative weight (at first, they'll have the same weight, so one will randomly be chosen. This chosen one will then be more likely to be chosen by other transactions etc.). This is similar to how in Bitcoin a miner can arbitrarily decide which one of two double spend transactions to kick out of his block.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.