## 3 The Architecture of SLA based Sharing Economy Service
### Blockchain Network of the Proposed Sharing Economy Service  
As shown in Figure 4, the blockchain network proposed in this paper is built on a permissioned network that only allows access from authorized users. This solution avoids the risk of data exposure since the transaction history that records how a resource is manipulated are invisible to unauthorized users. In a permissioned blockchain network, only authorized users can operate on the blockchain, and a valid block must contain a signature from a subset of users. As a result, no invalid node could modify or insert a transaction in the blockchain. Moreover, the approved smart contract cannot be altered unless it gets signed by the agreement from all users featured on the operation. The blockchain network provides various blockchain features including identity authentication, verification, and P2P communication. Peers are the fundamental entity of the blockchain network since they maintain the ledger and provide the running environment for the smart contracts. The orderer peer provides transaction ordering that packages the transaction in sequence and creates blocks of transactions. The distributed ledger is consensually shared and synchronized across the blockchain network, in which each peer of the network can have their identical copy of it. The practical byzantine fault tolerance (PBFT) algorithm provides a mechanism for peers to correctly reach a consensus despite malicious peers in sending out incorrect information. The smart contract is installed and instantiated onto all peers and runs as a decentralized application to manage access and modifications in the ledger. The event hub generates events to the client whenever a new block is added to the ledger, or the transaction triggers the predefined condition in the smart contract. The API interface exposes the services provided by the blockchain network as open API schemes by which the client application can interact with the smart contract. This work utilizes the asymmetric cryptography, including a key pair to encrypt and decrypt data, as shown in Figure 5. The public key is often provided by a trusted, designated authority and used to encrypt data. The other key in the pair is the private key that is kept secret and is mathematically linked to the public key. In an asymmetric cryptography, either of the keys can be used to encrypt a message, but whatever is encrypted can only be decrypted by its relevant opposite key. A trusted authority called the public key institution (PKI) [42] is required to make users and systems aware of that a public key is authentic and it has not been tampered with by a malicious third party. As shown in Figure 6, the PKI architecture in our system consists of certificate authorities (CA) and the certificate database. CA is a trusted party, which provides the root of trust for all PKI certificates and provides services to authenticate, issue, and revoke the identity of individuals. Each CA maintains its own root CA, for use only by the CA. The CA that is certified by a root CA is authorized to issue certificates for specific uses allowed by the root. The certificate database stores informationabout issued certificates and the validity period and status of each PKI as well. Among various standards of PKI, this work utilizes the Internet X.509 Public Key Infrastructure Certificate Policy and Certification Practices Framework (RFC 5280) [43]. The X.509 certificates are widely used in many Internet protocols, for example, the TLS or SSL, and are also used in offline applications like electronic signatures. Although a blockchain network can perform transactions without the involvement of a third-party, it still depends on the PKI architecture to ensure secure communication between various network participants, and to ensure that messages posted on the blockchain are correctly authenticated. Figure 4: Blockchain network for the proposed sharing economy service. Figure 5: Asymmetric key encryption for the data encryption and decryption.