Daml wins ‘Best Overall Solution’ at Barclays DerivHack London

author by Neil Mitchell November 6, 2018

In this article

Reflections from the winning team on Daml and the ISDA CDM

Derivhack-1

The Digital Asset team, overall winners of the London event: left to right, Thomas Weber, Neil Mitchell, Jeremy Wilson (Barclays), Silvan Villiger, Viv Diwakar, Dr. Lee Braine (Barclays).

On June 5th 2018, the International Swaps and Derivatives Association (ISDA) launched the first version of their Common Domain Model (CDM). The CDM is intended to provide an industry standard for how derivatives are represented, traded and managed across the lifecycle, potentially unlocking huge efficiency savings.

Eventual benefits of the ISDA CDM include:

  • Establish a common set of data and processing standards to facilitate interoperability between firms.
  • Provide a common foundation for new technologies like distributed ledger, cloud and smart contracts to facilitate consistency and interoperability.
  • Reduce the current need for continual reconciliations to address mismatches caused by variations in how each firm records trade lifecycle events.
  • Enable consistency in regulatory compliance and reporting.

In order to get feedback on the emerging standard, to explore the practical implementation of ideas, and to assess the feasibility of applying the CDM to emerging technologies, Barclays partnered with Deloitte, ISDA and Thomson Reuters to sponsor Barclays DerivHack 2018. The event took place on September 20th and 21st in London and New York. The competing teams had to implement six use cases and present their solutions to a panel of independent judges drawn from the industry, academia, and public sector.

Out of 15 teams competing in London, Digital Asset’s solution was judged to be the overall winner — successfully solving all six use cases with the Digital Asset Platform and Daml, Digital Asset’s smart contract modeling language (the event in New York was judged independently and there the overall winner was Baton Systems).

The use cases

DerivHack consisted of six use cases, two of which were distributed two weeks in advance, and the remaining four at the start of the two-day event.

Use Case 1 was to set up the counterparty data for a market with one CCP, three dealers, five clients, and multiple EUR and USD accounts per legal entity. We chose to go one step further by additionally modeling a master agreement between transacting parties to ensure that they agree to the general rules of subsequent trading activities.

Use Case 2 was to load 200 new trades onto the ledger. The provided trade data represented cleared and bilateral OTC derivatives covering interest rate swaps, interest rate basis swaps and credit default swaps. We captured all trades in a strongly typed fashion by auto-generating Daml types from the CDM specification. Additionally, we showed how the CDM could be extended to front office operations and pre-trade activities by implementing a basic trade negotiation process.

Use Case 3 was to process negotiated trade events that affect some of the trades loaded in use case 2. The provided examples leveraged CDM’s capability to compose primitive events and covered partial terminations, terminations, partial novations, 3-way novations and 4-way novations. The Daml authorization model proved particularly valuable here, as we could model the negotiation as a business process where any party can propose an event and where the other involved parties have to explicitly approve before it can be executed.

Use Case 4 was about processing lifecycle events that are modeled as “dependent” events in the CDM and hence get triggered by the payout features defined in the contract. The task was to process all interest rate observations, trade resets, and accrual calculations to define payments for the trades of use case 2 during a one year period. We modeled observations by adding Reuters as a participant to the ledger who published reference data as signed Daml contracts, thus guaranteeing integrity. Further, we implemented “dependent” events as actions on the master agreement that we produced as an extension to use case 1 — meaning that the trades could be lifecycled in a pre-approved way, without requiring additional approvals as in use case 3.

Use Case 5 was to aggregate trades to portfolios, construct net payment instructions, transact with a mock settlement service and track settlement evidence. In Daml there is a clear separation between on-ledger rules and off-ledger strategies that allow for automation. This model fitted perfectly for the integration with an external settlement service. We chose to go one step further by modeling a basic payment system where each participant had their accounts with the ECB or FED respectively. We were able to atomically settle payment instructions such that the central banks only had visibility of the payments and the resulting cash balances, but not the trades that led to them.

