ex-bond-issuance
ex-bond-issuance copied to clipboard
Reference DAML application demonstrating a bond issuance use case.
Reference Application: Bond Issuance
Overview
Issuing a new bond is currently a fragmented process. A Distributed Ledger Technology (DLT) approach to bond issuance creates opportunity for Issuers, Auction Agents, CSDs (Central Securities Depositories), and Banks to reduce costs and risks associated with the process, while at the same time providing additional benefits.
Getting Started
Installing
Disclaimer: This reference application is intended to demonstrate the capabilities of the DAML. You are recommended to consider other non-functional aspects, like security, resiliency, recoverability, etc prior to production use.
Prerequisites
Be sure you have the following installed:
- DAML SDK
- Java
- Yarn
- Node v12
- Make
- Python Pipenv
Build the App
Type:
make build
Note: If you change the DAML models locally, you need to re-run this command before starting the application.
Starting the App
Note: Make sure you have built the application (see: Build the App).
These commands start the application with wall clock time. Note that Navigator's time widget won't work in this mode as one cannot modify the time.
- Start the DAML Sandbox. Type:
launchers/sandbox+jsonapi
- Start the automation logic by starting bots. Type:
launchers/automation
- Start the React UI. The UI will automatically open in a new browser tab at http://localhost:3000.
launchers/ui
Stopping the App
- Stop the triggers by pressing Ctrl+C.
- Stop the Sandbox by pressing Ctrl+C in the DAML assistant.
- Stop the ui by pressing Ctrl+C.
Resetting the Prototype
Reset the application by following these steps:
- Stop the app by following the steps in Stopping the App section.
- Start the app by following the steps in Starting the App section.
Working with DAML Hub
If you do have cli access, please follow these steps:
- Run the cli script, after setting your token with
dablc t
.
./dabl-deploy.sh
If you do not have cli access, please follow these steps:
-
Start a new project at DAML Hub. Upload the DARs to DAML Hub (in your new project, Deployments tab / Upload file, two files
target/bond-issuance*.dar
), deploy the model (bond-issuance.dar, Deploy Instance). -
Add the parties to the DAML Hub project: AuctionAgent, CSD, Bank1, Bank2, Bank3, Issuer, CentralBank, Regulator, Operator.
- Download
participants.json
(Ledger settings tab). - Download
parties.json
(Users tab).
- Download
-
Run the market setup:
daml script \
--participant-config participants.json \
--json-api \
--dar target/bond-issuance.dar \
--script-name DA.RefApps.Bond.MarketSetup.MarketSetupScript:setupMarketWithDablParties \
--input-file parties.json
- Run the triggers from the DAML Hub UI:
Bank1:
DA.RefApps.Bond.Triggers.InvestorSettlementTrigger:investorSettlementTrigger
DA.RefApps.Bond.Triggers.PlaceBidTrigger:placeBidTrigger
Bank2:
DA.RefApps.Bond.Triggers.InvestorSettlementTrigger:investorSettlementTrigger
DA.RefApps.Bond.Triggers.PlaceBidTrigger:placeBidTrigger
Bank3:
DA.RefApps.Bond.Triggers.InvestorSettlementTrigger:investorSettlementTrigger
DA.RefApps.Bond.Triggers.PlaceBidTrigger:placeBidTrigger
Issuer:
DA.RefApps.Bond.Triggers.CommissionTrigger:commissionTrigger
DA.RefApps.Bond.Triggers.RedemptionFinalizeTrigger:redemptionFinalizeTrigger
AuctionAgent:
DA.RefApps.Bond.Triggers.AuctionFinalizeTrigger:auctionFinalizeTrigger
CSD:
DA.RefApps.Bond.Triggers.RedemptionCalculationTrigger:redemptionCalculationTrigger
- Run
make daml-hub-package
. Uploadtarget/bondui.zip
to DAML Hub and deploy the UI. Follow "View site". Uploadparties.json
to the UI using the button on the login screen (Upload parties.json (tokens)). Receiving no error means you have succeeded.
Note: parties.json needs to be re-uploaded to the UI every time the tokens change.
User Guide
This User Guide will take you step-by-step through the whole bond issuance, bond auction, and redemption process. It will lead you through all the major UI screens and data fields that you will need to use.
Note: This demo is designed to show successful conclusion of the Bond Issuance workflow without exceptions or error conditions. A full production implementation would include additional features, handle errors and exceptions, and incorporate appropriate security controls.
Workflow
Roles and Responsibilities
Participants in the following roles are involved in the Bond Issuance workflow.
Role | Responsibilities |
Issuer | Requests creation of a new bond.
Defines parameters of a bond auction. Starts redemption of bond at maturity. |
CSD | Approves and issues a new bond.
Approves redemption of bonds at maturity. |
Auction Agent | Commissions the bond auction.
Invites bidding banks. Finalizes the auction. |
Bank | Bids on bonds in the auction. |
Central Bank | Backer of money on the ledger. |
Regulator | Has no functional obligation in the demo.
Acts as a passive observer of the proceess. |
Operator | System operator. |
There are three parties set up with the Bank role, other roles have a single corresponding party configured. Setting up a given role with different parties (e.g. having two parties with the Auction Agent role) would require changing the DAML models.
The Bond Issuance application includes these steps:
-
Market Setup: The application starts with an automated market setup process. Participants and their roles are created, relationships are set up, and Participants also have their cash account set up in the Central Bank, with an initial balance.
-
Bond Issuance: The entire issuance process is modeled in DAML, with transparency and accuracy. The Bond Issuer requests the issuance, and the CSD approves the request and issues the bond. The ledger keeps an immutable, auditable history of the bond issuance.
-
Create a Bond Auction: The entire auction logic is modeled in DAML, enforcing the actions of the Auction Agent and market participants. The process starts with the Issuer defining the key parameters of the bond auction, including the start and end date of the auction, and the minimum price for the bond. The Issuer submits the auction request to its Auction Agent. The Auction Agent reviews the auction parameters and can commission the auction.
-
Execute a Bond Auction: The application uses a Dutch auction to calculate winning bids and quantities. Invited banks can bid in the auction. The banks cannot see the minimum price for the auction, only the denomination and total quantity of available bonds. Banks can place multiple bids in the auction so that they have different bids at different prices.
All investors are guaranteed to be treated equally and according to the auction rules.
Note: The settlement is guaranteed to be successful if Investors have a valid bid at the close of the auction, as the Bond is already locked.
-
Redemption: The Issuer can start the redemption of a bond, where all bonds are redeemed, and the face value of the bond plus interest is paid to owners. The CSD must approve the redemption. Communication to all relevant market participants occurs in real time.
Running the Application
Choosing and Changing Roles
When you launch the Bond Issuance application, you will see the login screen where you can choose your party with the desired role.
To log in:
- On the home screen, select the party from the list (no password needs to be entered).
To switch users:
- In the top right corner, click on the logout icon.
- On the home screen, select a different party.
Market Setup
The participants listed above in Roles and Responsibilities are added automatically at market setup along with required reference data.
Creating a New Bond Issuance
This part of the workflow shows how to issue a new bond.
Entering New Bond Issuance Request
The Issuer creates a request for the CSD to issue a new bond with the parameters defined by the Issuer.
To request a new bond issuance:
- Log in as Issuer.
- Choose the Issuer Actions tab.
- Select the Issue Bond choice on the Issuer role contract.
- Fill out the new issuance parameters:
- Issue size: quantity of new bonds to be issued: e.g.:1000000
- Issue date: date for the issue date, e.g., today
- Currency: USD
- Denomination: bond’s value at maturity, and the initial price for the bond set for the auction. e.g.: 100
- Maturity date: Note that redemption of a bond is usually only possible on the defined maturity date, but the application does not model this. At redemption the face value of the bond plus the coupon rate is paid to the buyer.
- Coupon rate: rate expressed in numeric value for the duration of the bond: 0.01 = 1%
- Choose Okay.
Approving New Bond Issuance Request
Once the Issuer submitted a new bond issuance request, the CSD receives a notification of this request. The CSD needs to approve the bond issuance request to issue the bonds and assign the ISIN.
To approve:
- Log in as the CSD.
- Choose the Issuance and ISIN Request tab.
- Select the contract in the table view.
- View the parameters of the new issuance request.
- Add an ISIN (arbitrarily, e.g.: Bond007). Choose Accept.
Viewing New Bond Issue
The Issuer can view the newly issued Bonds.
To view:
-
Log in as the Issuer.
-
Go to the Balance view tab.
The newly issued bond will be visible.
Creating a New Bond Auction
Bond Auction is the process of taking a new bond issuance to the market. The application models the workflow of a Dutch auction in which the price of the offering is set after taking in all bids to determine the price at which the total offering can be sold. Banks place bids for the amount they are willing to buy in terms of quantity and price. Winners of the auction are announced after finalizing the results of all valid bids. In a real world implementation, the minimum price set by the Issuer is not visible to the bidding banks, only the denomination (face value) of the bond.
Creating a New Bond Auction Request
The Issuer can define the key parameters of the bond auction, including the start and end date of the auction and the minimum price for the bond. The Issuer then submits the auction request to its Auction Agent.
To create an auction request:
- Log in as the Issuer.
- Select the Issuer Actions tab.
- Select the Commission Auction choice.
- Enter parameters of New Bond Auction:
- Bond asset deposit: choose the name of the bond just issued, e.g.: Bond007
- Start date
- End date
- Minimum price: e.g: 96 (must be smaller the bond's denomination)
- Size: e.g.: 500000 (The size of the auction cannot be larger than the balance of available bonds).
- Choose Okay.
Commissioning New Bond Auction
The Auction Agent reviews the auction parameters and commissions the auction.
To commission the auction:
- Log in as the Auction Agent.
- Select the Auction Requests tab.
- Next to the Accept button, enter an auction name (e.g.: Auction001) and click the button.
Once the auction had been approved, the auction disappears from the Auction Request tab and appears in the Ongoing Auctions tab.
Inviting Banks to Auction
For the commissioned auction, the Auction Agent invites Banks to bid.
To invite Banks:
- Stay logged in as the Auction Agent.
- Select the Ongoing Auctions tab.
- In the row of the just started auction, select the Invite Bidders choice and invite the banks: 'Bank1, Bank2, Bank3'
- Choose Okay.
Viewing the Auction Invite
To view the invitation as a Bank:
-
Log in as any bank (Bank1, Bank2, Bank3).
-
Select the Ongoing Auctions tab.
Observe that the auction is now active.
Bidding and Finalizing Auction
Bidding on an Auction
Invited banks can start bidding on an auction. As discussed above, Banks cannot see the minimum price for the auction, only the denomination and total quantity of available bonds. They can place multiple bids for an auction to ensure that they have different bids at different prices.
To bid:
- Log in as a bank (Bank1, Bank2, or Bank3).
- Select the Ongoing Auctions tab.
- Next to the relevant auction, select the Place Bid choice and enter details:
- Price
- Quantity
- Choose Okay.
Repeat this process for other Banks or for multiple bids for the same Bank.
Finalizing an Auction
On the end date, the Auction Agent finalizes the auction and the automated delivery of bonds and cash occurs. When finalizing an auction, the application will automatically calculate the winning bids based on the Dutch auction logic. A bid that is under the minimum price will be regarded as an invalid bid.
To finalize:
- Log is as the *Auction Agent.
- Click on the Ongoing Auctions tab.
- Next to the auction, select the Finalize choice.
Committing Cash for Simultaneous Settlement of Cash and Bonds
A bank has a final step. It needs to commit its cash to approve the settlement if it wins the auction.
To commit cash:
- Log in as a bidding Bank.
- Select the Pending Settlements tab.
- Select the Settle choice for the relevant row.
Simultaneous delivery of cash from the bidding Banks account to the Issuer cash account in exchange of bonds will occur.
Redemption at Maturity
Kicking off the Redemption Process
To start the redemption:
- Log in as the Issuer.
- Select the Issuer Actions tab.
- Select the Redeem choice.
- Select the appropriate bond you would like to redeem.
- Choose Okay.
A redemption request is now sent to the CSD for its approval.
Approving the Redemption
When the Issuer kicks off the redemption process, the CSD needs to approve it. Upon the CSD’s approval the bonds will be redeemed, and all bonds created during the Issuance will be archived on the ledger. At the same time the Issuer pays back the cash for the denomination of the bond with the defined interest to the Banks cash account.
To approve:
- Log in as the CSD.
- Select the Redemption Requests tab.
- Select Accept.
Additional Exploration
After completing the workflow, you can explore the application to try other paths, submit higher or lower bids, revoke a bid once entered, and so on.
CONFIDENTIAL © 2019 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. Any unauthorized use, duplication or distribution is strictly prohibited.