Smart Contract Broker: Improving Smart Contract Reusability in a Blockchain Environment
Abstract
:1. Introduction
2. Related Work
2.1. Permissioned Blockchain—Hyperledger Fabric
2.2. Smart Contract
2.3. Discussion
3. Smart Contract Broker
3.1. Smart Contract Broker Architecture
3.2. Smart Contract Management
3.3. API for Smart Contract Management
4. Case Study and Evaluation
4.1. Case Study
4.2. Evaluation
5. Practical Implication
- Tag-based management: Smart contracts can be registered, searched, deployed, and executed using tags. This makes it easy to find and reuse smart contracts that are relevant to a particular application.
- Asset structure comparison: The smart contract broker can compare the asset structures of similar smart contracts. This can be used to identify similarities and differences between smart contracts and to reuse parts of existing smart contracts to create new smart contracts.
- REST API: The smart contract broker can be accessed using a REST API. This makes it easy to integrate the smart contract broker with other applications and services.
6. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Rajasekaran, A.; Azees, M.; Al-Turjman, F. A comprehensive survey on blockchain technology. Sustain. Energy Technol. Assess. 2022, 52, 102039. [Google Scholar] [CrossRef]
- Go. Available online: https://go.dev/ (accessed on 1 May 2023).
- Python. Available online: https://www.python.org/ (accessed on 1 May 2023).
- Kumar, R.; Kumar, P.; Tripathi, R.; Gupta, G.; Islam, A.; Shorfuzzaman, M. Permissioned Blockchain and Deep Learning for Secure and Efficient Data Sharing in Industrial Healthcare Systems. IEEE Trans. Ind. Inform. 2022, 18, 8065–8073. [Google Scholar] [CrossRef]
- Hyperledger Fabric. Available online: https://www.hyperledger.org/use/fabric (accessed on 1 May 2023).
- Lin, S.; Li, J.; Ji, L.; Sun, Y. A survey of application research based on blockchain smart contract. Wirel. Netw. 2022, 28, 635–690. [Google Scholar] [CrossRef]
- Sharma, P.; Jindal, R.; Borah, M.D. A review of smart contract-based platforms, applications, and challenges. Clust. Comput. 2023, 26, 395–421. [Google Scholar] [CrossRef]
- Almasoud, A.; Hussain, F.; Hussain, O. Smart contracts for blockchain-based reputation systems: A systematic literature review. J. Netw. Comput. Appl. 2020, 170, 102814. [Google Scholar] [CrossRef]
- Tang, H.; Jiao, Y.; Huang, B.; Lin, C.; Goyal, S.; Wang, B. Learning to Classify Blockchain Peers According to Their Behavior Sequences. IEEE Access 2018, 6, 71208–71215. [Google Scholar] [CrossRef]
- Elghaish, F.; Rahimian, F.; Hosseini, M.; Edwards, D.; Shelbourn, M. Financial management of construction projects: Hyperledger fabric and chaincode solutions. Autom. Constr. 2022, 137, 104185. [Google Scholar] [CrossRef]
- Hyperledger Composer. Available online: https://github.com/hyperledger/composer/blob/main/README.md (accessed on 1 May 2023).
- Node.js. Available online: https://nodejs.org/en (accessed on 2 May 2023).
- Dixit, A.; Deval, V.; Dwivedi, V.; Norta, A.; Draheim, D. Towards user-centered and legally relevant smart-contract development: A systematic literature review. J. Ind. Inf. Integr. 2022, 26, 100314. [Google Scholar] [CrossRef]
- Wu, C.; Xiong, J.; Xiong, H.; Zhao, Y.; Yi, W. A Review on Recent Progress of Smart Contract in Blockchain. IEEE Access 2022, 10, 50839–50863. [Google Scholar] [CrossRef]
- Dolgui, A.; Ivanov, D.; Potryasaev, S.; Sokolov, B.; Ivanova, M.; Werner, F. Blockchain-oriented dynamic modelling of smart contract design and execution in the supply chain. Int. J. Prod. Res. 2020, 58, 2184–2199. [Google Scholar] [CrossRef]
- Wang, S.; Ouyang, L.; Yuan, Y.; Ni, X.; Han, X.; Wang, F. Blockchain-Enabled Smart Contracts: Architecture, Applications, and Future Trends. IEEE Trans. Syst. Man Cybern. Syst. 2019, 49, 2266–2277. [Google Scholar] [CrossRef]
- Zou, W.; Lo, D.; Kochhar, P.; Le, X.; Xia, X.; Feng, Y.; Chen, Z.; Xu, B. Smart Contract Development: Challenges and Opportunities. IEEE Trans. Softw. Eng. 2021, 47, 2084–2106. [Google Scholar] [CrossRef]
- Khan, S.N.; Loukil, F.; Guegan, C.G.; Benkhelifa, E.; Hani, A.B. Blockchain smart contracts: Applications, challenges, and future trends. Peer-to-Peer Netw. Appl. 2021, 14, 2901–2925. [Google Scholar] [CrossRef] [PubMed]
- Singh, A.; Parizi, R.M.; Zhang, Q.; Choo, K.R.; Dehghantanha, A. Blockchain smart contracts formalization: Approaches and challenges to address vulnerabilities. Comput. Secur. 2020, 88, 101654. [Google Scholar] [CrossRef]
- Ante, L. Smart Contracts on the Blockchain—A Bibliometric Analysis and Review. Telemat. Inform. 2021, 57, 101519. [Google Scholar] [CrossRef]
- REST API. Available online: https://www.redhat.com/en/topics/api/what-is-a-rest-api (accessed on 4 May 2023).
- Arcuri, A. RESTful API Automated Test Case Generation with EvoMaster. ACM Trans. Softw. Eng. Methodol. 2019, 28, 1–37. [Google Scholar] [CrossRef]
- JSON. Available online: https://www.json.org/json-en.html (accessed on 4 May 2023).
- Park, D.; Song, H.; Eom, J.; Jeong, S.; Park, J.; Yeom, K. A Smart Contract Management System to Optimize Transactions in a Permissioned Blockchain. KIISE Trans. Comput. Pract. 2022, 28, 360–365. (In Korean) [Google Scholar] [CrossRef]
- Attaran, M. Digital technology enablers and their implications for supply chain management. Supply Chain. Forum Int. J. 2020, 21, 158–172. [Google Scholar] [CrossRef]
- Jmeter. Available online: https://jmeter.apache.org/ (accessed on 4 May 2023).
Study | Main Objective | Issues | Future Trends |
---|---|---|---|
Khan et al. [18] | Smart contract optimization, blockchain environment modeling, smart contract resources etc. | Resource immutability, system scalability etc. | Layer2 protocol (network issue), contract management |
Singh et al. [19] | Smart contract formalization, smart contract vulnerabilities | Formal testing, domain-specific languages | Formal verification of smart contract |
Wang et al. [16] | Blockchain architecture, smart contract relationship | Smart contract management etc. | Formal verification of smart contract |
Ante et al. [20] | Classification of technical elements of blockchain smart contract system | Smart contract standardization, verification etc. | Layer2 protocol (network issue), definition of smart contract, infrastructure |
Operation | Execution Cost | Weight | |
---|---|---|---|
Code length (N lines = Cost 1) | 1 | 1 | |
Control statement | if-else | 1 | 2 |
for | |||
while | |||
switch | |||
Data processing statement | stub.GetState | 1 | 3 |
Existing Module | Implemented API | ||
---|---|---|---|
Module Name | Description | Method | Feature |
Lifecycle | Perform chaincode operations and manage admin status | GET /fabric/lifecycle/commit | Query the committed chaincode definitions |
Peer | Manage CLI and peer versions | GET /fabric/peer | Get the current peer binary version |
Network | Manage blockchain network status | POST /fabric/network/up | Start Fabric network with existing settings |
Chaincode | Operate chaincode | POST /fabric/chaincode/query | Get endorsed result of chaincode function call and print it |
Repository | Manage external modules | GET /fabric/repository/pull | Pull changes from SCM |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Park, J.; Jeong, S.; Yeom, K. Smart Contract Broker: Improving Smart Contract Reusability in a Blockchain Environment. Sensors 2023, 23, 6149. https://doi.org/10.3390/s23136149
Park J, Jeong S, Yeom K. Smart Contract Broker: Improving Smart Contract Reusability in a Blockchain Environment. Sensors. 2023; 23(13):6149. https://doi.org/10.3390/s23136149
Chicago/Turabian StylePark, Joonseok, Sumin Jeong, and Keunhyuk Yeom. 2023. "Smart Contract Broker: Improving Smart Contract Reusability in a Blockchain Environment" Sensors 23, no. 13: 6149. https://doi.org/10.3390/s23136149
APA StylePark, J., Jeong, S., & Yeom, K. (2023). Smart Contract Broker: Improving Smart Contract Reusability in a Blockchain Environment. Sensors, 23(13), 6149. https://doi.org/10.3390/s23136149