# Internet of Things and Blockchain Integration: Security, Privacy, Technical, and Design Challenges
## 3 RQ 1 and RQ 2--Current Challenges and Recommendations to Enhance BIoT Integration
### BC-Based Technical Considerations
#### 3.3.2 Smart Contracts  
As BC-based programs, smart contracts enable the automatic storing of legally binding agreements on the BC. This feature enables a BC to go from a certain application area, such as financial transactions, to the management of a larger variety of transactions and assets [62; 108]. Smart contracts, on the other hand, are vulnerable to several attacks, including timestamp (changing the block timestamp value to the node's maximum future time limit) and transaction-ordering dependencies (when the block's timestamp is used for certain contract decisions, but timestamps may be modified by miners), reentrancy vulnera \begin{table}
\begin{tabular}{l l l} \hline \hline
**Category** & **Challenge** & **Best Practice** \\ \hline \multirow{7}{*}{\
\begin{tabular}{l} Technical \\ considerations \\ \end{tabular} } & Consensus algorithms & \(\bullet\) & Consensus algorithm built on game theory \\  & [57; 74; 76; 90] & \(\bullet\) & Consensus algorithm built on AI \\  & & \(\bullet\) & Adaptive nature consensus algorithms \\ \cline{2-3}  & Smart contracts & \(\bullet\) & Symbolic execution, theorem proving, abstract interpretation, and model \\  & [10; 11; 46; 57] & \(\bullet\) & Separate data and logic; call delegation from proxy contract to logic contract \\ \cline{2-3}  & Communication [13; 44; 76] & \(\bullet\) & Edge and fog computing (FC), side-chains, notary systems, hash locking, and standardization \\  & Communication [13; 44; 76] & \(\bullet\) & Inter-BC communication protocols \\ \cline{2-3}  & Heterogeneous devices & \(\bullet\) & Multilayer security framework \\  & [11; 76; 77] & \(\bullet\) & Standardization of resources \\ \cline{2-3}  & Bandwidth [76] & \(\bullet\) & Edge computing and FC \\ \cline{2-3}  & Cryptography & \(\bullet\) & Tradeoff between consensus mechanism used based on the application \\  & mechanisms [44; 88] & \(\bullet\) & New consensus mechanisms required \\ \hline \multirow{2}{*}{
\begin{tabular}{l} Cryptography keys \\ [4; 68; 88] \\ \end{tabular} } & \(\bullet\) & AES for low-power secure communications \\  & & \(\bullet\) & Use of ciphers such as Simon \\  & & \(\bullet\) & Further study and empirical assessments are still needed \\ \hline \hline \end{tabular}
\end{table} 
Table 8: Recommendations for reducing the negative impact of technical challenges. bility (when a function calls an untrusted contract before resolving any consequences), and Mishan (where the transaction may be reversed if the exceptions made were not correctly managed) [88]. Furthermore, contract execution by computers has various disadvantages since it exposes them to technology issues such as hackers, viruses, and communication failures [46]. In addition, smart contracts may become overburdened in situations when several data sources are necessary. Smart contracts are distributed and decentralized; however, they do not spread performing tasks to manage enormous numbers of tasks [11]. Because of the serious consequences that might emerge from smart contracts' vulnerability, academics have developed several approaches and tools to detect these flaws. To strengthen the security of smart contracts, model inspection, symbolic accomplishment, and theorem proving can be employed [10]. Theorem proving is the most common way to formalize smart contracts, which is mathematically modeled while the desired qualities to be demonstrated are expressed. Due to its appropriateness for any system that can be described mathematically, theorem proving may be regarded as an adaptable verification approach. Symbolic execution, which is a software testing approach that aids in the development of data and evidence of a program's quality, is a delicate solution in which several execution pathways are methodically evaluated at the same time, without the need for real inputs. Symbolic execution has led to significant advances in several important software dependability applications, and it is the most widely used methodology for detecting vulnerabilities in EVM bytecode.