Message-based integration with DAML-Driven ledgers
Financial markets could not survive without IT integration standards that specify the data and messaging formats that allow financial transactions to cross organizational boundaries. For derivatives markets, in particular, we have recently seen a huge leap forward in the quality of standards as ISDA unveiled the Common Domain Model (CDM) and a companion CDM reference model built in DAML—the open source smart contract development language that was created here at Digital Asset.
But before the CDM, ISDA was (and remains) caretaker of the FpML (Financial products Markup Language) standard. Like any entrenched technology, FpML will remain in use for a long time. In this blog post, I’d like to explore the applicability of DAML to FpML and similar integration standards.
Today, the vast majority of market infrastructures are based on relational database technology. But not all are based on the same database technology, raising inter-market interoperability challenges that have generally been solved with cooperative standards incorporated into each codebase and/or messaging. These market infrastructures will continue to exist, even as some move to other technologies such as DLT (Distributed Ledger Technology). This is why we have ensured that a DAML-driven market can interoperate with other markets via these integration standards in a flexible way.
Integration standards are necessarily domain specific. In the finance domain, for example, we have well-established standards such as FpML and FIX (Financial Information eXchange). These standards describe how data is referenced, transacted and reported on across different platforms and organizations; typically by defining message formats and documenting workflows.
The DAML SDK provides comprehensive Java-based APIs out-of-the-box for submitting data to a shared ledger. This means we can take advantage of the many battle-tested libraries and frameworks available in the Java ecosystem to achieve integration.
We have used the Java platform's robust support for messaging and XML to build an integration library that facilitates the integration of FpML-based workflows with a DAML ledger. With FpML data on the ledger, one can use DAML to encode and enforce the business workflows described in the standards.
As an example of using FpML with a DAML-based distributed ledger, let’s consider the OTC derivatives clearing use case. The sequence diagram below shows an example FpML OTC derivatives clearing workflow involving a swaps execution facility (SEF), a derivatives clearing organization (DCO), and two clearing member firms. The DCO and its members are all participants in the distributed ledger, with the SEF being an outside entity.
The SEF submits trades to the DCO clearing service using an FpML ‘requestClearing’ message. The DCO may then request consent for clearing the trade by sending additional messages to the members, depending on various rules and limits agreed by each member. If required, a ‘requestConsent’ message would provide the proposed trade between the DCO and the member firm. The figure below shows part of an example ‘requestClearing’ message in FpML. The message content is available in full for the DAML-based workflow logic to process (as DAML hosted types). The DAML logic can then make decisions based on this content—for example, generating subsequent ‘requestConsent’ messages, if necessary, according to the pre-agreed rules.
The FpML types are all available for use within DAML (see the partial view of our current generated documentation below).
One of the detractions of FpML is that it is primarily a standard for storing data, and although financial workflows using FpML are documented, there is no standard on how these workflows are actually implemented. Every bank uses FpML, but variations in how they use FpML create very brittle workflows that are hard to maintain.
One of the key advantages in using FpML with DAML is that, since the FpML messages are transacted to a DAML ledger, participants have the opportunity to share the same DAML logic for interpreting and generating these messages—providing a greater degree of transparency and consistency in handling them across organizations. This reduces complexity, risk and the cost of onboarding new participants. Upgrading and agreeing upon changes to the logic also becomes a business process managed by the ledger. Within a market based on DAML ledgers, the use of FpML can be fully consistent across members.
Enter the CDM
Recognizing the limitations in FpML, ISDA developed the CDM as a new standard for the derivatives post-execution trade lifecycle. The value of the CDM, and the value of DAML to users of the CDM, is written up in-depth in this blog post. Summarizing a few of the key points, CDM builds on FpML but is more prescriptive about how the data is interpreted and contains domain-specific validation logic to express and enforce workflow states. This goes a long way towards reducing variation. Even better, CDM specifies, in greater detail, operations that happen on trades, such as novations. This too improves consistency—but, as with FpML, relies on every participant to implement the standard consistently. Availability of a rendering of the specification, a reference implementation, and a sample end-to-end application in DAML allows market participants to share DAML logic and process CDM in a truly consistent way across markets.
It is very straightforward to integrate outside entities with markets based on DAML ledgers using familiar messaging standards and tools. In this blog post, we described using FpML to connect with DAML-based markets; the same can hold true for pretty much any standard in any market.
To accelerate the integration between a DAML-driven market with markets built on other technologies, we have open-sourced our message integration library along with an example to show how integration with FpML would work. We also plan to demonstrate support for other message standards like FIXML (the XML encoding part of the FIX standard) using the same integration library used for FpML.
Join the community and download the DAML SDK at www.daml.com.
About the author
Thomas Weber - DAML Modeler, Digital Asset
Thomas Weber is part of the DAML Modeler team in EMEA contributing to the evolution of DAML. Prior to joining DA, he was a Senior Risk Modeler at Credit Suisse where he worked for several years. He was part of the management team responsible for pricing services and worked with equity derivatives and structured products including their pricing and lifecycle management.
Thomas holds a master’s degree in Quantitative Finance from ETH Zurich with specializations in risk management and derivatives pricing.