[Paper Review] Daml: A Smart Contract Language for Securely Automating Real-World Multi-Party Business Workflows
Daml is a functional smart contract language derived from Haskell that enables secure, composable automation of real-world multi-party business workflows on distributed ledgers. It models legal principles like offer/acceptance and intervention rights through first-class language primitives, enforces fine-grained access control via built-in ownership and authorization, and supports deployment across centralized, BFT, and blockchain backends with full application portability, enabling production use at scale in finance, healthcare, and supply chains.
Distributed ledger technologies, also known as blockchains for enterprises, promise to significantly reduce the high cost of automating multi-party business workflows. We argue that a programming language for writing such on-ledger logic should satisfy three desiderata: (1) Provide concepts to capture the legal rules that govern real-world business workflows. (2) Include simple means for specifying policies for access and authorization. (3) Support the composition of simple workflows into complex ones, even when the simple workflows have already been deployed. We present the open-source smart contract language Daml based on Haskell with strict evaluation. Daml achieves these desiderata by offering novel primitives for representing, accessing, and modifying data on the ledger, which are mimicking the primitives of today's legal systems. Robust access and authorization policies are specified as part of these primitives, and Daml's built-in authorization rules enable delegation, which is key for workflow composability. These properties make Daml well-suited for orchestrating business workflows across multiple, otherwise heterogeneous parties. Daml contracts run (1) on centralized ledgers backed by a database, (2) on distributed deployments with Byzantine fault tolerant consensus, and (3) on top of conventional blockchains, as a second layer via an atomic commit protocol.
Motivation & Objective
- To design a smart contract language that natively supports real-world legal rules such as offer and acceptance, remedies, and intervention rights, ensuring legal adequacy.
- To provide first-class, composable authorization and access control mechanisms integrated with data and logic, ensuring security and minimizing attack surface.
- To enable seamless composition of already-deployed workflows through delegation and context-aware transaction validation, supporting organic growth of complex systems.
- To ensure portability across diverse ledger implementations—centralized, BFT, and blockchain—while maintaining consistent semantics and security guarantees.
Proposed method
- Daml introduces a novel `Update` monad to encapsulate ledger state changes, separating pure computation from stateful operations, ensuring clean semantics and preventing side effects.
- It models data ownership and access control through explicit annotations: each contract is owned by a set of parties and can be modified only by controllers specified in the contract, with all owners guaranteed visibility.
- The language uses a core language, Daml-LF, based on a strict, functional subset of Haskell, compiled from Daml to ensure type safety and formal verification potential.
- Transaction trees are used as a model for ledger updates, enabling subworkflows to validate only their own subtrees, which supports composability and independent deployment.
- Authorization policies are embedded directly in the data and contract definitions, ensuring that access rules are always in sync with business logic and cannot be bypassed.
- Daml is compiled to Daml-LF and runs on multiple ledger backends—including centralized databases, SBFT-based BFT systems (e.g., VMware Blockchain, Hyperledger Fabric), and Ethereum-based systems (e.g., Besu)—ensuring cross-platform portability.
Experimental results
Research questions
- RQ1How can a smart contract language natively model real-world legal rules such as contract formation, remedies, and intervention rights without relying on the 'code is law' paradigm?
- RQ2How can authorization and access control be made first-class, composable, and formally enforced within a smart contract language to prevent common vulnerabilities?
- RQ3How can existing, deployed workflows be composed into new, complex workflows without requiring changes to the original contracts or coordination across all parties?
- RQ4How can transaction validation be made context-aware and efficient, focusing only on relevant subtransactions during composition?
- RQ5How can a single Daml smart contract be deployed and securely executed across diverse ledger technologies (centralized, BFT, blockchain) with consistent behavior?
Key findings
- Daml supports the modeling of real-world legal principles such as offer and acceptance and allows for manual intervention in unforeseen circumstances, ensuring legal adequacy without violating security guarantees.
- The integration of ownership and authorization into the core data model ensures that only authorized parties can modify data, and all owners always see changes, preventing privilege escalation and race conditions.
- The `Update` monad and strict evaluation model eliminate common security pitfalls such as reentrancy attacks, providing predictable and secure execution semantics.
- Daml enables true composability: pre-deployed workflows can be composed via delegation, and each subworkflow validates only its own subtree, enabling modular and scalable system evolution.
- Daml smart contracts are production-ready and have been deployed at scale, processing over USD 100 billion in daily transaction volumes across financial services, healthcare, and supply chain sectors on multiple ledger backends.
- The same Daml smart contract runs identically across centralized, BFT, and blockchain-based ledgers, demonstrating strong portability and interoperability across enterprise DLT platforms.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.