I have published the latest part of my DAML Masterclass series, Modelling bonds and options.
Reverse engineering the Asset Servicing reference application, I explain how two asset types, which are among the most common ones, bonds and equity options, are modelled with DAML data types and contract templates.
I also show you how the full lifecycle of these asset types can be modelled with DAML Scripts.
Thanks to the new “display result” functionality of Scripts, introduced with the DAML SDK version 1.5.0, I can show you the results of the scripts describing the entire lifecycle of these assets.
In the next two parts of the series, I will open up a wide range of application potential beyond finance for DAML driven applications, showing how they can implement transactions in Healthcare Claims Processing and online Chess.
8 Likes
Really great post @gyorgybalazsi! Love step-by-step explanation of how you reverse engineered the app. My favorite is really
So I have stripped and extended the Init.daml file of the reference application, so that it only contains data relevant for a bond deposit and its full lifecycle in the form of a DAML Script.
2 Likes
The bonds/equities are pretty straightforward but is there anything you’d change about how this refapp works?
1 Like
I wouldn’t say any change is necessary, you should use it flexibly.
In a real world client discussion I would use the relevant parts of this refapp as a starting point for requirements elicitation.
It’s modular, so the requirement specialist can find the relevant asset types easily.
The working mechanisms of the individual asset types is demonstrated by the Init.daml script.
I have modified the Init.daml script so that I can concentrate on the chosen asset types, and that’s what I would do in a real world discussion as well.
In summary, this refapp is not (and is not intended to be) production code, but a good starting point for discussing requirements.
Based on the requirement process, the DAML code would most likely change to reflect the special requirements of the client, which is not predictable.
2 Likes