Conference PaperPDF Available

Abstract and Figures

[This is a pre-publication version of the paper; the content is likely to change for the final publication version.] Blockchain is an emerging technology that enables new forms of decentralized software architectures, where distributed components can reach agreements on shared system states without trusting a central integration point. Blockchain provides a shared infrastructure to execute programs, called smart contracts, and to store data. Since blockchains are at an early stage, there is a lack of a systematic and holistic view on designing software systems that use blockchain. We view blockchain as part of a bigger system, which requires patterns of using blockchain in the design of the bigger systems. In this paper, we collect a list of patterns for blockchain-based applications. The pattern collection is categorized into four types, including interaction with external world patterns, data management patterns, security patterns and contract structural patterns. Some patterns are designed specifically based on real-world blockchain-based applications considering the nature of blockchain.Others are variants of existing design patterns applied in the context of blockchain-based applications and smart contracts.
Content may be subject to copyright.
A preview of the PDF is not available
... Some of these solutions have even been formalized as design patterns to ease their reuse. For instance, as smart contracts cannot query data from outside the blockchain, developers have to apply a design pattern named Oracle pattern [39]. An oracle includes two components: a smart contract capable of emitting an event when new data is required, and an off-chain service listening to these events to inject fresh data when needed. ...
... However, they can be useful to implement Role-based Access Control (i.e., in a supply chain, identify the suppliers, carriers, and buyers). Besides roles, individuals can be classified through types: they can either be human, service, or oracle (from the Oracle pattern [39]). ...
... For instance, a batch can be sent from the supplier to the carrier. Tokenization is a common blockchain-based design pattern [39], standardized for many blockchains such as the ERC721 standard for Ethereum 2 . Finally, RecordCollections allows bulk storage Blockchain-based food supply chain traceability: a case study in the dairy sector Casino et al. ...
Preprint
In recent years, blockchain has been growing rapidly from a niche technology to a promising solution for many sectors, due to its unique properties that empower the design of innovative applications. Nevertheless, the development of blockchain applications is still a challenge. Due to the technological novelty, only a few developers are familiar with blockchain technologies and smart contracts. Others might face a steep learning curve or difficulties to reuse existing code to build blockchain applications. This study proposes a novel approach to tackle these issues, through software product line engineering. To support the approach, a web platform to configure and generate a blockchain application for on-chain traceability is introduced. First, a feature model has been designed to model core features of the chosen domain, based on the existing literature. Then, a configurator has been implemented to support the feature selection phase. Finally, a generator is able to ingest such configurations to generate on-the-shelf blockchain products. The generalizability of the contribution is validated by reproducing on-chain traceability applications proposed in the literature by using the platform. This work provides the first evidence that the implementation of blockchain applications using software product lines enhances the quality of produced applications and reduces the time to market.
... Given that oracles are a niche area of investigation, they are not officially classified by type, and their characteristics have yet to be defined. A group of studies has been dedicated to investigating common patterns that emerge from oracle architectures, with the aim of classification and improvement [67][68][69][70][71]. Pasdar et al. [67] differentiated reputationbased and voting-based oracles, explaining how each design provides the answer to the smart contract. ...
... Specific examples are also made of blockchain applications, where data are pushed or pulled into the smart contract. Xu et al. and Mammadzada et al. built a framework to select the most appropriate oracle design (in terms of security and data management) according to different blockchain applications [32,69,71]. ...
... Discusses how oracles can be implemented to ensure data privacy in loan management [135] A pattern collection for blockchain-based applications Describes different oracle types and how to recognize the most suitable one according to the needs [69] On the characterization of blockchain consensus under incentives Compares blockchain consensus and oracle consensus under specific incentive mechanisms [136] Distributed network slicing management using blockchains in e-health environments Shows the implementation of a decentralized oracle solution for the management of patient records [106] Blockchain for COVID-19: review, opportunities, and a trusted tracking system Outlines a means to recognize a trusted oracle network for tracking purposes [101] To chain or not to chain: a reinforcement learning approach for blockchain-enabled IoT monitoring applications Presents a blueprint of a private network in which oracle contracts improve their efficiency according to data collected by IoT sensors [137] Blockchain as a platform for secure inter-organizational business processes Discusses oracle data correctness and confidentiality in business process management [95] Future Appendix C [123,194] Chiba Institute of Technology [195] Kaunas University of Technology [196] Khalifa University [120,121,197] Rennes University [198] Shenzhen Technology University [199] UNIST-South Korea [ [128] ...
Article
Full-text available
Whereas the use of distributed ledger technologies has previously been limited to cryptocurrencies, other sectors—such as healthcare, supply chain, and finance—can now benefit from them because of bitcoin scripts and smart contracts. However, these applications rely on oracles to fetch data from the real world, which cannot reproduce the trustless environment provided by blockchain networks. Despite their crucial role, academic research on blockchain oracles is still in its infancy, with few contributions and a heterogeneous approach. This study undertakes a bibliometric analysis by highlighting institutions and authors that are actively contributing to the oracle literature. Investigating blockchain oracle research state of the art, research themes, research directions, and converging studies will also be highlighted to discuss, on the one hand, current advancements in the field and, on the other hand, areas that require more investigation. The results also show that although worldwide collaboration is still lacking, various authors and institutions have been working in similar directions.
... Recent approaches at implementing core aspects of process engines within smart contracts-programs whose code and state is stored on blockchains and which are executed within discrete transactions (Xu et al., 2017)-face severe issues trying to achieve those goals, however. While the integrity and immutability guarantees of blockchains may provide clear benefits (Mendling et al., 2018), they cause a peculiar execution environment: Smart contracts are neither constantly running, instead laying dormant outside of transactions (non-continuity property), nor can they directly interact with external services for integrity reasons (isolation property) (Xu et al., 2018). ...
... The temporal event e d is detected since the associated deadline has passed. Lastly, an oracle-patterns used to somewhat circumvent the isolation property of smart contracts (Xu et al., 2018)-can be employed to acquire a snapshot of the current weather warning level and detect e w . ...
... The example reveals two major challenges: For one, it is not clear which event occurred first and is the correct winner of the race. State-of-the-art oracles only provide current data (Xu et al., 2018), and the smart contract is not able to decide whether e w occurred before e d or e c . Second, the deferred choice is not resolved in a timely manner, since there could be an arbitrary delay between tx and tx′. ...
Article
Full-text available
First come, first served: Critical choices between alternative actions are often made based on events external to an organization, and reacting promptly to their occurrence can be a major advantage over the competition. In Business Process Management (BPM), such deferred choices can be expressed in process models, and they are an important aspect of process engines. Blockchain-based process execution approaches are no exception to this, but are severely limited by the inherent properties of the platform: The isolated environment prevents direct access to external entities and data, and the non-continual runtime based entirely on atomic transactions impedes the monitoring and detection of events. In this paper we provide an in-depth examination of the semantics of deferred choice, and transfer them to environments such as the blockchain. We introduce and compare several oracle architectures able to satisfy certain requirements, and show that they can be implemented using state-of-the-art blockchain technology.
... Oracles may convey information to or from the blockchain in either direction. Similarly, oracles may differ in mechanism of answering, direction of information flow, direction of initiation (agency), and more [4]- [7]. ...
Conference Paper
Full-text available
Blockchains benefit from guarantees of immutability and reliability due to their high redundancy and distributed nature. They show their value especially when operating between untrusted parties. Their functionality can be extended programmatically by smart contracts, but are limited by high costs of on-chain computation and only being able to truly trust data which is directly included on-chain. To attempt to bridge this limitation, blockchain oracles are introduced as a conceptual solution to act as a trusted source of information within the blockchain. The Oracle Problem emerges as we consider how one can introduce trusted information into a trust-free environment without compromising the validity of the blockchain. Many promising designs for oracle mechanisms have been proposed, but it is not readily apparent how one should assess the applicability of a given mechanism, nor the strengths and features between mechanisms. To be equipped to assess and categorize oracles, we must consider not just the possible answers, but the questions to which these oracles are trying to speak. Categorizing questions by their possible answering populations, we propose a framework for considering oracle questions and the context with which they are posed. We observe that there are limitations to what an oracle can hope to achieve, depending on the nature of the question, while noting the context in which a question exists can change what is viewed as true.
... The App System also takes care of access rights, providing this information only to qualified users. This approach is also called "Off-Chain Data Storage" pattern [24,17]. ...
Article
Blockchain and the programs running on it, called Smart Contracts, are increasingly applied in all fields where trust and strong certifications are required. Our work focuses on industrial applications of blockchains, and not on cryptocurrencies or tokens. We use frameworks to compare public and permissioned blockchains, specifically suited for industrial applications. We also propose a complete solution based on Ethereum to implement a decentralized application, putting together in an original way components and patterns already used and proved. This solution is characterized by a set of validator nodes running the blockchain using Proof-of-Authority or similar efficient consensus algorithms, by the use of an Explorer enabling users to check the blockchain state, and the source code of the Smart Contracts running on it. From time to time, the hash digest of the last mined block is written into a public blockchain to guarantee immutability. The right to send transactions is granted by validator nodes to users by endowing them with the Ethers mined locally. Overall, the proposed approach has the same transparency and immutability of a public blockchain, largely reducing its drawbacks.
... This line of research started from the recognition of blockchain as a software connector type that bridges software components across organisations in a decentralised and trustless manner [37,38]. Recent research on the software architecture aspects of blockchains has focused on architectural tactics [39] and patterns [40] to design on-blockchain smart contracts and the software systems surrounding them. ...
Preprint
Full-text available
Blockchain network deployment and evaluation have become prevalent due to the demand for private blockchains by enterprises, governments, and edge computing systems. Whilst a blockchain network's deployment and evaluation are driven by its architecture, practitioners still need to learn and carry out many repetitive and error-prone activities to transform architecture into an operational blockchain network and evaluate it. Greater efficiency could be gained if practitioners focus solely on the architecture design, a valuable and hard-to-automate activity, and leave the implementation steps to an automation framework. This paper proposes an automation framework called NVAL (Network Deployment and Evaluation Framework), which can deploy and evaluate blockchain networks based on their architecture specifications. The key idea of NVAL is reusing and combining the existing automation scripts and utilities of various blockchain types to deploy and evaluate incoming blockchain network architectures. We propose a novel meta-model to capture blockchain network architectures as computer-readable artefacts and employ a state-space search approach to plan and conduct their deployment and evaluation. An evaluative case study shows that NVAL successfully combines seven deployment and evaluation procedures to deploy 65 networks with 12 different architectures and generate 295 evaluation datasets whilst incurring a negligible processing time overhead.
... Beyond this commonality, blockchain applications are very heterogeneous and can be associated with many different use cases. While research has already provided different classifications, often with a fairly technical focus (e.g., see Xu et al., 2018), so far there has been no focus on the types of sensitive data involved. We hence present some use case patterns (payment, tamper-resistant documentation, cross-organizational workflow management, ubiquitous services, digital identities, tokenization, and machine economy) to illustrate what kind of sensitive information they can involve. ...
Article
Full-text available
This position paper discusses the challenges of blockchain applications in businesses and the public sector related to an excessive degree of transparency. We first point out the types of sensitive data involved in different patterns of blockchain use cases. We then argue that the implications of blockchains’ information exposure caused by replicated transaction storage and execution go well beyond the often-mentioned conflicts with the GDPR’s “right to be forgotten” and may be more problematic than anticipated. In particular, we illustrate the trade-off between protecting sensitive information and increasing process efficiency through smart contracts. We also explore to which extent permissioned blockchains and novel applications of cryptographic technologies such as self-sovereign identities and zero-knowledge proofs can help overcome the transparency challenge and thus act as catalysts for blockchain adoption and diffusion in organizations.
Article
A blockchain network is a distributed system established by mutually distrusting participants to operate a blockchain, enabling them to manage critical information such as account balances or asset ownership without a centralised third party. Blockchain network deployment and evaluation have become prevalent due to the emerging blockchain use cases by enterprises, governments, and Internet of Things (IoT) applications, which demand private blockchains rather than participating in public ones. A blockchain network architecture drives deployment and evaluation activities. Nevertheless, practitioners must learn and perform error-prone activities to transform architecture into a blockchain network and evaluate it. Therefore, it is beneficial to automate these activities so that practitioners can focus on the architecture design, a valuable and hard-to-automate activity. The key challenges of such an automation framework are keeping up with the advances in blockchain technologies and the increasing complexity of blockchain network architecture. This paper proposes NVAL, a software framework that implements a novel architecture-driven, community-supported approach to automate blockchain network deployment and evaluation. NVAL accepts blockchain network architecture as input. It supports complex multi-channel blockchain networks, an increasingly prevalent architecture for private blockchain. The framework keeps up with blockchain technologies by leveraging platform-specific automation programs developed by a practitioner community via runtime composition to handle new networks. We evaluated NVAL with a case study and showed that the framework requires only seven automation programs to deploy 65 blockchain networks with 12 diverse architectures and generate 295 evaluation datasets. Furthermore, it consumes only 95.5 ms to plan and orchestrate the deployment and evaluation, which is minuscule compared to the total time required for deploying and benchmarking a blockchain network.
Article
Blockchain is a disruptive technology intended to implement secure decentralised distributed systems, in which transactional data can be shared, stored, and verified by participants of the system without needing a central authentication/verification authority. Blockchain-based systems have several architectural components and variants, which architects can leverage to build secure software systems. However, there is a lack of studies to assist architects in making architecture design and configuration decisions for blockchain-based systems. This knowledge gap may increase the chance of making unsuitable design decisions and producing configurations prone to potential security risks. To address this limitation, we report our comprehensive systematic literature review to derive a taxonomy of commonly used architecture design decisions in blockchain-based systems. We map each of these decisions to potential security attacks and their posed threats. MITRE’s attack tactic categories and Microsoft STRIDE threat modeling are used to systematically classify threats and their associated attacks to identify potential attacks and threats in blockchain-based systems. Our mapping approach aims to guide architects to make justifiable design decisions that will result in more secure implementations.
Conference Paper
Full-text available
The potential for blockchains to fundamentally transform how organizations produce and capture value is huge and very real. Practical applications dealing with nearly any type of digital asset demonstrate this capacity. Blockchain-based application architectures benefit from a set of unique properties including immutability and transparency of cryptographically-secured and peer-recorded transactions, which have been agreed upon by network consensus. Blockchain-based applications, however, may also suffer from high computational and storage expenses, negatively impacting overall performance and scalability. In this paper, we report on lessons learned and insights gained from a set of experimental blockchain projects, focusing on off-chaining: How to move computation and data off-the-chain, without compromising the properties introduced and benefits gained by using blockchains in the first place.
Presentation
Full-text available
Slides paper ”An empirical analysis of smart contracts platforms, applications, and design patterns”, presented by Livio Pompianu
Article
Full-text available
Smart contracts are computer programs that can be consistently executed by a network of mutually distrusting nodes, without the arbitration of a trusted authority. Because of their resilience to tampering, smart contracts are appealing in many scenarios, especially in those which require transfers of money to respect certain agreed rules (like in financial services and in games). Over the last few years many platforms for smart contracts have been proposed, and some of them have been actually implemented and used. We study how the notion of smart contract is interpreted in some of these platforms. Focussing on the two most widespread ones, Bitcoin and Ethereum, we quantify the usage of smart contracts in relation to their application domain. We also analyse the most common programming patterns in Ethereum, where the source code of smart contracts is available.
Article
Full-text available
Smart Contract Templates support legally-enforceable smart contracts, using operational parameters to connect legal agreements to standardised code. In this paper, we explore the design landscape of potential formats for storage and transmission of smart legal agreements. We identify essential requirements and describe a number of key design options, from which we envisage future development of standardised formats for defining and manipulating smart legal agreements. This provides a preliminary step towards supporting industry adoption of smart legal agreements.
Article
Full-text available
In this position paper, we consider some foundational topics regarding smart contracts (such as terminology, automation, enforceability, and semantics) and define a smart contract as an agreement whose execution is both automatable and enforceable. We explore a simple semantic framework for smart contracts, covering both operational and non-operational aspects. We describe templates and agreements for legally-enforceable smart contracts, based on legal documents. Building upon the Ricardian Contract triple, we identify operational parameters in the legal documents and use these to connect legal agreements to standardised code. We also explore the design landscape, including increasing sophistication of parameters, increasing use of common standardised code, and long-term academic research. We conclude by identifying further work and sketching an initial set of requirements for a common language to support Smart Contract Templates.
Conference Paper
Full-text available
The integration of business processes across organizations is typically beneficial for all involved parties. However, the lack of trust is often a roadblock. Blockchain is an emerging technology for decentralized and transactional data sharing across a network of untrusted participants. It can be used to find agreement about the shared state of collaborating parties without trusting a central authority or any particular participant. Some blockchain networks also provide a computational infrastructure to run autonomous programs called smart contracts. In this paper, we address the fundamental problem of trust in collaborative process execution using blockchain. We develop a technique to integrate blockchain into the choreography of processes in such a way that no central authority is needed, but trust maintained. Our solution comprises the combination of an intricate set of components, which allow monitoring or coordination of business processes. We implemented our solution and demonstrate its feasibility by applying it to three use case processes. Our evaluation includes the creation of more than 500 smart contracts and the execution over 8,000 blockchain transactions.
Article
Since the inception of the Bitcoin technology, its underlying data structure--the blockchain--has garnered much attention due to properties such as decentralization, transparency, and immutability. These properties make blockchains suitable for apps that require disintermediation through trustless exchange, consistent and incorruptible transaction records, and operational models beyond cryptocurrency. In particular, blockchain and its smart contract capabilities have the potential to address healthcare interoperability issues, such as enabling effective interactions between users and medical applications, delivering patient data securely to a variety of organizations and devices, and improving the overall efficiency of medical practice workflow. Despite the interest in using blockchain for healthcare interoperability, however, little information is available on the concrete architectural styles and patterns for applying blockchain to healthcare apps. This paper provides an initial step in filling this gap by showing: (1) the features and implementation challenges in healthcare interoperability, (2) an end-to-end case study of a blockchain-based healthcare app we are developing, and (3) how applying foundational software patterns can help address common interoperability challenges faced by blockchain-based healthcare apps.