the size of the swap digraph
D
, but it is not necessary for a
party to specify generic preferences as they are implied from
the above rules. Therefore, throughout the paper, we assume
that Pvis specified by its generator set, which is a subset of
its non-generic preference pairs that, together with the generic
pairs and transitivity, generate the whole poset. A generator
set of a poset may not be unique. We use this convention in
our examples and running time bounds. (This does not affect
our hardness results — they hold even if the preference poset
of each party is specified by listing all preference pairs.)
An outcome
ω∈Ωv
is called acceptable if
ω⪰NODEALv
.
The set of acceptable outcomes of a node
v
will be denoted
Av3.
Throughout the paper, we will often omit subscript
v
in these
notations (and others as well) if
v
is implicit in the context or
irrelevant. On the other hand, if any ambiguity may arise, we
will sometimes add a superscript to some notations specifying
the digraph under consideration; for example we will write
DEALD
v
to specify that outcome
DEALD
v
is with respect to
digraph D.
Protocols. Given a swap system
S= (D,P)
, a swap protocol
P
for
S
specifies actions of each party over time, in particular
it determines how assets change hands. Initially, an asset
represented by an arc
(u, v)∈A
is in the possession of
u
, and,
when
P
completes, this asset must be in possession of either
u
or
v
. If
(u, v)
ends up in the possession of
v
, we will say
that the arc
(u, v)
has been triggered. The outcome of
v
after
executing
P
is
⟨ωin |ωout⟩
, where
ωin
and
ωout
are the sets
of incoming and outgoing arcs of
v
that are triggered in this
execution. In particular, we write
P(v)
for the outcome of
v
in an execution of protocol
P
in which all parties follow
P
. If
some party (possibly
v
itself) deviates from
P
, we assume that
v
’s outcome is also finalized when
P
completes, but it may be
different from P(v).
A protocol may use appropriate cryptographic primitives. In
particular, following [
19
], we assume the availability of smart
contracts. A smart contract for an arc
a= (u, v)
allows
u
to
put asset
a
in an escrow secured with a suitable collection
of hashed time-locks: each such time-lock is specified by a
pair
(h, τ)
, where
h=H(s)
is a hashed value of a secret
s
and
τ
is a time-out value. In order to unlock this time-lock,
v
(and only
v
) must provide the value of
s
before time
τ
.
If all time-locks of
(u, v)
are unlocked,
v
can claim
a
. This
automatically triggers arc
(u, v)
. If any time-lock times out,
a
is automatically returned to
u
. We describe a more elaborate
hashed time-lock in the next section.
Properties. For a swap protocol to be useful, it must guarantee
that if all parties follow it then every party ends in an outcome
at least as favorable as trading all their outgoing for all their
3
This definition can be relaxed to allow some outcomes incomparable
to
NODEAL
be acceptable. In this extended model, the set
Av
of accept-
able outcomes would be part of a swap system specification, and would
have to satisfy three conditions: (i)
{ω:ω⪰NODEALv} ⊆ Av
, (ii)
{ω:ω≺NODEALv}∩Av=∅
, and (iii)
ω∈ Av∧ω⪯ω′⇒ω′∈ Av
.
Our results can be extended naturally to this model. We adopted the simpler
definition to streamline the presentation.
incoming assets. Further, every conforming party should end
up with an acceptable outcome, no matter whether other parties
follow the protocol or not. Lastly, rational parties should have
no incentive to deviate from the protocol. Herlihy [
19
] captured
these properties using the concepts of uniformity and strong
Nash equilibrium. Our definitions, below, are their natural
extensions to the more general model of swap systems.
Uniformity. A swap protocol
P
is called uniform if it
satisfies the following two conditions:
Liveness: If all parties follow
P
, they all end in outcome
DEAL or better, that is P(v)⪰DEALvfor all v∈V.
Safety: If a party conforms to
P
, then its outcome will be
acceptable, independently of the behavior of other parties.
A less restrictive concept of uniformity may also be of interest:
We say that a protocol
P
is weakly uniform if it satisfies the
safety condition above, but the liveness condition is replaced by
the following weak liveness requirement: if all parties follow
P
, then at least one party ends in an outcome strictly better
than NODEAL. The assumptions on preference posets imply
directly that a protocol that is uniform is also weakly uniform.
Nash equilibria and atomicity. We extend the concept of
outcomes to sets of parties, where an outcome of a set is just a
vector of individual outcomes. On this set we can then define
a preference relation in a standard way, via a coordinate-wise
ordering of outcomes. Formally, for any set of parties
C⊆V
,
an outcome vector of
C
is
¯ω= (ωv)v∈C
, where
ωv∈Ωv
for
all
v∈C
. Denote by
¯
ΩC
the set of all outcome vectors of
C
.
Given two outcome vectors
¯ω, ¯ω′∈¯
ΩC
, we write
¯ω⪯C¯ω′
if
ωv⪯vω′
v
for all
v∈C
. If also
¯ω̸= ¯ω′
then we write
¯ω≺C¯ω′
. (In other words,
¯ω≺C¯ω′
means that at least one
party in
C
does strictly better in
¯ω′
than in
¯ω
, and every party
in
C
does at least as good.) In this notation, if all parties follow
a protocol
P
, then the outcome vector
P(C)
of a protocol
P
for a set of parties Cis (P(v))v∈C.
We will say that a protocol
P
is a strong Nash equilibrium
if no coalition of participating parties can improve its vector
outcome by deviating from
P
; more precisely, for every set
C
of parties, if
¯ω
denotes the outcome vector of
C
in some
execution of
P
where all parties in
V\C
follow
P
, then we
cannot have
¯ω≻CP(C)
. We will call
P
atomic if it is both
uniform and a strong Nash equilibrium.
Example 1. Consider a swap system
S= (D,P)
whose
digraph
D
is shown in Figure 1. The preference poset
Pu
is
generated by two preference pairs
DEALu≺ ⟨v|v⟩ ≺ ⟨v|w⟩
,
the preference poset
Pv
is generated by two preference pairs
DEALv≺ ⟨u|u⟩≺⟨w|u⟩
, and the preference poset
Pw
is
generated by one preference pair DEALw≺ ⟨u|v⟩.
Consider also a swap protocol
P
for
S
such that if all parties
follow
P
then all end up with outcome
DEAL
. Then
P
is not a
strong Nash equilibrium, because for
C={u, v}
, the parties
in
C
can ignore
P
altogether and simply swap their assets
between themselves, improving their outcomes. Nevertheless,
as we show later in Section IV,
S
does have an atomic protocol.
Roughly, instead of using the whole digraph
D
, in this protocol
only assets represented by arcs
(u, w)
,
(w, v)
and
(v, u)
will
be swapped. Then the outcome of each party will be better