---
# System prepended metadata

title: Responding to the global Covid-19 pandemic

---

# Responding to the global Covid-19 pandemic

memo on 14 April 2020

## Outline
The Covid-19 pandemic has highlighted the need for and raised concerns around privacy of contact tracing applications. Contact tracing in combination with an adequate testing program is a valuable tool to contain the spread of any infectious disease, covid-19 acutely so.

Epidemics and explicitly pandemics pose a global coordination problem, and require a global coordination network to address them. Following from the Singaporian government's Bluetooth tracking app, European researchers further proposed a protocol to improve privacy and decentralisation across many centralised servers of a bluetooth-based tracking protocol.(DP-3T [1])

The epidemics and the fight against them have across the centuries altered the course of social and political history. In particular the creation of public health systems (and governments to support them) grew out of the people's acceptance of disease control (and scientific knowledge to do so) as a public responsibility. (Needs citation [2]).
However, today our world is more global and more epidemics risk evolving into pandemics. ([3]) Yet our world lacks global leadership or government. We do however, have strong advances in cryptography and a global network to coordinate on.

These observations encourage us to push for a global, open network where each person has self-sovereign control over their personal, private sphere data

# DRAFT NOTES
## Technical Architecture
* Introducing **MosaicOS:** An operating system for self-soverign apps
* In the Covid-19 paradigm, Mosaic shifts focus:
    * Before: OpenST/Ost.com & Eth Developers
    * Now: MosaicOS adds additional layers to the stack and addresses app developers (first react.js)
* As a user, 
    * All my data and computation happens on the edge
    * Multiple devices work in concert to compute on my behalf. On any device, I can pull my relevant apps and their data and work offline
    * I can contribute to and pull from public computations to build collective knowledge

### MosaicOS

| Component | Description | 
| ----- | ----- |
| Apps | E.g. Covid-19, Validator, Wallet, contacts, a.o.
| Users | Private data on IPFS. Self-sovereign. |
| Public State | Solve collective problems on network |
| P2P | BFT consensus on public state + IPFS storage structured per App |

\+ token economics & mixers to connect to anonymous avatars to interact publically 

### Formulating The Problem
1. The Markers Mi are already anonymised, given R is unknown to non-locals
2. However, the graph of interactions still contains valuable information and
3. People should be able to publish markers with rotating, disposable, anonymous "avatars"

We'll address 2) and 3) but first, let's formulate the problem. 
* As user|x with a set of markers Mj given others users which together form the interaction graph over a period of time, when later an overlay dataset of possible positive test results for an asymptomatic infectious disease is published
a) What is the absolute count of n-th order interactions for each Mj?
b) Given a) what is the likelihood for user|x to have contracted the disease?


### Construction Of Solution

#### Part 1 - 

1. For every new market M, Y registers, Y can extend time ordered trie with the new leaf M. Y can publish the new root of the trie in a contract on-chain.

    We slice time into periods, say 24 hrs, and tries only represent markers registered during that period. This is enforced by allowing updates to Ro during each period, afterwards it is read-only. At the start of a new time Y can repeat the last markers for continuation (optional)
    
2. Secondly, we need overlay data about self-reported or diagnosed positive test cases. Using a separate overlay contract allows for differently profiled data sets to emerge. To elaborate, we will start with a self reporting contract where Y can register having likely been (tested) positive during preceding days. A self reporting contract can clearly contain a lot of noise.

    To improve on this, medical organisations in different regions can create their own overlay data sets where only cases diagnosed by registered doctors. Comparison between different overlay contracts will construct confidence levels overtime.
    
3. To address the scalability of the problem where for every marker we want to know the number of n-th order incidences given an overlay of O-th order positive markers, we can subdivide the computation.

    The original computation (under an "meanfield" assumption) scales as O(X-M-P) where
    
        X = number of people
        M = number of markers
        P = number of positive markers at n-th degree
    
    It is to be expected that P grows exponentially for a largely complete and naturally formed (connected) interaction graph.
    
    Explicity, the value of this contact tracing app would be to be sensitive to small initial pockets Po infection, such that with targeted testing on higher order Pn, the infection can be stopped, contained, and eradicated. 
    
    For larger infection spread Po, higher order Pn can rapidly approach a fraction of X-M and aymptomatically O(X-M). Therefore to address aymptomatic quadratic scaling, we can shard the space of markers (which are uniformally distributed) into n equally sized parts. 
    
6. For each bucket, given O'th order positive markets (taken from an overlay) by entities, ... 


        [Fill in the gaps]

#### Anonymising Public Statements
To publish updates to the root of the merkle tree, user|x needs to pay transaction fees to a transaction relayer. 
* Rather than directly publishing from a stable id contract, user|x can fund an ephemeral address managed by an avatars proxy contract (w a time expiry)
* User|x can fund their avatar over (one or multiple) mixer contracts
* Potential future rewards earned by their avatar can similarly be brought back to user|x
* In the above contruction, replace user|x by an ephemeral, anonymised avatar.

Additionally, by using avatars, the avatars and their associated public attestations can be purged from the consensus state and IPFS after an expiration time. Users should keep minimal funds in avatars; dust/remaining funds can be burnt or donated to preset organisations.

#### Notes On Contruction Model
* Bucket calculations are deterministic and can be done first by simple consensus on replicated / redundant independent computation
* It seems within reach that a bucket calculation is simple enough to be replaced by an argument of knowledge (later research)
* There is a data availability problem for the sections published on IPFS to be readable by all nodes. However, the problem is one of completeness and the interacion graph is de-factor an incomplete representation of the real-world events. 
    * A user failing to publish sections can be ignored (check). 
    * The case where some nodes miss sections can be treated tolerantly
    * The interaction graph is static once the time slot continues so nodes can first assert on (a subset of nodes) who have all the sections.


## References

(1) Decentralized Privacy-Preserving Proximity Tracing [DP-3T][1]
(2) Needs citation
(3) [Wikipedia List of epidemics][3]

[1]: https://github.com/DP-3T
[3]: https://en.wikipedia.org/wiki/List_of_epidemics