# SPIN: A Blockchain-Based Framework for Sharing COVID-19 Pandemic Information across Nations
## 2 Design
### Issuance of COVID-19 Certificates and Public Information  
Entities that issue COVID-19 certificates and public information, such as hospitals and clinics, are represented as clients in SPIN. A client signs and issues a transaction to its corresponding peer, representing its country. A transaction manipulates data that are represented as key-value pairs. For instance, the key \"SA-VAC-COUNT\" refers to the count of vaccinated people in Saudi Arabia, and the key \"SA-PASS-P012345\" refers to the COVID-19 certificate for an individual with passport number P012345 in Saudi Arabia.  
The corresponding peer checks the transaction, which includes verifying the client's signature and ensuring that it is authorized to perform the proposed transaction. If these checks pass, the corresponding peer signs the transaction, executes it, and broadcasts it to all peers. Each peer in the network verifies the signature of the issuing peer, appends the block of the transaction to its blockchain replica, and updates its database state.  
Transactions containing public data, such as the number of vaccinated people, are executed, as described above. Transactions that contain private data, namely private transactions, are sent to their target peers (see Section 2.2 for details). Private transactions are utilized to send travelers' COVID-19 certificates between countries, as follows. First, a traveler communicates with a local client to issue a travel request, sending her COVID-19 certificate C and fingerprint template fp to a set of countries (destination peers). The communication mechanism between individuals and local clients is out of scope and left to be implemented by each country, as desired. For instance, health authorities may provide a mobile application for individuals to book COVID-19 vaccine/test and issue travel requests. Next, the client issues and signs a transaction, containing the COVID-19 certificate along with the individual's cancelable fingerprint template T(fp), to its corresponding peer (source peer). The client may capture the individual's fingerprint in various ways. One way to do so is by capturing the fingerprint physically when an individual takes the vaccine or test, then stores its cancelable template. Alternatively, the National Information System, containing residents' fingerprints, may provide a mechanism, such as an API call, allowing clients to permit sending the cancelable fingerprint template without capturing it [35; 36].  
The source peer verifies the transaction, as described with public transactions, signs it, and sends it to the destination peers only. Additionally, the source peer executes the transaction publicly containing a hash of the private data collection to be written on the blockchain, as evidence for the transaction. In this design, the source peer sends the private data immediately to the destination peers, based on travelers' requests. If a traveler cancels her trip for any reason, the private data are still accessible by destination peers. One solution to mitigate this issue is to allow clients to schedule the execution of the transactions, based on travelers' requests, rather than executing it immediately. This solution allows travels to terminate the scheduled transaction, in case their trips are canceled for any reason.