<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Digital Social Contracts: A Foundation for an Egalitarian and Just Digital Society?</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Luca Cardelli</string-name>
          <email>luca.a.cardelli@gmail.com</email>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Liav Orgad</string-name>
          <email>liav.orgad@eui.eu</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Gal Shahaf</string-name>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Ehud Shapiro</string-name>
          <email>ehud.shapirog@weizmann.ac.il</email>
          <xref ref-type="aff" rid="aff3">3</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Nimrod Talmon</string-name>
          <email>talmonn@bgu.ac.il</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Ben-Gurion University</institution>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>European University Institute</institution>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>University of Oxford</institution>
        </aff>
        <aff id="aff3">
          <label>3</label>
          <institution>Weizmann Institute</institution>
        </aff>
      </contrib-group>
      <abstract>
        <p>Almost two centuries ago Pierre-Joseph Proudhon proposed social contracts { voluntary agreements among free people { as a foundation from which an egalitarian and just society can emerge. A digital social contract (DSC) is the novel incarnation of this concept for the digital age: a voluntary agreement between people that is speci ed, undertaken, and ful lled in the digital realm. It embodies the notion of \code-is-law" in its purest form, in that a DSC is a program { code in a social contracts programming language, which speci es the digital actions parties to the social contract may take; and the parties to the contract are entrusted, equally, with the task of ensuring that each party abides by the contract. Parties to a social contract are identi ed via their public keys, and the one and only type of action a party to a DSC may take is a \digital speech act" { signing an utterance with her private key and sending it to the other parties to the contract. We present a formal de nition of a DSC as agents that communicate asynchronously via digital speech acts, where the output of each agent is the input of all the other agents. We outline an abstract design for a social contracts programming language and hint on their applicability to social networks, sharing-economy, egalitarian currency networks, and democratic community governance.</p>
      </abstract>
      <kwd-group>
        <kwd>Democratic Governance</kwd>
        <kwd>Programming Language Design</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        Over the last three decades, the Internet has mushroomed from 0 to 4.6 billion
active \users", 60 per cent of the world population (and more than 90 per cent
in the developed world), the fastest di usion in human history. But what kind of
\society" has it created? The digital realm includes a few powerful entities, who
? Full version available on arXiv [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. Copyright c 2020 for this paper by its authors.
      </p>
      <p>
        Use permitted under Creative Commons License Attribution 4.0 International (CC
BY 4.0).
control the entire space, and billions of data subjects, as termed by the EU's
General Data Protection Regulation (GDPR), who have almost no rights and cannot
vote, be consulted, or in uence decision-making. They have no due process (e.g.,
in censorship, account blocking, or privacy violation) and are not the owners of
their data. The structure of the digital space remains \feudal" in nature|people
are not even perceived as digital \citizens" but as \users"|and it is not based
on the ideals on which citizenship in democracies is grounded: liberty,
equality, and popular sovereignty. The digital space is further rampant with sybils
(fake/duplicate accounts) and bots, making it a hostile environment and
untenable for democratic governance. To a large extent, digital technology is the great
unequalizer in today's world, making a few digital \barons" rich and powerful
by pro ting from the multitudes performing digital labour without
compensation. Like feudal lords of yore, the digital barons set their platform's rules of
conduct (legislative), interpretation (judicial), and implementation (executive),
and violate the dictum \no taxation without representation". New technologies
do not support the ideals of democracy. Rather, the design of the digital world
presents a dystopian future, with the global reach of surveillance capitalism [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ]
robbing citizens of both power and wealth. The structure of the digital world
resembles the \state of nature" (i.e., a social disorder).
      </p>
    </sec>
    <sec id="sec-2">
      <title>To establish a self-governed, egalitarian, and just society in the digital world,</title>
      <p>
        we advocate the development of DSCs to govern digital human behavior. A DSC
is the digital counterpart of social contract theories, as envisioned centuries ago
by the founding philosophers of the Enlightenment { Thomas Hobbes, John
Locke, Jean-Jacques Rousseau, and Pierre-Joseph Proudhon { and more recent
thinkers, such as John Rawls [
        <xref ref-type="bibr" rid="ref10 ref11 ref14 ref5 ref6">11, 14, 10, 6, 5</xref>
        ]. Social contract theories are the
cornerstone of modern democracies (they explain the conditions under which
people rationally agree to submit their rights to a legitimate authority in return
for collective bene ts, such as protection, freedom, or justice) yet, thus far, have
remained merely an abstract ideal, based on a hypothetical narrative and the
presupposition of tacit, rather than explicit, consent [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]. A DSC o ers, for the
rst time in history, a conceptual model to translate the social contract from a
hypothetical theory into a political reality, by utilizing technology in the service
of the most important ideas of the Enlightenment. In short, a DSC is a voluntary
agreement between individuals, speci ed, undertaken, and ful lled in the digital
realm. It allows for conditions to reach the social contract to be programmed by
generating equal access to information. It further enables the programming of
the method of agreement by implementing a \one person, one vote" system, and
provides the opportunity to check contractual outcomes in ways that comply
with requirements of fairness, e.g., by limiting unequal distributional outcomes.
We aim for DSCs that are equal (in sharing power), just (in allocating resources),
and self-governed (among the participating members ). Hence, the equal
sharing of power would require mitigating sybils (fake and duplicate identities) and
launching digital currencies where distributed and egalitarian coin minting
provides a form of Universal Basic Income [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ] to members.
      </p>
      <p>
        On the technological design, DSCs are programs for a distributed,
locallyreplicated, asynchronous blockchain architecture. DSCs embody the notion of
\code-is-law" in that they are a code in a social-contract programming language,
which speci es the digital actions parties may take and the terms. Unlike present
digital platforms, this code is not in icted on the user by a monopolistic
digital entity to its nancial bene t; rather, people who trust each other enter into
a code-regulated relationship voluntarily. DSCs allow for cooperative behavior
because they disallow faulty, non-cooperative actions; a party can behave only
according to the contract. Agents are expected to employ genuine identi ers and
function as both actors and validators. An agent may participate simultaneously
in multiple social contracts; similarly, each contract may have a di erent set of
agents as parties; the result is a hypergraph with agents as vertices and contracts
as hyperedges. Signed indexed transactions (\digital speech acts"), speci ed and
carried out according to a contract, are replicated only among parties to a
contract, who ratify them, and are synchronized independently by each agent. A
transaction carried out is nalized when rati ed by an appropriate
supermajority of the parties to the contract. A party to a contract is typically an agent who
embodies a natural person via her genuine identi er, but, if deterministic, could
also be a synthetic agent (aka \legal person"), which functions algorithmically,
very similar to a \smart contract" of standard blockchains [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ].
      </p>
      <p>
        In 2017, Mark Zuckerberg published a vision on how to turn Facebook from
a social network to a \Global Community" governing the planet in most aspects
of life, where every user can vote on \global problems that span national
boundaries" and \participate in collective decision-making" [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ]. According to
Zuckerberg, \Facebook can explore examples of how community governance might work
at scale" yet, in his global community, people have no rights and bear no
responsibilities; they are a means to make pro t for Facebook's stakeholders.
Zuckerberg's community turns the problem on its head { Facebook is presented as the
solution, rather than the problem. Our starting point is radically di erent than
Facebook and similar-minded companies in two aspects: 1) vision: it starts from
the premise that there can and should be a digital public life, complementary to
the traditional public life in the physical world, by which political communities
govern their life; 2) technology: The only technology that provides sovereignty to
its community of users is blockchain. Nobody can unplug Bitcoin or Ethereum;
both will keep running as long as someone somewhere keeps running their
protocols. Alas, current blockchain technologies are environmentally harmful and
plutocratic { they are neither egalitarian nor just as sovereignty is shared not
equally but according to one's wealth, i.e., one's ability to prove work or stake.
We aim to o er an alternative. In summary, DSCs are: Conceptually, a
voluntary agreement among individuals, speci ed, undertaken, and ful lled in the
digital realm; Mathematically, an abstract model of computation { a transition
system specifying concurrent, non-deterministic asynchronous agents engaged
in digital speech acts; Computationally, a program in a Social-Contracts
Programming Language with which social contracts among computational agents
are easy to express, comprehend and debug; Technologically, a programmable,
distributed, locally-replicated, asynchronous blockchain architecture, operating
on mobile phones, tagged by the genuine identi ers of their owners.
      </p>
      <p>
        Two key concepts are employed in DSCs: (1) Digital Speech Acts: Each
party to a DSC is equipped with a key pair { a public key and a private key
(PKI), with which they can digitally sign text strings and verify each other's
signatures. All that a computational agent can do, as a party to a DSC, is
perform and perceive digital speech acts, namely sign a digital utterance and send
it to the other agents that are parties to the contract, or receive signed digital
utterances from these agents. (2) The Person as an Oracle: Computational
agents in a DSC face nondeterministic choices: Which room to book, when and
where? How much to pay and to whom? How to vote on a proposal to accept a
new member to the contract? Computational agents have no volition or free will
and hence cannot make such choices on their own. Therefore, nondeterministic
choices in the social contract code are interpreted as Oracle calls, where the
human operating the computational agent serves as the Oracle. In other words,
nondeterministic choices in the code of an agent specify the interactions
between the \software" and the \user", namely between the computational agent
and the person operating it: When faced with a nondeterministic choice, the
computational agent consults its human operator as to which choice to make.
Related Work The concepts and design presented here are reminiscent of
the notions of blockchains [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ], smart contracts [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ], and their programming
languages [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. Hand-in-hand with these we are working on egalitarian currency
networks [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ], an egalitarian and just alternative to existing plutocratic
cryptocurrencies such as Bitcoin [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] and Ethereum [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
      </p>
      <p>
        A fundamental tenet of our design is that social contracts are made between
people who know and trust each other, directly or indirectly via other people
that they know and trust. This is in stark contrast to the design of
cryptocurrencies and their associated smart contracts, which are made between anonymous
and trustless accounts. A challenge cryptocurrencies address is how to achieve
consensus in the absence of trust, and their solution is based on proof-of-work [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]
or, more recently, proof-of-stake [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] protocols. In contrast, social contracts are
between known and trustworthy individuals, each expected to posses a genuine
(unique and singular) identi er [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ] (see therein discussion on how this can be
ensured). Hence, a di erent approach can be taken. In our approach, the
integrity of the ledger of actions taken by the parties to the social contract is
preserved internally, among the parties to the agreement, not between external
anonymous \miners", as in cryptocurrencies. This gives rise to a much simpler
approach to fault tolerance, as discussed in the companion paper [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ].
2
      </p>
      <sec id="sec-2-1">
        <title>Digital Social Contracts</title>
        <p>
          Here we describe a formal model for DSCs { for space constraints, we do not
provide full formal de nitions for some preliminaries. We assume a given nite set
of agents V , each associated with a genuine (unique and singular) [
          <xref ref-type="bibr" rid="ref15">15</xref>
          ] identi er,
which is also a public key of a key-pair.5 We expect agents to be realized by
computer programs operating on personal devices (e.g. smartphones) of people.
Hence, we refer to agents as \it". We identify an agent v 2 V with its genuine
public identi er, and denote by v(s) the result of agent v signing the string s 2 S
with the private key corresponding to v. We assume computational hardness of
the public-key system, namely that signatures of an agent with a given identi er
cannot be produced without possessing the private key corresponding to this
identi er. If t is a tuple indexed by V , then we use t[v] to refer to the vth element
of t. We say that t0 = t, except for t0[v] := x, to mean that the tuple t0 is obtained
from t by replacing its vth element by x. In particular, if t[v] is a sequence, then
we say that t0 = t, except for t0[v] := t[v] x, to mean that t0 is obtained from t
by appending x to the sequence t[v]. Agents are assumed to be connected via a
reliable asynchronous communication network (without a message-arrival time
limit), and require all messages to be authenticated. Informally, the only things
an agent can do as a party to a DSC are (i) perform a digital speech act [
          <xref ref-type="bibr" rid="ref15">15</xref>
          ],
de ned next; (ii) observe digital speech acts performed by others; and (iii) change
internal state.6 A key characteristic of a speech act taken in the physical world
is that all people present indeed perceive the person taking the act as well as
the act itself. We capture this characteristic by requiring that a digital speech
act be (i) digitally signed by the person taking it.
        </p>
        <p>De nition 1 (Digital Speech Act, v-act). Given a set of agents V , a digital
speech act of agent v 2 V consists of (i) signing an utterance (text string) s,
resulting in m = v(s); and (ii) broadcasting the message m to V . We refer to a
digital speech act by v resulting in the signed action m as the v-act m, and let</p>
        <sec id="sec-2-1-1">
          <title>M be the set of all v-acts for all v 2 V .</title>
          <p>De nition 2 (Transition System). A transition system T S = (S; s0; T )
consists of a set of states S, an initial state s0 2 S, and a set of transitions T ,
T S S, with (s; s0) 2 T written as s ! s0. The set s ! = fs^ j s ! s^ 2 T g
is the outgoing transitions of s. A run of T S is a sequence of transitions r =
s0 ! s1 ! : : : from the initial state. A family of transition systems T (S) over</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>S is a set of transition systems (T; S) where T is a set of transitions over S.</title>
      <p>
        Here we de ne DSCs in the abstract; in particular, we do not address a
distributed realization nor agent faults. These issues are addressed in a companion
paper [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. A DSC consists of a set of agents, identi ed via public keys, and
connected via a reliable, asynchronous, order-preserving communication network.
Namely, we assume that between any two agents in the network, the network
delivers all messages sent from one agent to another { correctly, eventually, and
5 We identify the set of agents V with the set of parties to the agreement. Extensions
will allow an agent to be a party to multiple agreements, and di erent agreements
to have di erent sets of agents as parties.
6 While the formal de nition allows a digital speech act to employ an arbitrary string,
its intended use is to take meaningful actions. As parties employ strings that are
meaningful to the other parties, we believe we do not conjure \speech acts" in vain.
in the order sent.7 All that agents can do within a DSC is perform digital speech
acts (henceforth, acts), which are sequentially-indexed utterances, signed by the
agent and sent as messages to all other agents that are parties to the contract,
as well as receive such messages. Example acts are \I hereby transfer three blue
coins to Sue" and \I hereby con rm the room reservation by Joe". A DSC
speci es the digital speech acts each party may take at any state. For example, a
social contract regarding the blue currency may specify that I can say that I
transfer three blue coins to Sue only in a state in which I in fact have at least
three blue coins; and I can say that I con rm Joe's room reservation only if I
have not already con rmed a con icting reservation. Our abstract notion of a
DSC identi es a DSC with a transition system. The state of a DSC, referred to
as a ledger, is composed of the states of each of the agents participating in the
contract, referred to as their history, which is but a sequence of digital speech
acts. The history of an agent v consist of digital speech acts it experienced, in
particular: acts by v, referred to as v-acts, in the order taken, interleaved with
acts by the other agents, in the order received from the network. Hence, at any
ledger that is a state of the computation, the u-acts in the history of agent v must
be a pre x of the u-acts in the history of u, for any u and v. We call such a ledger
sound. Next we formalizes this informal description. We assume a given set of
actions A. Signing an action by an agent v makes the action non-repudiated by
v. All that an agent that is party to a DSC does, then, is perform digital speech
acts, as well as receive such acts performed by others, resulting in a sequence of
non-repudiated acts - a history of crypto speech acts.
      </p>
      <p>De nition 3 (v-act, History). We refer to m = v(a), the result of signing an
action a 2 A by agent v 2 V , as a v-act, let M denote the set of all v-acts by
all v 2 V , and refer to members of M as acts. A history is a nite sequence of
acts h = m0; m1; : : : mn, n 2 N , mi = vi(ai) 2 M, i 2 [n], ai 2 A, vi 2 V . The
set of all histories is denoted by H.</p>
      <p>De nition 4 (Pre x, Consistent Histories). Given a sequence s = x1; x2; : : : xn,
a sequence s0 is a pre x of s, s0 s, if s0 = x1; x2; : : : xk, for some k n. h[u]
is the restriction of h to the subsequence of u-acts. Two agent histories h; h0 2 H
are consistent if either h[v] h0[v] or vice versa for every v 2 V .</p>
      <p>I.e., histories are consistent if they agree on the subsequences signed by each
agent. A ledger of a DSC is an indexed tuple of histories of the parties to the
contract. Ledgers are the states of the social contract transition system.
De nition 5 (Ledger). A ledger l 2 L := HV is a tuple of histories indexed
by the agents V , where lv is the history of agent v in l, or l's v-history.</p>
      <p>Following De nition 4, we apply the notation lv[u] to denote the subsequence
of u-acts in the v-history in l. Our key assumption is that in a ledger that is
7 As agents have public keys with which they sign their sequentially-indexed messages,
such a network can be easily realized on an asynchronous network that is not
orderpreserving and is only intermittently reliable.
a state of a computation, each agent's history is up-to-date about its own acts.
Therefore, for agent histories to be consistent with each other, the history of
each agent can include at most a pre x (empty, partial or complete) of every
other agent's acts. In particular , the history of v cannot include u-acts di erent
from the one's taken by u; nor can it run ahead of u and \guess" acts u might
take in the future. A ledger is not a linear data structure, like a blockchain,
but a tuple of independent agent histories, each of them being a linear sequence
of acts. Furthermore, note that lv, the history of v in ledger l, contains, of
course, all v-acts, but it also contains acts by other agents received by v via
the communication network. Also, note that the v-history lv may be behind on
the acts of other agents but is up-to-date, or even can be thought of as the
authoritative source in l, regarding its own v-acts.</p>
      <p>De nition 6 (Ledger Diagonal, Sound Ledger). Given a ledger l 2 L, the
diagonal of l, l , is de ned by lv := lv[v] for all v 2 V . A ledger is sound if
lu[v] lv for every u; v 2 V .</p>
      <p>As we assume that each agent is up-to-date about its own acts, the diagonal
contains the complete sequence of v-acts for each agent v 2 V . Thus, each agent
history in a ledger re ects the agent's \subjective view" of what actions were
taken, where the diagonal of a ledger contains the \objective truth" about all
agents. Next we de ne transitions among these states.</p>
      <p>De nition 7 (Transitions). The set of social contract transitions T L L
consists of all pairs t = l ! l0 2 L L where l0 = l except for lv0 := lv m,
m = u(a) 2 M for some u; v 2 V and a 2 A. The transition t is referred to as
a v-transition, and can also be written as t = l (v;m!) l0. tu
De nition 8 (Input, Output and Sound Transitions). A v-transition t =
l (v;u(a)!) l0 is output if u = v and input if u 6= v. A transition is sound if it is
either input with lv0[u] lu[u] or output.</p>
      <p>Observation 1 If l is sound and l ! ^l 2 T is sound then ^l is sound.</p>
      <p>The next de nition aims to capture the following two requirements: Output
- an agent v may take a v-act in state l based solely on its own history lv. In
particular, v is free to ignore, or to not know, the other agents' histories in l;
Input - v must accept messages from the communication network in any proper
order the network chooses to deliver them.</p>
      <p>De nition 9 (Closed Set of Transitions). A set of transitions T
T is:</p>
      <sec id="sec-3-1">
        <title>1. Output-closed if for any v-act m, v 2 V , m 2 M, and any two output</title>
        <p>transitions t = l (v;m!) ^l, t0 = l0 (v;m!) ^l0 2 T , if lv = lv0 then t 2 T i t0 2 T .</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Namely, if every output v-transition is a function of lv, independently of lu</title>
      <p>for all u 6= v.</p>
      <sec id="sec-4-1">
        <title>2. Input-closed if T contains every sound input transition in T .</title>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>3. Closed if it is output-closed and input-closed.</title>
      <p>De nition 10 (Digital Social Contract). A DSC among a set of agents V
is a transition system SC = (S; l0; T ) with ledgers as states S L, initial state
l0 := V , and a closed set of transitions T T . The family of all DSCs over S
is denoted by SC(S), and SC(L) is abbreviated as SC.</p>
      <p>SC is the family of abstract social contracts, in contrast to its more
concrete implementations, and view such as speci cations for programs in a
SocialContracts Programming Language.</p>
      <p>Example 1 (A Currency Community: Example of a DSC). Let A = fpay(v)gv2V
be the set of acts. A message m = u(pay(v)) corresponds to a payment of 1 coin
from u to v. A transition t = l w;u(pay(v)!) l0 records in lw a payment of 1 coin
from u to v. Agent u can record a payment from u to v only if the balance
of u, according to lu, is positive. Formally, let lu = m1; m2; :::; mn, with mi =
wi(pay(vi)). Set bal(u) := c + jf1 i n : vi = ugj jf1 i n : wi = ugj,
for some c &gt; 0, and let T = fl u;u(pay(v)!) l0 : bal(u) &gt; 0g. Let T T~ denote the
closure of T in T . The DSC SC = (S; l0; T~) over the set of agents V speci es a
currency community where each agent u 2 V is initially granted c coins.
3</p>
      <sec id="sec-5-1">
        <title>A Social Contracts Programming Language</title>
        <p>Here we outline the design of a simple social contract programming language.
Abstractly, all that an agent can do, as a party to a social contract, is take acts
based on its history, and receive acts by others. In a practical social contract, the
acts an agent can take typically depend on salient features of its history, rather
than on the history in its entirety. So, given that social contracts employ a closed
set of transitions, the possible behaviors of an agent can be characterized by a
(not necessarily nite and possibly nondeterministic) state transducer. A state
transducer reads an input tape (in our case the inputs of an agent v) and writes
an output tape (in our case the sequence of v-acts), changing its state in the
process. The history of an agent fully speci es, even synchronizes, both tapes.</p>
        <p>Hence, our programming language endows each agent with an internal state,
which can be viewed as a digest of its history. As in a state transducer, the
agent's state may change as a result of an input or an output. Therefore, our
proposed Social-Contracts Programming Language (SCPL) presents the program
of an agent v as a set of rules of the following form:</p>
        <sec id="sec-5-1-1">
          <title>S; m ! m0; S0; where Conditions:</title>
          <p>where S is the internal state (state, for short) of v prior to taking the transition,
m is an input u-act by some u 6= v 2 V , m0 is an output v-act, S0 is the updated
state of v, and Conditions are any conditions on S, m, m0, and S0, that are
required for the transition to take place. The intended meaning of such a rule is
that an agent in internal state S, upon receiving an act m, may take act m0 and
change its internal state to S0, if Conditions are satis ed. Note that degenerate
rules, i.e., rules that do not have input m and/or output m0 and/or Conditions
are allowed. Next we provide an example.
3.1 Egalitarian Governance of Social Contracts
We provide a code example implementing the standard principle of democracy,
namely \one person, one vote", in e ect showing how a community may form
democratically. For simplicity, decisions to add or remove a member are taken
by a simple majority, using a secretary that handles ballots, is autonomous, and
initiated by the founder.</p>
          <p>Program 1: Democratic WhatsApp-like Group
founder --&gt; autonomous#secretary([Self]), member.
secretary(Members), _(propose(X)) --&gt;</p>
          <p>ballot(X,Members,0), secretary(Members).
secretary(Members), ballot(X,[],Result) --&gt;</p>
          <p>secretary_apply(X,Result,Members).
secretary_apply(X,Result,Members) --&gt;</p>
          <p>secretary(Members) where Result =&lt; 0.
secretary_apply(add(Member),Result,Members) -&gt;</p>
          <p>Member#member, secretary([Member|Members])
where Result &gt; 0.
secretary_apply(remove(Member),Result,Members) --&gt;
please_leave(Member), secretary(Members')
where Result &gt; 0,</p>
          <p>Members' is the result of removing Member from Members.
member --&gt; says(X), member.
member, ballot(X,[Self|Members],R) --&gt;
ballot(X,Members,R'), member
where R' := R, R+1, or R-1.
member, _(please_leave(Self)) --&gt; says(bye), stop.
member --&gt; says(bye), stop.</p>
          <p>Note that this is a very simple program, in particular as (1) there is no option
to decline an invitation (2) agents must wait for other agents to vote. Indeed, we
provide the program mainly as a proof of concept, but to implement a practical
democratic decision process, more complex program is needed. We also note that
votes are public to the community members and are not anonymous.</p>
          <p>
            Outlook. We have introduced the concept of DSCs, provided a mathematical
de nition of them, outlined a design for a social contracts programming language,
and demonstrated its social utility via program examples. Much remains to be
done; some is discussed in companion papers [
            <xref ref-type="bibr" rid="ref16 ref9">9, 16</xref>
            ].
          </p>
        </sec>
      </sec>
      <sec id="sec-5-2">
        <title>Acknowledgements</title>
        <p>Ehud Shapiro is the Incumbent of The Harry Weinrebe Professorial Chair of
Computer Science and Biology. We thank the generous support of the Braginsky
Center for the Interface between Science and the Humanities. Nimrod Talmon
was supported by the Israel Science Foundation (ISF; Grant No. 630/19).</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>Luca</given-names>
            <surname>Cardelli</surname>
          </string-name>
          , Gal Shahaf, Ehud Shapiro,
          <string-name>
            <given-names>and Nimrod</given-names>
            <surname>Talmon</surname>
          </string-name>
          .
          <article-title>Digital social contracts: A foundation for an egalitarian and just digital society</article-title>
          . arXiv preprint arXiv:
          <year>2005</year>
          .06261,
          <year>2020</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>Lin</given-names>
            <surname>William</surname>
          </string-name>
          Cong and
          <string-name>
            <given-names>Zhiguo</given-names>
            <surname>He</surname>
          </string-name>
          .
          <article-title>Blockchain disruption and smart contracts</article-title>
          .
          <source>The Review of Financial Studies</source>
          ,
          <volume>32</volume>
          (
          <issue>5</issue>
          ):
          <volume>1754</volume>
          {
          <fpage>1797</fpage>
          ,
          <year>2019</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>Chris</given-names>
            <surname>Dannen</surname>
          </string-name>
          .
          <article-title>Introducing ethereum and solidity</article-title>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>Arthur</given-names>
            <surname>Gervais</surname>
          </string-name>
          , Ghassan O Karame,
          <article-title>Karl Wust, Vasileios Glykantzis</article-title>
          , Hubert Ritzdorf, and
          <string-name>
            <given-names>Srdjan</given-names>
            <surname>Capkun</surname>
          </string-name>
          .
          <article-title>On the security and performance of proof of work blockchains</article-title>
          .
          <source>In Proceedings of the 2016 ACM SIGSAC conference on computer and communications security</source>
          , pages
          <volume>3</volume>
          {
          <fpage>16</fpage>
          ,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>Thomas</given-names>
            <surname>Hobbes</surname>
          </string-name>
          .
          <source>Leviathan. JM Dent</source>
          ,
          <year>1914</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>John</given-names>
            <surname>Locke</surname>
          </string-name>
          .
          <article-title>Second treatise of government: An essay concerning the true original, extent and end of civil government</article-title>
          . John Wiley &amp; Sons,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>Satoshi</given-names>
            <surname>Nakamoto</surname>
          </string-name>
          .
          <article-title>Bitcoin: A peer-to-peer electronic cash system</article-title>
          ,
          <year>2019</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Cong</surname>
            <given-names>T.</given-names>
          </string-name>
          <string-name>
            <surname>Nguyen</surname>
            , Dinh Thai Hoang,
            <given-names>Diep N.</given-names>
          </string-name>
          <string-name>
            <surname>Nguyen</surname>
            , Dusit Niyato, Huynh Tuong Nguyen, and
            <given-names>Eryk</given-names>
          </string-name>
          <string-name>
            <surname>Dutkiewicz</surname>
          </string-name>
          .
          <article-title>Proof-of-stake consensus mechanisms for future blockchain networks: fundamentals, applications and opportunities</article-title>
          .
          <source>IEEE Access</source>
          ,
          <volume>7</volume>
          :
          <fpage>85727</fpage>
          {
          <fpage>85745</fpage>
          ,
          <year>2019</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>Ouri</given-names>
            <surname>Poupko</surname>
          </string-name>
          , Ehud Shapiro,
          <string-name>
            <given-names>and Nimrod</given-names>
            <surname>Talmon</surname>
          </string-name>
          .
          <article-title>Fault-tolerant distributed implementation of digital social contracts</article-title>
          .
          <source>arXiv preprint arXiv:2006.01029</source>
          ,
          <year>2020</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Pierre-Joseph Proudhon</surname>
          </string-name>
          and John Beverley Robinson.
          <article-title>General idea of the revolution in the nineteenth century</article-title>
          .
          <source>Courier Corporation</source>
          ,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <given-names>John</given-names>
            <surname>Rawls</surname>
          </string-name>
          .
          <article-title>A theory of justice</article-title>
          . Harvard university press,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Wessel</surname>
            <given-names>Reijers</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fiachra O'Brolchain</surname>
            , and
            <given-names>Paul Haynes.</given-names>
          </string-name>
          <article-title>Governance in blockchain technologies &amp; social contract theories</article-title>
          .
          <source>Ledger</source>
          ,
          <volume>1</volume>
          :
          <fpage>134</fpage>
          {
          <fpage>151</fpage>
          ,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <given-names>Patrick</given-names>
            <surname>Riley</surname>
          </string-name>
          .
          <article-title>Will and political legitimacy: A critical exposition of social contract theory in Hobbes</article-title>
          , Locke, Rousseau, Kant, and
          <string-name>
            <surname>Hegel</surname>
          </string-name>
          . Harvard University Press,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Jean-Jacques Rousseau</surname>
            and
            <given-names>Gita</given-names>
          </string-name>
          <string-name>
            <surname>May</surname>
          </string-name>
          .
          <article-title>The social contract: And, the rst and second discourses</article-title>
          . Yale University Press,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Gal</surname>
            <given-names>Shahaf</given-names>
          </string-name>
          , Ehud Shapiro,
          <string-name>
            <given-names>and Nimrod</given-names>
            <surname>Talmon</surname>
          </string-name>
          .
          <article-title>Foundation for genuine global identities</article-title>
          .
          <source>arXiv preprint arXiv:1904.09630</source>
          ,
          <year>2019</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>Gal</surname>
            <given-names>Shahaf</given-names>
          </string-name>
          , Ehud Shapiro,
          <string-name>
            <given-names>and Nimrod</given-names>
            <surname>Talmon</surname>
          </string-name>
          .
          <article-title>Egalitarian and just digital currency networks</article-title>
          .
          <source>arXiv preprint arXiv:2005.14631</source>
          ,
          <year>2020</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <given-names>Melanie</given-names>
            <surname>Swan</surname>
          </string-name>
          . Blockchain:
          <article-title>Blueprint for a new economy.</article-title>
          <string-name>
            <surname>O'Reilly Media</surname>
          </string-name>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <surname>Philippe Van</surname>
            Parijs and
            <given-names>Yannick</given-names>
          </string-name>
          <string-name>
            <surname>Vanderborght</surname>
          </string-name>
          .
          <article-title>Basic income: A radical proposal for a free society and a sane economy</article-title>
          . Harvard University Press,
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          19.
          <string-name>
            <given-names>Shoshana</given-names>
            <surname>Zubo</surname>
          </string-name>
          .
          <source>Surveillance capitalism. Esprit</source>
          ,
          <volume>5</volume>
          :
          <fpage>63</fpage>
          {
          <fpage>77</fpage>
          ,
          <year>2019</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          20.
          <string-name>
            <given-names>Mark</given-names>
            <surname>Zuckerberg</surname>
          </string-name>
          .
          <source>Building global community</source>
          ,
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>