# How do I represent a tokenized capital commitment that can be drawn-down by an issuer?

**URL:** <https://forum.canton.network/t/how-do-i-represent-a-tokenized-capital-commitment-that-can-be-drawn-down-by-an-issuer/6293>\
**Category:** App Development\
**Tags:** daml-finance\
**Created:** [March 16, 2023, 10:23pm UTC](https://forum.canton.network/t/how-do-i-represent-a-tokenized-capital-commitment-that-can-be-drawn-down-by-an-issuer/6293 "2023-03-16T22:23:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Levente\_Barczy](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/levente_barczy/32/544_2.png) [@Levente\_Barczy](https://forum.canton.network/u/Levente_Barczy)\
**Post date:** [March 16, 2023, 10:23pm UTC](https://forum.canton.network/t/how-do-i-represent-a-tokenized-capital-commitment-that-can-be-drawn-down-by-an-issuer/6293/1 "2023-03-16T22:23:38Z")

</div>

In Daml finance, I want to create a token that represents the commitment of $1 from the owner to the issuer, which the issuer may call on in the future. These calls will happen at the instrument level, on a pro-rata basis. E.g.:

I issue 100 of this token, which I sell to 3 investors:

- Alpha: 40
- Beta: 27
- Gamma: 33

And let’s say tomorrow, the issuer, on their whim, calls $20. This should:

- Debit Alpha $8.00;
- Debit Beta $5.40
- Debit Gamma $6.60
- Credit Issuer $20.00  
AND it should somehow change the token to reflect that 20% has been called.

What is the best place to store this available/used %? Some ideas:

_1. Store the Available pct in the claim_

So define the token as `Give $ Anytime afterToday $ Scale (Const 1.00) (One usd)’ and create an event that partially exercises this. E.g. in the above example, 1.00 → 0.80 (in a replacement) and $20 is transferred from the owners to the issuer during the Effect.

_2. Store the Available pct as an Observation_

_3. Store the Available pct in a separate contract_

…and associate this contract with a simple Token. Then capital calls sorta happen “outside” Daml finance.

Thanks!  
Levente

---

<div class="post-metadata">

**Author:** ![Matteo\_Limberto](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/matteo_limberto/32/2823_2.png) [@Matteo\_Limberto](https://forum.canton.network/u/Matteo_Limberto)\
**Post date:** [March 17, 2023, 2:15pm UTC](https://forum.canton.network/t/how-do-i-represent-a-tokenized-capital-commitment-that-can-be-drawn-down-by-an-issuer/6293/2 "2023-03-17T14:15:19Z")

</div>

Hi @Levente_Barczy,

This kind of commitment is quite hard to model in the contingent claims framework, as

- the choice is not binary (it depends on an `amount` that can be chosen)
- the commitment is highly recursive (you can call it a very large number of times by e.g. calling for $0.01 each time)

That said, two options come to mind:

Option 1 (using Daml Finance contracts entirely):

- Define the token as `Give $ Anytime afterToday $ One usd`.
- In order to claim the $20, the `issuer` shall
  - split Alpha’s holding into a holding for an amount of 8 and a holding for an amount of 32
  - use the first holding to create an election for an amount of 8
  - use the election to lifecycle the instrument and generate effects. The effect will consume the holding and transfer 8 USD to the issuer.
  - use the first holding to claim and settle the effects
  - repeat the process for beta and gamma

After this process, the investors will be left with the holding on the remaining amount, whereas the issuer has received the $20.

Option 2 (using a custom instrument)

- You can define a custom instrument template where you explicitly state the remaining amount (initially `1.0`)
- You define a custom lifecycle rule where the `issuer` enter an arbitrary amount and
  - create a new version of the instrument with the remaining amount (say `0.8`)
  - create an effect to consume the initial instrument, produce the new instrument, pay $0.2 to the issuer
  - claim and settle effects as usual, using the Daml Finance machinery

I hope this helps!  
Matteo

---

<div class="post-metadata">

**Author:** ![Matteo\_Limberto](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/matteo_limberto/32/2823_2.png) [@Matteo\_Limberto](https://forum.canton.network/u/Matteo_Limberto)\
**Post date:** [March 17, 2023, 2:21pm UTC](https://forum.canton.network/t/how-do-i-represent-a-tokenized-capital-commitment-that-can-be-drawn-down-by-an-issuer/6293/3 "2023-03-17T14:21:33Z")

</div>

You can have a look at the [Callable bond example](https://github.com/digital-asset/daml-finance/blob/551902906501dbf2acb7d88c10c0d52bb8618276/src/test/daml/Daml/Finance/Instrument/Generic/Test/CallableBond.daml) to understand how the mechanics of option 1 works.

---

<div class="post-metadata">

**Author:** ![Levente\_Barczy](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/levente_barczy/32/544_2.png) [@Levente\_Barczy](https://forum.canton.network/u/Levente_Barczy)\
**Post date:** [March 17, 2023, 2:36pm UTC](https://forum.canton.network/t/how-do-i-represent-a-tokenized-capital-commitment-that-can-be-drawn-down-by-an-issuer/6293/4 "2023-03-17T14:36:09Z")

</div>

Thanks, @Matteo_Limberto. One requirement I neglected to mention is that I do _not_ want to split the holdings when the capital call happens. Like I still need to drop dividends on the token itself, i.e. even after the $20 call, I want to drop the dividend to alpha, beta, and gamma based on the original 40-27-33 basis.

So your option 2 looks appealing; is there an example of this? Would it be similar to the tokenized fund in the sample app? (There’s a simple token, but there’s a Fund template that stores some data alongside the token.)

---

<div class="post-metadata">

**Author:** ![Matteo\_Limberto](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/matteo_limberto/32/2823_2.png) [@Matteo\_Limberto](https://forum.canton.network/u/Matteo_Limberto)\
**Post date:** [March 17, 2023, 8:00pm UTC](https://forum.canton.network/t/how-do-i-represent-a-tokenized-capital-commitment-that-can-be-drawn-down-by-an-issuer/6293/5 "2023-03-17T20:00:28Z")

</div>

The closest we have as an example and a good starting point would be the [Equity instrument](https://github.com/digital-asset/daml-finance/blob/551902906501dbf2acb7d88c10c0d52bb8618276/src/main/daml/Daml/Finance/Instrument/Equity/Instrument.daml#L22) and the corresponding [lifecycle rule to distribute dividends](https://github.com/digital-asset/daml-finance/blob/551902906501dbf2acb7d88c10c0d52bb8618276/src/main/daml/Daml/Finance/Lifecycle/Rule/Distribution.daml).

What you are trying to model is basically a “reverse dividend”, so I would suggest to

- start from the equity instrument and add a field for the remaining amount
- start from the Distribution rule and make it “reversed” so that the “dividend” is paid by the holding owner

Matteo

---

<div class="post-metadata">

**Author:** ![Levente\_Barczy](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/levente_barczy/32/544_2.png) [@Levente\_Barczy](https://forum.canton.network/u/Levente_Barczy)\
**Post date:** [March 20, 2023, 3:29pm UTC](https://forum.canton.network/t/how-do-i-represent-a-tokenized-capital-commitment-that-can-be-drawn-down-by-an-issuer/6293/6 "2023-03-20T15:29:27Z")

</div>

Thanks @Matteo_Limberto, that’s very helpful! So to be precise:

1. I’ll create a custom Implementation of the `Equity` interface, with exactly the same choices as the `Equity` Instrument you allude to above.
2. But the instrument will have a new field to represent the stuff I need for the capital calls (currency, uncalled amount, called amount).
3. The instrument will also have a new choice, `declareCapitalCall`, which as you point out will work exactly as a reverse dividend, except that it will modify the fields mentioned in 2. I like the idea of “giving” a a dividend that is a compulsion to pay.
