# Exploiting Blockchain Technology for Enhancing Digital Twins' Security and Transparency
## 2 Related Works
### Smart Contracts  
Another prominent issue concerning blockchain technologies regards the lack of a programmable way of interacting with it. This lack of classical distributed ledgers coupled with the impossibility of modifying written transactions could lead to a loss of data integrity and, in the worst-case scenario, data loss. The academic discourse in this area predominantly highlights the transformative potential of smart contracts in automating blockchain operations, thereby reducing or entirely eliminating the need for third-party intermediaries in transactions. The deployment of smart contracts within blockchain systems not only streamlines these processes but also significantly enhances transparency and facilitates the debugging of complex workflows, particularly in industrial environments [19; 20]. Furthermore, the introduction of the auxiliary use of smart contract could also address the problem related to the blockchain unsuitability for data storage by introducing accessible data structures designed for this task. This prominent characteristic of smart contracts of storing a small quantity of data under the data structure's element could eliminate the need for off-chain storage solutions and integrate them into the digital twin blockchain system [21]. On the other hand, this kind of reasoning is only possible by considering the small quantity of data usually employed for controlling capabilities. In fact, since smart contracts and their data are stored on the blockchain itself, the transfer of related information is deemed to be at a slower speed compared to an off-chain solution. Also, in this case, the adopted data storage solution is tied to a trade-off problem, the speed of the off-chain solution or the trustworthiness of its on-chain counterpart. In the context of integrating smart-contract technology with digital twin systems, several studies have suggested leveraging ERC721 and ERC20 standards to maximize the benefits of these systems [22]. By developing scripts on blockchain platforms that support smart contracts, it is possible to standardize procedures and improve their auditability and security characteristics. This standardization is particularly relevant for enhancing the interoperability of smart contracts and ensuring secure data exchange across various nodes in the network. The ERC721 standard enables, in the digital twin context, the unique identification and traceability of individual twin instances. For instance, in industrial applications, each digital twin can be represented by an NFT, encapsulating key parameters of its physical counterpart. This approach guarantees tamper-proof tracking of system changes, enhancing accountability and reducing risks of data manipulation in shared environments. These tokens, being distinct and non-interchangeable, provide a reliable means to track and manage assets, thus preserving the integrity of the information associated with them. Despite the described advantages, the implementation of a blockchain-based representation for digital twins also introduces certain challenges. One key concern is the potential for increased complexity and abstraction in an already complex system. The additional layer of blockchain could potentially complicate the digital twin infrastructure, making it more challenging to manage and operate. Moreover, while the immutability of smart contracts is often regarded as a benefit for ensuring data integrity, it also introduces significant limitations. Once deployed, smart contracts cannot be altered, which reduces their flexibility and hinders the ability to make iterative improvements. In response to these challenges, standards such as EIP-1967 [23] and EIP-2535 [24] have emerged as key advancements in smart-contract engineering [25]. For example, EIP-1967 formalizes a method for proxy storage slot allocation, enabling proxy contracts to delegate function calls to an implementation contract while securely referencing its address within a fixed storage slot.