# A Blockchain-Based Protocol for Fair Delivery for Receips
## 9 Cost Assessment
### Cost in Fiat  
The cost, measured in gas units, offers valuable insights into the complexity of operations and allows for the comparison of different solutions deployed on an EVM-based blockchain (as explained in Section 9.1) since this metric remains unaffected by the price volatility of the related cryptocurrency. However, the economic costs of calling the _accept_ and _publish_ functions can fluctuate daily because of changes in the cryptocurrency's price. Consequently, the final cost of executing a function is determined by multiplying the number of gas units required by the gas price. The gas price is the amount of Wei (Wei refers to the smallest denomination of the cryptocurrency used in the EVM-based blockchain. A unit of the currency used in the blockchain corresponds to \(10^{18}\) Wei) that a user is willing to pay for each gas unit.  
Ethereum offers a robust and established platform for the execution of smart contracts, making it a preferred choice. However, the price of its cryptocurrency is higher than that of other solutions. It would be beneficial to evaluate the cost of our solution by comparing Ethereum with other blockchains. Among other EVM-based blockchains, Polygon is specifically designed to improve the scalability of Ethereum, thereby reducing the costs associated with executing smart contracts. In addition, Polygon is a popular layer-2 blockchain (\"A layer-2 solution builds on layer 1 and relies on it to finalize its transactions.\" Source: [[https://academy.binance.com](https://academy.binance.com)]([https://academy.binance.com](https://academy.binance.com)), accessed on 1 November 2024) that has the highest number of deployed smart contracts, namely approximately 160 million (number of deployed smart contracts from 1 January 2023; source: [[https://dune.com/queries/](https://dune.com/queries/)]([https://dune.com/queries/](https://dune.com/queries/)), accessed on 1 November 2024). Therefore, to determine the cost over time of using a public EVM-based blockchain for our proposed fair delivery receipt method, we analyze the potential cost reduction associated with the use of Polygon in front of Ethereum.  
To determine the total cost in fiat currency, we collected the daily average price per unit of gas (measured in Wei) and the daily exchange rate between the cryptocurrency used by the blockchain (MATIC for Polygon and ETH for Ethereum) and the US dollar (utilizing the dataset provided in [31; 32]). The final cost of executing our solution was computed by multiplying the gas units (calculated in Section 9.1) by the daily average gas price.  
Figure 9 shows the average cost of our solution in 2024 (1 January to 16 July). Similar to the gas evaluation case, we considered two scenarios: first and next delivery. As shown in the figure, our proposal has a cost of less than USD 0.23 for the first delivery and less than USD 0.045 for subsequent deliveries in Polygon, whereas for Ethereum, these values  
Figure 8: Gas cost of our solution compared with those of EVM-based solutions without a TTP.  
increase to approximately USD 183 and USD 46. Table 6 summarizes the statistics of the cost metrics. For example, when the contract is deployed (first delivery), our solution has an average cost of USD 0.053 in Polygon (USD 41 in Ethereum). For subsequent deliveries, the average cost drops to USD 0.011 in Polygon (USD 10 in Ethereum). Considering the minimum values, the cost in Ethereum is reduced to approximately USD 1.4, but it also reaches a maximum of USD 46, which is a price that can be considered very high, especially since there are alternatives that allow its cost to be reduced; therefore, if our solution is deployed on Polygon, its cost can be reduced by 99% compared to its cost on Ethereum.