How to claim a ElectionEffect passing 2 holdings?

I’m trying to claim an Daml.Finance.Lifecycle.ElectionEffect with choice ClaimEffect by passing 2 holdings (Investor@Custodian and Custodia@Registry) in order to get a single Batch for the 2 levels. However when the effect is calculated for the first holding in Daml.Finance.Lifecycle.Rule.Claim, the ElectionEffect is archived which makes the transaction fails.

I’ve noticed that Daml.Finance.Lifecycle.Effect behaves differently - the effect is not archived when it gets calculated.

I wonder what it would be a recommended approach to get a single Batch for 2 holdings with Daml.Finance.Lifecycle.ElectionEffect.


An Election, say A ∈ {A, B}, concerning a specific holder and a designated quantity, is transformed into an ElectionEffect for that particular quantity and the selected option A. Upon claiming the ElectionEffect, it is archived to prevent double spending. Without this safeguard, a holder might divide their holdings into two parts, electing A for one part and B for the other, and subsequently claim the economically more favorable outcome.

Currently, the library does not support applying an ElectionEffect consistently across the custodial hierarchy. Instead, the assumption is that the custodians ensure that the election is consistently applied, albeit non-atomically. Further investigation is needed to determine the most effective method for implementing this feature atomically across the hierarchy.

1 Like