## 4 Smart Money Corda Implementation
### Implementing Smart Money with R3 Corda  
R3 Corda is a permissioned and private distributed ledger technology platform specially designed for financial industry applications and with smart contract support [81]. In contrast to other DLT frameworks, transactions in Corda are only announced to the involved parties on a need-to-know basis (see Figure 2). Each node (labelled CWPx) records only those transactions that it is involved with (i.e., via the accounts registered in the node CWPx) with the exception of the HMRC node, which records all transactions. All communications in a Corda network take the form of small multiparty protocols, called flows [35]. The unique permission and access-control management adopted in Corda is aligned with the Smart Money approach in terms of data sharing, particularly with the MTS scheme, where payments become multilateral instead of bilateral transactions. One major difference between Corda and other permissioned DLT platforms is the adoption of notary nodes. These are special-purpose dedicated hosts which participate in the network and serve the purpose of time-stamping and preventing double-spends of funds. Corda supports the use of accounts within a node, which act as logical partitions of the state objects which belong to that node. This functionality, which is implemented via the _accounts_ library [82] enables the hosting of multiple entities within a single node and eliminates the need for each entity to host its own proprietary node. Accounts are employed for two purposes: representing CBDC wallets and implementing permissioned data access control. Wallets act as bank accounts and are assigned to Corda accounts. Thus, each wallet in a node is isolated from the other wallets in order to protect funds and personal data from eavesdropping or stealing. In the experiment, the _SellerCWP_ hosts multiple accounts for retail businesses and the _BuyerCWP_ hosts accounts for consumers. In the experiment, the _SellerCWP_ hosts multiple accounts for retail businesses, and the _BuyerCWP_ hosts accounts for consumers. For government departments, Corda accounts represent different administrative entities within an organisation, with a clear separation of duties. For HMRC in particular, there are two different accounts: _VATpayments_ and _VATnvestigator_. The former is involved exclusively with validating payments with respect to the tax compliance element, and the latter is used for requesting access to an account's data through a smart warrant. An event, such as issuing new money, transferring money, or submitting a data access request, represents an on-ledger event, or what is called a Corda state. This is the fundamental data block stored on the Corda ledger and constitutes an immutable record of a shared fact. When that fact has to be \"updated\", a new state is recorded, rendering the existing one as historic. The lifecycle of that fact over time is called a state sequence. The invoice state constructor in MTS is illustrated in Figure 3. In Smart Money, states represent paid and unpaid invoices, requested and accepted smart warrants, and money issued to end users. Corda contracts are rulesets that define how a Corda state can be updated to a new one. A contract is the \"control\" which ensures that a transaction has been fulfilled according to the pre-defined conditions. If the conditions in the contract are fulfilled, then the state update can take place and record itself on the ledger. When a supplier issues an invoice under MTS, their CWP initiates an invoice issue flow which executes all the necessary steps for completing the transaction in Corda, such as creating a new state, verifying signatures from interested parties, validating the transaction against matching contracts, and allocating funds to accounts. The Corda DL platform provides a toolset used to create a native token for representing assets that can be exchanged among the network participants.