Use Case 6 was to add reporting information. Given that we modeled CDM events and trades as Daml contracts we were able to use our standard real-time reporting solution to show them in tabular form. To show the transaction history of a single trade, we wrote a custom view based on the CDM lineage information. However, given that the DA Platform also stores its own transaction graph, we could have extracted the required information from there as well. A nice property of our lineage report was that it correctly accounted for privacy based on who was viewing it. Given a 3-way novation, for example, the original parties can see the history all the way back to the trade creation, whereas the new party can only see lineage information starting with the novation event.

As Jeremy Wilson, Vice-Chairman of Corporate Banking at Barclays, awarded the prize of Best Overall Solution to our team, Dr. Lee Braine, from the Chief Technology Office at Barclays, explained to the audience that Digital Asset was the overall winner:

“[Digital Asset] were the only team that completed all six use cases, they also implemented additional functionality to complement those use cases, and they provided the judges with a comprehensive demonstration of their solution.”

Why Daml?

Daml is a succinct contract modeling language built specifically for distributed ledgers that unambiguously codifies complex, real-life, multi-party agreements. In our previous series of blog posts we talked about what makes Daml special, but it was great to see it be judged the best solution against multiple other distributed ledger platforms for a real world application. The following features were particularly useful for our CDM solution:

  • Daml is a functional language with a strong type system. This design helped us to safely capture and handle CDM data.
  • Any workflow can be modeled as a set of rights and obligations. This design precisely specifies who can exercise which actions and what the consequences are. Therefore, it allowed us to ensure integrity when processing CDM events.
  • Privacy is determined on a subtransaction level and data only gets shared with the stakeholders of a contract by default. This aspect of Daml solved the important requirement to ensure confidentiality of transaction data and trade activities out of the box. We even ensured that the new party of a novation doesn’t see the full transaction history, as an automatic feature of how Daml works, with no additional effort.
  • Business processes can easily be composed to make atomic transactions. This design allowed us to reuse the same event processing logic across negotiated and lifecycle events, and to seamlessly connect the CDM to other on-ledger workflows such as a trade negotiation process or a payment system.
  • Daml abstracts away the ledger details and allows the developer to focus on the business logic. This design massively improved our velocity because we didn’t have to deal with cryptography, hashes, consensus algorithms or other aspects of the underlying platform implementation.
  • On-ledger rules are clearly separated from off-ledger strategies that allow for automation. This separation led to a very natural integration with the external mock settlement service.


Derivhack-2

There has to be a selfie!

Learn more at the ISDA Technology Forum

We very much enjoyed participating in this hackathon — we learnt a lot about CDM and are very excited about its future. In the near term, Digital Asset be participating in the ISDA Technology Forum on 8 November at which we will have a booth where Silvan will be demonstrating what we built for DerivHack. Additionally, our Head of Financial Products, Kelly Mathieson, will be speaking on a panel about Collateral Management, and Neil will be taking part on the CDM panel.

 

 

Join the community and download the Daml SDK at daml.com

This story was originally published 6 November 2018 on Medium

About the authors

Neil Mitchell, Ph.D, Senior Product Architect, Digital Asset

Neil leads the product team responsible for the Daml Language. Neil has a PhD in Computer Science from York University, where he worked on making functional programs shorter, faster and safer. Since 2008 he spent 8 years as a quant at Credit Suisse and Standard Chartered, before building a cross-asset risk engine as a Director at Barclays. Throughout, Neil has been taking the programming language techniques from his PhD and applying them to get the same benefits in a commercial setting.

Neil is the author of popular Haskell tools such as Hoogle, HLint and Ghcid — all designed to help developers write good code quickly. More recently Neil has been researching build systems with publications at ICFP and the Haskell Symposium, and a practical system based on those ideas named Shake. Neil’s home page. @ndm_haskell

Silvan Villiger, Senior Product Architect, Digital Asset

Silvan leads the product team responsible for the Daml SDK and the Application Development team in EMEA. Prior to joining DA, he was a Director at Credit Suisse where he worked as a Quantitative Strategist for ten years. He led the Analytics Platform team in Zurich and worked with the equity derivatives, share-backed lending, and structured products businesses.

Silvan has a master’s degree in Computational Science and Engineering from ETH Zurich with specializations in fluid dynamics and mathematical finance.