# Confidential Smart Contracts and Blockchain to Implement a Watermarking Protocol
## 2 Limitations of Smart Contracts and Blockchains  
Smart contracts are increasingly used today in developing so-called decentralized applications (dApps) in finance, insurance, industry, and IoT, according to the \"Blockchain 3.0\"model [8]. They can contain Turing-complete code automatically executed on blockchains when pre-set conditions occur (see Figure 1). They are particularly useful for implementing protocols between distrusting parties since blockchains guarantee code immutability and integrity of execution through the consensus mechanism. However, the strengths of smart contracts bring several limitations in the implementation of watermarking protocols.  
The first concerns the poor performance that generally characterizes a blockchain. A blockchain uses the consensus technique to establish the validity of the transactions registered in its public ledger. Such a peculiarity allows, on the one hand, the avoidance of using TTPs in watermarking protocols; on the other hand, it requires that the \"miners\" participating in the blockchain replicate entirely and independently the execution of smart contracts to reach consensus and validate individual transactions. Consequently, standard blockchains, such as Ethereum, can only guarantee a low number of validated transactions per unit of time (throughput), thus severely limiting their use in watermarking protocol implementation. Such protocols are called upon to generate protected and personalized copies of the contents distributed on the network at the time of their purchase [3]. This means that a low throughput of the blockchain translates into poor performance of the watermarking protocol, with consequent damage to content providers [11; 12; 14; 15].  
The second limitation concerns the lack of confidentiality in executing smart contracts. In fact, both the variables and the code of the contracts, as well as the related input/output and state information, are accessible to the processing nodes that execute the contracts. Such a condition makes it almost impossible to use smart contracts in the case of watermarking protocols, where data privacy is required, or it is necessary to implement applications in which the code and transaction data, if public, can be exposed to attacks from malicious users. This condition is quite realistic, especially in the case of public blockchains in which the participating nodes may not be trusted [13; 16; 17; 19].  
The third limitation concerns the impossibility of smart contracts to execute complex computations due to the need to keep the cost associated with executing the related code low. This limitation is made necessary by the economic model of execution of blockchains, which provides an incentive for nodes to execute a smart contract. The incentive represents a maximum cost of execution and is expressed in terms of a maximum number of \"gas\" units, for example, in the case of the Ethereum blockchain, multiplied by the current unit cost of each gas unit. Consequently, executing smart contracts that include complex cryptographic primitives, as frequently happens in the case of watermarking protocols, becomes expensive or not convenient for miners in the case of inadequate compensation [11; 12; 14; 15; 20].  
Figure 1: Smart contract execution.