Bond Marketplace Chaincode Package
Oracle Blockchain Platform Digital Assets Edition includes sample chaincode for the bond NFT marketplace scenario.
The bond marketplace chaincode supports managing and trading bonds, represented by fractional non-fungible tokens (NFTs). You can use chaincode methods to issue, purchase, redeem, and trade bond NFTs in a decentralized environment.
BondMarketplace.zip
, an archive file that contains the packaged chaincode for deployment.BondMarketplace.yaml
, a specification file that you can use with Blockchain App Builder to scaffold theWholesaleCBDC
chaincode.BondMarketplace_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 bond marketplace chaincode package, in the Oracle Blockchain Platform Digital Assets console click the Digital Assets tab and then select Bond Marketplace Application.
Specification File
The bond marketplace specification file (Bond_Marketplace.yml
) is based on the extended ERC-1155 specification file. It includes a model
attribute, which generates the application-specific chaincode. In this case, model: bond
creates additional methods for the bond marketplace application when the chaincode is generated. Additionally, specific parameters must be set in the metadata section of the file.#
# Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
#
# Token asset to manage the complete lifecycle of a Bond in a primary Bond marketplace.
assets:
- name: Bond #Asset name
type: token #Asset type
standard: erc1155+ # Token standard
events: true # Supports event code generation for non-GET methods
model: bond # Supports creation of additional methods for Primary Bond marketplace
anatomy:
type: nonfungible # Token type
unit: fractional #Token unit
behavior: # Bond token behaviors
- divisible:
- mintable:
- transferable
- burnable
- roles:
minter_role_name: minter
burner_role_name: burner
properties: # Custom asset attributes for non-fungible Bond token.
- name: status # Custom asset attribute maintains the status of the Bond.
type: string
mandatory: true
metadata: # To maintain the metadata on-chain, this tag will be used. Users won't be able to update the metadata attribute values after the bond token is minted.
- name: ISIN # A unique alphanumeric code that identifies a specific bond internationally.
type: string
mandatory: true
- name: Segment # The classification of bonds based on issuer type or purpose, such as corporate, government, sovereign, or green bonds.
type: string
- name: Issuer # The entity, such as a corporation or government, that issues the bond.
type: string
mandatory: true
- name: FaceValue # The principal amount of the bond that will be repaid at maturity.
type: number
mandatory: true
- name: IssueSize # The total monetary value or quantity of bonds issued by the issuer.
type: number
mandatory: true
- name: CouponRate # The annual interest rate that the bond pays, typically as a percentage of the face value.
type: float
mandatory: true
- name: InterestPaymentType # Specifies whether the bond pays simple or compound interest.
type: string
mandatory: true
validate: /^\\s*(simple)\\s*$/
- name: InterestFrequency # The regularity with which interest payments are made, such as monthly, quarterly, annually or at maturity.
type: string
mandatory: true
validate: /^\s*["]?((monthly|quarterly|annually|at maturity)\s*)["]?\s*$/
- name: IssueDate # The date when the bond was initially issued.
type: date
mandatory: true
- name: MaturityDate # The date on which the bond’s principal amount will be repaid to the bondholder.
type: date
mandatory: true
customMethods:
Table 4-1 Metadata Parameters for the Bond Marketplace Specification File
Entry | Description |
---|---|
name: ISIN |
A string that is a unique 12-character alphanumeric code that identifies a bond. |
name: Segment |
A string that represents the segment type of the bond. |
name: Issuer |
A string that represents the issuer of the bond. |
name: FaceValue |
A number that represents the face value (price) of the bond token. |
name: IssueSize |
A number that represents the issue size (total quantity) of the bond. |
name: CouponRate |
A number that represents the coupon rate (interest rate) of the bond. It must be a per annum rate. |
name: InterestRateType |
A string that represents the interest payment type. The only supported value is simple .
|
name: InterestFrequency |
A string that represents the interest frequency of the bond token. The following list shows the supported values.
|
name: IssueDate |
A date that represents the issue date of the bond. |
name: MaturityDate |
A date that represents the maturity date of the bond. |