- Deploy DIT to a new ledger on Daml Hub
- Create the following parties:
UserAdmin
Bank
Ccp
Issuer
Exchange
Alice
Bob
- Download
parties.json
- Open deployed UI → Quick Setup
- Upload
parties.json
and click Next - Wait for all auto-approve triggers for all parties to deploy...
- Assign roles to specific parties:
- Exchange: Pick party
Exchange
- Market Clearing Service Contract (optional):
CCp
as provider,Bank
as custodian
- Market Clearing Service Contract (optional):
- Bank: Pick party
Bank
- Clearing House: Pick party
Ccp
- Clearing House Role Contract:
Bank
as the custodian andClearing-Bank
for the clearing account
- Clearing House Role Contract:
- Investor: Pick parties
Alice
andBob
- Custody Service Contract:
Bank
as provider - Trading Service Contract:
Exchange
as provider,Bank
as custodian and enterExchange-TradingAccount
for the trading account - Bidding Service Contract:
Bank
as provider and custodian, and enterBidding-TradingAccount
for the trading account - Clearing Service Contract (optional):
Ccp
as provider,Bank
as custodian and enterClearing-ClearingAccount
for clearing account
- Custody Service Contract:
- Issuer: Pick party
Issuer
- Custody Service Contract:
Bank
as provider - Issuance Service Contract:
Bank
as provider and custodian, and enterIssuance-optSafekeepingAccount
for the safekeeping account - Auction Service Contract:
Bank
as provider and custodian, enterAuction-TradingAccount
for the trading account and enterAuction-ReceivableAccount
for the receivable account
- Custody Service Contract:
- Exchange: Pick party
- Login as
Issuer
Issuer
: go to Setup and create a base instrument for USD- Account : Issuer-Bank-MainAuctionAccount
Issuer
: go to Setup and create a base instrument for BTC- Account : Issuer-Bank-MainAuctionAccount
Issuer
: go to Setup and create an issuance of USD- Issuance ID:
iss1
- Account : Issuer-Bank-MainAuctionAccount
- Quantity:
1000
- Issuance ID:
Issuer
: go to Setup and create an issuance of BTC- Issuance ID:
iss2
- Account : Issuer-Bank-MainAuctionAccount
- Quantity:
1000
- Issuance ID:
Auctioning off assets
Issuer
: go to Setup and create a new auction- Auctioned Asset :
BTC
- Quoted Asset :
USD
- Quantity :
500
- Floor Price :
300
- Auction ID :
auc1
- Auctioned Asset :
- Login as
Alice
- Go to "Wallet" and click on Alice-Bank-BiddingAccount
Alice
: Deposit 5000 US Dollars to account- Login as
Bank
Bank
: Go to Auctions, click on the auction opened by the Issuer, and Request Bid fromAlice
- Login as
Alice
Alice
: Go to Bidding Auctions, click on the auction, and submit a Bid- Quantity:
2
- Price:
500
- Publish Bid: ✅
- Quantity:
- Login as
Bank
- Go to auction, click
Close Auction
Setting up tradeable, collateralized markets
- Login as
Exchange
- On "Setup" page, click "Setup Automations"
- If you are planning to use Exberry, deploy the Exberry Adapter and set up the integration in the console.
- If you are not planning to use Exberry, deploy the
Matching Engine trigger
Exchange
: Go to Setup, Create New Listing- Traded Asset :
BTC
- Traded Asset Precision:
6
- Quoted Asset :
USD
- Quoted Asset Precision:
2
- Minimum Tradable Quantity:
1
- Maximum Tradable Quantity:
10000
- Symbol:
BTCUSD
- Description:
Bitcoin vs USD
- Cleared by:
-- Collateralized Market --
- Traded Asset :
- Login as
Alice
Alice
: Go to Wallet, click on row forAlice-Exchange-ExchangeTradingAccount
Alice
: Deposit 1000 USDAlice
: Go to BTCUSD Market, place an order- Buy
- Limit
- Time in Force :
Good Till Cancelled
- Price :
500
- Quantity :
2
- Login as
Bob
Bob
: Go to Wallet, click on row forBob-Exchange-ExchangeTradingAccount
, Deposit 500 BTCBob
: Go to BTCUSD Market, place an order (to partially matchAlice
's Buy)- Sell
- Limit
- Time in Force :
Good Till Cancelled
- Price :
500
- Quantity :
1.0
- Login as
Ccp
Ccp
: Go to Manage/Clearing and "Accept" Clearing Role- Clearing Account:
Clearing-Bank
- Clearing Account:
- Login as
Alice
Alice
: Go to Wallet, click on row forAlice-Ccp-ClearingAccount
, Deposit 10,000 USD- Login as
Bob
Bob
: Go to Wallet, click on row forBob-Ccp-ClearingAccount
, Deposit 10,000 USD
Perform successful margin call for Alice
- Login as
Ccp
Ccp
: onMembers
page, click "Perform Margin Call":- Customer:
Alice
- Amount: 5000
- Customer:
Fail and retry a margin calculation for Bob
Ccp
: onMembers
page, click "Perform Margin Call":- Customer :
Bob
- Amount : 12000
- Customer :
- Login as
Bob
Bob
: Go to Wallet, click on row forClearingBob-Bank
, Deposit 5000 USDBob
: Go to Clearing page, click "Retry" on failed Margin Call
Transfer funds from Alice to Bob via central countrerparty.
Ccp
: onMembers
page, click "Perform Mark to Market":- Customer:
Alice
- Amount: 5000
- Customer:
Ccp
: onMembers
page, click "Perform Mark to Market":- Customer :
Bob
- Amount : -5000
- Customer :
Setting up tradeable, cleared markets
- Login as
Exchange
Exchange
: Go to Setup, Create New Listing- Traded Asset :
BTC
- Traded Asset Precision:
6
- Quoted Asset :
USD
- Quoted Asset Precision:
2
- Minimum Tradable Quantity:
1
- Maximum Tradable Quantity:
10000
- Symbol:
BTCUSD-CLR
- Description:
Cleared Bitcoin vs USD
- Cleared by:
CCP
- Traded Asset :
- Login as
Alice
Alice
: Go to BTCUSD-CLR Market, place an order- Buy
- Limit
- Time in Force :
Good Till Cancelled
- Price :
500
- Quantity :
2
- Login as
Bob
Bob
: Go to BTCUSD-CLR Market, place an order (to partially matchAlice
's Buy)- Sell
- Market
- Time in Force :
Good Till Cancelled
- Quantity :
1.0
- Login as
Ccp
- On Manage/Clearing, click "Request FV" next to Exchange's Market.Clearing role
- Currency : USD