# Policy-Based Smart Contracts Management for IoT Privacy Preservation
## 5 Discussion and Conclusions  
In recent years, the use of blockchain technology has received an increased deployment within an IoT ecosystem to preserve users' privacy. Most of the existing approaches add a new cryptography layer and an access control system to protect their private data. Some approaches focus on the control of IoT devices' permissions for data use. Smart contracts are also used to determine the interaction between IoT devices and blockchain networks. However, in these approaches, adding cryptographic and access control measures adds no value and is not essential, since existing blockchain implementations such as Ethereum and Hyperledger Fabric already provide cryptographic and access control techniques to preserve users' privacy. We only need a kind of guideline to assist users in expressing their preferences and selecting the appropriate settings. In this context, we proposed a policy-based smart contract management approach that interacts with a private blockchain network. More specifically, we proposed using the Hyperledger Fabric platform to easily and quickly manage the user's IoT devices and interact with the blockchain to benefit from external services. Our proposed model defines several smart contract types agreed upon by the user and blockchain network provider. The user only has to set their preferences and, automatically, the smart contract is triggered  
Figure 8: Transaction time of Hyperledger Fabric 2.0 for one organization [54]. Figure 9: Impact of the block size and transaction arrival rate on performance (increased smart contract execution) [55]. according to the user's IoT devices' received data. Five smart contract types and the policies required to trigger them are discussed. Then, the model reuses the Hyperledger Fabric to maintain user privacy during the interaction with the blockchain network. Thus, we simplify the adoption of the model by the user and the service provider, such as a hospital that monitors the health of its patients based on the data received from the patients' sensors. Our approach can be easily deployed, since it uses an open source free private blockchain network without PoW consensus and secure since it uses an asymmetric cryptographic system and digital signature to encrypt user data and ensure their integrity. Furthermore, the performance of the Hyperledger Fabric network is the same as depicted in its benchmarking ([[https://nklincoln.github.io/caliper-benchmarks/](https://nklincoln.github.io/caliper-benchmarks/)]([https://nklincoln.github.io/caliper-benchmarks/](https://nklincoln.github.io/caliper-benchmarks/)) (accessed on 28 September 2024 )), since we did not change or add any new layer within its original code. So, the same performance is maintained by our proposed model, which is designed specifically for registered clients rather than the public, allowing us to control the required infrastructure dynamically according to the needs of registered users. Additionally, we did not add a new cryptographic layer beyond what is already included with Hyperledger Fabric, which may reduce processing time and enhance scalability. Compared to existing research, our model is distinctive in its focus on assisting users in defining their smart contracts using flexible policies, rather than implementing a new cryptographic layer, as many previous studies have done. For example, the authors of [32] proposed policy-based rules to define data access policies. Similarly, in [34], the authors presented an additional cryptographic layer to encrypt user's sensitive data and define access rights called capabilities. However, our approach aims to manage smart contracts and determine which data should be shared with other nodes using the inherent blockchain cryptosystem, which keeps the computational load and energy demands lower than approaches that layer on extra encryption or rely on complex, continuous cryptographic operations.