The CDM reference implementation in DAML discussed in this blog post is open source:
https://github.com/digital-asset/lib-cdm-event-specification...
Digital Asset has also open sourced a complete example of a swaps application in DAML using the CDM: https://github.com/digital-asset/ex-cdm-swaps
Both repos are licensed under Apache 2.0