Skip to content
Discussions/App Development/Use of "own" accounts in FinLibForum ↗

Use of "own" accounts in FinLib

App Development4 posts237 views3 likesLast activity Jan 2022
HU
huwOP
Jan 2022

I have been reading the FinLib tutorial lib-finance/Tutorial.daml at 0b21a0723db01f63f7d6b16ed59ea8d37030219f · digital-asset/lib-finance · GitHub. I notice that in script5 Alice’s deposit is transferred to Acme’s “own” account. As a result a new Asset contract would be created in Acme’s own account. What would be the purpose of keeping this Asset contract around? Since the asset has now be transferred to another bank, should this contract be archived?

LU
Luciano
Jan 2022

Are you referring to these lines?

github.com

digital-asset/lib-finance/blob/0b21a0723db01f63f7d6b16ed59ea8d37030219f/model/src/DA/Finance/Tutorial.daml#L224-L227

      
        
  1. aliceToAcmeDepositCid <- submit alice do
  2. exerciseCmd aliceSettlementCid AssetSettlement_Transfer with
  3. receiverAccountId = acmeOwnAccountId
  4. depositCid = aliceDepositCid
GE
georg
Jan 2022

You are correct, assets in one’s “own account” can be removed.

Technically, this is possible due to the party being both, the provider and the owner of the deposit. So they have the authorization to archive the contract.

Economically, such a deposit represent a liability of the provider against itself, so it can be safely remove without effect on the balance sheet.

You can think of an investor “sending back” to the provider as giving up a deposit. That is, it represents a debit from their account. A deposit represents a liability for the provider, and an asset for the owner. After sending it back to the provider it therefore represents a liability of the provider against itself and can be removed.

Similarly, creating an asset it one’s own account, and sending it to a party represents the crediting of an account.

The reason it is modeled that way is that it fits well with the settlement contracts (ie. SettlementInstruction) and we don’t need to model separately the crediting and debiting of accounts.

HU
huw
Jan 2022

Yes that’s right. Apologies, should have put a link to that code in my question.

← Back to Discussions