Can an account hold multiple assets? If yes, how do transactions get recorded for each asset? If no, should we create multiple accounts, one for each asset?


Yes, an account can 'hold' and 'issue' multiple assets.

Any account can create an asset, say for example: "USD". What makes this asset unique is not the asset code, but the combination of the code and the issuing account's id.

An asset can be better defined as:

asset_code: USD

Where account_id us the issuing accounts public key.

So, if multiple accounts can have the same code ("USD"), then you have to be able to tell which one is which, and which one is worth something to you. Otherwise anyone could 'make' "USD" and send it to you.

This is where Trustlines come into play.

Before your account can 'hold' any asset, you have to set it a trustline for that asset code to the issuing account. All this means is that your account is ready and willing to receive that particular asset. It can be sent to your account from any other account, but it's the same code:account_id combination, not some other worthless asset with the same code.

In other words, it's up to you which anchors you trust to back it up an asset with fiat USD. Much the same way banks are supposed to back up notes with gold, etc.

An issuing account can create as many different assets as you like (I don't know of any enforced limit).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.