# A Blockchain-Based Protocol for Fair Delivery for Receips
## 10 Conclusions  
In this paper, we propose a secure and fair protocol based on blockchain for delivering a digital document in exchange for a receipt between a sender and a recipient. This generic scenario arises in many contemporary use cases, such as certified electronic mail, certified notifications, and registered e-delivery. This scenario requires delivering a document to the recipient with confidentiality (only the sender and the final recipient can know its contents) while ensuring fairness, preventing either participant from misbehaving during the delivery process.  
By reviewing the literature on this topic and focusing on solutions that utilize blockchain technology, we find that no solution meets all the necessary requirements. Specifically, existing solutions fail to provide either confidentiality or fairness; this is sometimes caused by issues with deadline expiration. Moreover, some methods rely on centralized entities that can be effectively considered trusted third parties (TTPs), which may lead to potential bottlenecks or security breaches.  
To address these issues, we present a secure and fair blockchain-based solution that meets all security and privacy requirements and protects both participants from misbehavior, as discussed in the security analysis. To demonstrate the technical and economic viability of our solution, we first define and detail the smart contract specifications for EVM-based blockchains. On the basis of this comprehensive smart contract specification, we provide a proof-of-concept (PoC) implementation and a protocol execution example  
Figure 10: Estimated higher cost for minimum delay (measured in USD) in 2024 (from January 2024 to July 2024).  
to show how our solution works in a real blockchain network, thereby demonstrating its technical feasibility.  
Finally, according to the exhaustive cost assessment, we assert that our protocol is economically viable when public blockchains are used and offers better performance at significantly lower costs than previous solutions do. In fact, our solution not only significantly reduces the costs associated with the deployment and execution of smart contracts for document delivery but also offers a scalable and efficient solution for EVM-based blockchain environments. By not relying on a TTP or any centralized entity, it provides greater transparency and security, better aligning with the decentralization principles of blockchain technology.  
Future work will focus on extending this solution to multiparty scenarios in which multiple recipients must receive the same document.  
Conceptualization: J.-L.F.-G., M.F.H. and A.-P.I.-D.; methodology: J.-L.F.-G., M.F.H. and A.-P.I.-D.; software: M.F.H. and G.-F.-C.-A.; validation: J.-L.F.-G., M.F.H., A.-P.I.-D. and G.-F.C.-A.; investigation: [PERSON]-[PERSON]-[PERSON], M.F.H. and [PERSON]-P.I.-D.; data curation: [PERSON]; writing--original draft preparation: [PERSON]-L.F.-[PERSON], M.F.H. and [PERSON]-P.I.-D.; writing--review and editing: [PERSON]-L.F.-[PERSON], M.F.H. and [PERSON]-P.I.-D.; visualization: [PERSON] and G.-F.C.-A.; supervision: [PERSON]-[PERSON]-[PERSON] and [PERSON]; and project administration: [PERSON]-L.F.-[PERSON] and [PERSON]; All authors have read and agreed to the published version of the manuscript.  
This research was conducted as part of the BLOBSEC project (Grant PID2021-1223940B-I00, funded by MICIU/AEI/10.13039/501100011033 and by \"ERDF/EU\").  
All relevant data and materials, including the source codes, are fully available within the article. There are no additional datasets or materials beyond those detailed and referenced in the text of the manuscript.  
The authors have no competing interests to declare that are relevant to the content of this article.