Daml.Finance.Lifecycle

This package contains the implementation of lifecycle related processes. It contains the following modules:

  • Effect: A contract encoding the consequences of a lifecycle event for one unit of the target instrument
  • ElectionEffect: A contract encoding the consequences of an election for one unit of the target instrument
  • Rule.Claim: Rule contract that allows an actor to process/claim effects, returning settlement instructions
  • Rule.Distribution: Rule contract that defines the distribution of units of an instrument for each unit of a target instrument (e.g. share or cash dividends)
  • Rule.Replacement: Rule contract that defines the replacement of units of an instrument with a basket of other instruments (e.g. stock merger)
  • Rule.Util: Utility functions to net, split and merge pending payments
  • Event.Distribution: Event contract for the distribution of units of an instrument for each unit of a target instrument (e.g. share or cash dividends)
  • Event.Replacement: Event contract for the replacement of units of an instrument with a basket of other instruments (e.g. stock merger)

Check out the Lifecycling tutorial for a description on how lifecycling works in practice, including how to Claim an Effect. There is also the tutorial How to implement a Contingent Claims-based instrument, which describes how create an Effect. For a description of Distribution and Replacement, check out the src/test/daml/Daml/Finance/Instrument/Equity/Test folder. It demonstrates how to create and lifecycle a cash dividend, and how to handle corporate actions like mergers and stock splits.