Daml finance app - structuring vs structuringAuto

Hi Daml-Finance team

I’ve been recently exploring the new daml-finance-app

can you help me understand the difference of structuring vs structuringAuto? And what drives structuringAuto to be 0?

You can find an example of its usage in NewGeneric.tsx under ui/src/pages:

1 Like

Hi @BrunoRTL,

In the daml-finance-app, a service is a contract entered by two parties (resp. the provider and the customer) that have a business relationship.

The Structuring service is used to originate new instruments. This is a two step approach, where

  • the customer requests for a new instrument to be created (e.g., via RequestCreateToken)
  • the provider accepts the request and creates the desired instrument (e.g., via CreateToken)

Running this workflow in the UI requires to

  • log in as the customer to exercise RequestCreateToken
  • log in as the provider to exercise CreateToken
  • log back in as the customer to see the new instrument

Given that this gets a bit cumbersome when show-casing the app in a demo, there is an additional AutoService where the instrument creation request is automatically accepted by the provider (RequestAndCreateToken).

This way the above process just becomes

  • log in as the customer and exercise RequestAndCreateToken

Regarding your second question, the highlighted code just returns a message if there is no structuring service on the ledger for the current party.

I hope this clarifies it!
Matteo

2 Likes