Applying Design Patterns in Smart Contracts

2018 
Blockchain, the technology Bitcoin lives on, is an emerging research field due to its nature of decentralisation, and properties of data immutability and transparency. Smart contracts are the programs executed on programmable infrastructure provided by blockchain, which can manage complex business logic, extending the field significantly. As blockchain technology is still at an early stage, there are little works on applying software architectural methods to the design of blockchain-based applications. In this paper, we summarise eight smart contract design patterns based on existing smart contracts and our experience, and classify them into four categories: Creational Patterns, Structural Patterns, Inter-Behavioral Patterns, and Intra-Behavioral Patterns. We share some experiences of applying the presented design patterns of smart contract on a real-world blockchain-based traceability application, and also discuss how patterns can improve the quality attributes of blockchain-based application.
    • Correction
    • Source
    • Cite
    • Save
    • Machine Reading By IdeaReader
    13
    References
    19
    Citations
    NaN
    KQI
    []