yes, we indeed have a canonical model for asset and accounts, transfers and DvPs between those, as well as a generic lifecycling mechanism, in the form of the DAML Finance Library.
Assets and accounts are simply referred to by a textual, versioned identifier, that also specifies the backing signatories. We define an AssetDeposit as the combination of an asset deposited into an account.
Then, we have a rule contract for transfers, the AssetSettlementRule. And based on that we define a generic DvP structure that leverages this rule in its own settlement rule.
In a similar vein, we’ve implemented generic asset lifecycling, which follows a very similar approach as you describe. Essentially, you define a lifecycle rule that implements the event logic and outputs a generic LifecycleEffects contract, which describes how a position (ie.
AssetDeposit) evolves through the event. These effects can then be applied to deposits generically using the AssetLifecycleRule.
An example for this mechanism is implemented in the EquityStockCashDividendRule. It produces effects that reflect a cash dividend paid on a stock position.
Note that this lifecycling mechanism only describes the effects for the position holder within the context of a given account provider. For example a custodian bank would use it to effectuate a cash dividend for all their client positions in their own books (ie. for all
AssetDeposits that they are the provider on). On the other side the bank would lifecycle its own stock position at the CSD in a similar manner such that they’re net flat over the event. Ideally, the two sides would happen atomically such that there’s no risk of failure and residual exposure.
What this model doesn’t cover is the issuer side of such an event, ie. the (lump sum) payment of the dividend by the issuer to the CSD. I think it could still fit into this model but we haven’t explored it yet.
I hope this gives you some context on the library and shows possible ways to integrate with it. Let me know if there’s any aspect you need more information on. I’m keen to understand if your OTC design can fit with our model.