0

I want to write a code for reverse of the DVP settlement (it should happen automatically after certain amount of time) in DAML. Is there any similar program available in daml document or can anyone help me with the code?

  • Hi and welcome to Stack Overflow. Your question is unfortunately off topic. Please read [What topics can I ask about here?](https://stackoverflow.com/help/on-topic). Try to write some code and we can gladly help you with the specific errors you encounter. – Cosmin Staicu Aug 02 '19 at 05:29

1 Answers1

1

Do you mean reversing a DVP settlement after it has settled? Under what conditions would this reversal be permitted? What if the underly assets were no longer there? :)

Note that DAML cannot initiate actions - it can only react to choices on contracts (technically - made via the Ledger API). There is no scheduler in DAML, so you can't say "at 10:00AM do this" or "after 10 minutes do that". You can only make choices available for a Party to initiate an action, such as the reversal of a DVP settlement, within a prescribed period of time. For example you could say "within 10 minutes of settlement the buying Party may reverse the settlement". Or "if the selling Party does not confirm the settlement within 10 minutes, the buyer may reverse it". Of course you can add your own authorization workflow to put any prerequisites on this action that you desire for your use case.

Fil
  • 1,766
  • 1
  • 15
  • 15