Design Patterns for Blockchain-Based Payment Applications

Qinghua Lu, Xiwei Xu, H. M. N. Dilum Bandara, Shiping Chen, Liming Zhu

Abstract: As the killer application of blockchain technology, blockchain-based payments have attracted extensive attention ranging from hobbyists to corporates to regulatory bodies. Blockchain facilitates fast, secure, and cross-border payments without the need for intermediaries such as banks. Because blockchain technology is still emerging, systematically organised knowledge providing a holistic and comprehensive view on designing payment applications that use blockchain is yet to be established. If such knowledge could be established in the form of a set of blockchain-specific patterns, architects could use those patterns in designing a payment application that leverages blockchain. Therefore, in this paper, we first identify a token's lifecycle and then present 12 patterns that cover critical aspects in enabling the state transitions of a token in blockchain-based payment applications. The lifecycle and the annotated patterns provide a payment-focused systematic view of system interactions and a guide to effective use of the patterns.

The Engineering Challenge of Programmable Money

While blockchain is often hailed as the "killer app" for payments, the actual engineering of these applications remains a "wild west." Architects face a fragmented landscape of emerging standards and bespoke solutions. The core challenge is that blockchain payments aren't just about moving numbers; they involve complex "conditional" logic—think food stamps that can only be spent on healthy groceries, or insurance payouts triggered by weather data.

Balancing these requirements with blockchain's inherent constraints—such as high transaction costs, latency, and public transparency—requires a structured approach. Until now, these architectural solutions had not been formally codified into a reusable framework.

Methodology

Researchers from CSIRO’s Data61 and UNSW combined extensive literature reviews with real-world project experience, notably a "smart money" pilot for Australia’s National Disability Insurance Scheme (NDIS). They employed open and axial coding—a qualitative research method—to analyze existing blockchain protocols (such as ERC-20, ERC-721, and ERC-1363) and academic papers. From this analysis, they distilled 12 recurring design patterns and mapped them onto a universal "Token Lifecycle."

Mapping the Token Lifecycle

The authors argue that every payment application follows a specific state machine. By mapping patterns to these states, architects can identify exactly which tool to use at which stage of a token's existence.

The lifecycle of a token, illustrating state transitions and the patterns that enable them.

As shown in the lifecycle diagram, a token typically moves through five primary states: Issued, Allocated, Validated, Transferred, and Destroyed. This framework allows developers to visualize how patterns like "Escrow" or "Payment Channels" interact with the token's current state to facilitate secure and efficient transactions.

A Taxonomy of 12 Design Patterns

The paper’s primary output is a taxonomy of 12 patterns, categorized into two groups: Token Design Patterns and Payment Management Patterns.

Summary of the 12 identified design patterns categorized by Token Design and Payment Management.

Key Insights

  • Programmable Money via Policy Contracts: One of the most powerful patterns is the Policy Contract. By separating the token from the rules (e.g., "only spendable at pharmacies"), issuers can update business logic without redeploying the entire token system.
  • The Privacy-Traceability Paradox: Patterns like Stealth Addresses solve privacy issues by creating one-time addresses, but this creates a trade-off with regulatory requirements for traceability and Anti-Money Laundering (AML) laws.
  • Scalability via Off-chaining: The Payment Channel pattern is essential for micro-payments, allowing thousands of transactions to happen instantly off-chain while only settling the final balance on the blockchain to save on gas fees.

Limitations and Future Work

While these patterns are reusable, the cost of implementation on public blockchains remains a significant hurdle. Furthermore, reconciling privacy-enhancing patterns with strict regulatory frameworks remains an ongoing challenge. Future work will focus on developing a formal decision model to help developers automatically select the best combination of patterns based on specific project constraints, such as the need for high privacy versus low transaction costs.

Summary updated

Abstract

As the killer application of blockchain technology, blockchain-based payments have attracted extensive attention ranging from hobbyists to corporates to regulatory bodies. Blockchain facilitates fast, secure, and cross-border payments without the need for intermediaries such as banks. Because blockchain technology is still emerging, systematically organised knowledge providing a holistic and comprehensive view on designing payment applications that use blockchain is yet to be established. If such knowledge could be established in the form of a set of blockchain-specific patterns, architects could use those patterns in designing a payment application that leverages blockchain. Therefore, in this paper, we first identify a token's lifecycle and then present 12 patterns that cover critical aspects in enabling the state transitions of a token in blockchain-based payment applications. The lifecycle and the annotated patterns provide a payment-focused systematic view of system interactions and a guide to effective use of the patterns.
BibTeX
@inproceedings{lu2021design,
  author = {Qinghua Lu and Xiwei Xu and H. M. N. Dilum Bandara and Shiping Chen and Liming Zhu},
  title = {{Design Patterns for Blockchain-Based Payment Applications}},
  booktitle = {EuroPLoP},
  year = {2021},
  url = {https://openreview.net/forum?id=2SBrI3RHaX},
}
Figure