Interface Effect - Why "The provider has visibility on all sub-transactions triggered by `Claim`\ing an effect."?

Hi,

Probably I’m missing something but I don’t understand why “The provider has visibility on all sub-transactions triggered by Claim\ing an effect.”

module Daml.Finance.Interface.Lifecycle.Effect

choice SetProviders : ContractId Effect
    -- ^ Set the provider of the effect. The provider has visibility on all sub-transactions
    --   triggered by `Claim`\ing an effect.
    with
      newProviders : Parties
        -- ^ The new provider.
    controller (view this).providers, newProviders
    do
      setProviders this arg

I see that when claimer exercises ClaimEffect passes the Effect.I cid as a parameter. In the default implementation of Daml.Finance.Interface.Lifecycle.Rule.Claim.Claim the effect cid is used for getting its view and calculating (Calculate choice) the instrument quantities to settle which are just quantities (no info about holdings or owners). As far as I understand, sub-transaction privacy applies here for GetView and Calculate exercises on Effect.I. So I would say that the provider of the Effect won’t
have “visibility on all sub-transactions triggered by Claim\ing an effect”.

I’ve modified a bit the test runIntermediatedLifecyclingNonAtomic on module Daml.Finance.Instrument.Generic.Test.Intermediated.BondCoupon in order to check all this.

  • In EffectSettlementService.ClaimAndSettle choice instead of creating a new effect with new providers I keep the same Effect (provider = issuer) for the lifecycling/settlement of csd/investor.
  • After running the lifecycling/settlement of csd/investor using the original Effect (provider = issuer), I see that sensitive information like holdings, instructions and batch is not revealed to the issuer (Effect’s provider)

Am I missing something or the statement in SetProviders documentation is not correct?

Thanks
Jose

Hi @jvelasco.intellecteu,

Thank you for spotting this. The documentation is indeed not correct, I will open a PR to fix it.

Matteo

1 Like