Wholesale CBDC Chaincode Package

Oracle Blockchain Platform Digital Assets Edition includes sample chaincode for the wholesale central bank digital currency (CBDC) scenario.

The wholesale CBDC chaincode package is based on the extended Token Taxonomy Framework standard supported by Blockchain App Builder. The package implements methods for a system where tokens representing fiat currency are held at financial institutions and are issued and managed by regulated financial institutions. The sample specification file generates methods for initializing tokens, managing accounts, assigning roles, and completing operations such as minting, transferring, and burning tokens. It also provides notary accounts for approving minting and transfers, enforces compliance with account-level daily limits, and enables auditing procedures. The chaincode can be generated by Blockchain App Builder from the WholesaleCBDC.yml specification file in either TypeScript or Go.

The wholesale CBDC chaincode package is downloadable from the Oracle Blockchain Platform console, and includes the following components.
  • WholesaleCBDC.zip, an archive file that contains the packaged chaincode for deployment.
  • WholesaleCBDC.yaml, a specification file that you can use with Blockchain App Builder to scaffold the WholesaleCBDC chaincode.
  • WholesaleCBDC_postman_collection.json, a Postman collection that enables you to test the APIs in the chaincode.
  • README.md, a step-by-step guide for working with the chaincode.

To get the wholesale CBDC chaincode package, in the Oracle Blockchain Platform Digital Assets console click the Digital Assets tab and then select Wholesale CBDC Application.

You can try out the wholesale CBDC chaincode in the same way as other samples. You must be an administrator to install and deploy sample chaincodes.

  1. On the Wholesale Central Bank Digital Currency page, click Install.
  2. In the Install Chaincode window, specify one or more peers to install the chaincode on, and then click Install.
  3. Click Deploy.
  4. In the Deploy Chaincode window, specify the channel to deploy the chaincode to. The initial parameters of the chaincode will be used to specify the token administrator. These values are not editable. They default to the organization ID and user ID of the user who is logged in to the console. Click Deploy.
  5. Click Invoke.
  6. In the Invoke Chaincode window, specify the channel to run the transaction on. In the Action list, specify an action to complete. Click Execute.

Specification File

The wholesale CBDC specification file (Wholesale_CBDC.yml) is based on the extended Token Taxonomy Framework specification file. It includes a model attribute, which generates the application-specific chaincode. In this case, model: wcbdc creates additional methods for the wholesale CBDC application when the chaincode is generated. The following snippet from the specification file shows the model attribute.
#
# Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
#

assets:

# Token asset to manage the complete lifecycle of Wholesale CBDC token.

    - name: CBDC # Asset name
      type: token # Asset type
      standard: ttf+   # Token standard
      events: true # Supports event code generation for non-GET methods
      model: wcbdc # Supports creation of additional methods for Wholesale CBDC application

      anatomy:
          type: fungible # Token type 
          unit: fractional # Token unit

      behavior: # Token behaviors
          - divisible:
                decimal: 2 
          - mintable: 
                mint_approval_required: true 
          - transferable 
          - burnable:
                burn_approval_required: true 
          - holdable
          - roles:
                minter_role_name: minter
                burner_role_name: burner
                notary_role_name: notary
                mint_approver_role_name: notary
                burn_approver_role_name: notary