canton-network-docs/Wallets and Exchanges
Memo Tags
To enable deposits to be sent to specific user accounts at exchanges, an account identifier needs to be sent to the exchange along with the transfer information. In Canton, this is implemented with the “memo tag” pattern.
Exchanges — using memo tags to receive and allocate funds
Memos are stored in the transfer metadata using thesplice.lfdecentralizedtrust.org/reason key. The Canton Network Token Standard defines this key and a way to parse these memo tags and other transfer information from transactions.
When ingesting transaction history, an exchange parses the splice.lfdecentralizedtrust.org/reason metadata key from incoming transfers to correlate a deposit with the internal account it should be allocated to.
Wallets — sending funds to exchanges using memo tags
Canton Coin Wallet
In the Canton Coin wallet, the “Description” field in the screenshot below must be used to communicate this account identifier in the format required by the exchange. For example: “AcmeExchange account: <exchangeInternalAccountId>”.
CN Token Standard Wallets
The token standard defines thesplice.lfdecentralizedtrust.org/reason metadata key for the purpose of communicating a human-readable description for the transfer (see CIP-0056).
Token standard wallets must provide a “Description” or “Reason” field analogous to the Canton Coin wallet, and store its value in the metadata field of the Transfer specification (code) when initiating a transfer. This is actually what the Canton Coin wallet does behind the scenes when initiating a Canton Coin transfer.
Likewise when displaying an incoming transfer or the tx history for a transfer the content of splice.lfdecentralizedtrust.org/reason metadata key should be parsed and displayed, as done for example by the transaction history parser in the token standard CLI (docs). This allows exchanges to communicate a correlation-id for a redemption.
Code sample for setting the right metadata field: see this change to the experimental token standard CLI to take the “reason” as command line argument and store it in the metadata field.
CN Token Registries
Token standard compliant registries must ensure that they pass theTransfer specification unchanged along when implementing multi-step transfers using the TransferInstruction interface (code).