SlideShare une entreprise Scribd logo
1  sur  19
Télécharger pour lire hors ligne
Modeling blockchain applications
Turning business concepts into technical concepts
V1.02, 4 October 2019
IBM Blockchain Platform Technical Series
Architectural Good Practices
Modeling Blockchain Applications
What’s New in Technology
Using IBM Blockchain Platform
Technical Introduction
What is modeling
Understand the concepts behind
modelling and why modeling is important
Modeling in blockchain
Modeling the artefacts for a
blockchain solution
Using models
Models and the process of
invoking transactions
3
Blockchain topics
• Consider the topics we’ve discussed for blockchain
solutions so far:
• The business problem we’re trying to solve
• The participants involved (users and organizations)
• The assets
• The transactions, underpinned by contracts
• The goal now is to move these topics into to a machine
readable form and eventual deployment to a blockchain
system
4
Example: Commercial Paper
123 Fake Street,
New York, New York
28th
February 2019
I promise to pay to the
order of the bearer the sum
of $1,000,000 on or after
28th February 2020.
MagnetoCorp
Matt Lucas
On behalf of MagnetoCorp
Matt Lucas
• Commercial paper is a means of providing short
term financing to companies
• Trust requirement and well-defined business
network make a good fit for blockchain
Business Problem?
Participants?
• MagnetoCorp (Issuing organization)
• Matt Lucas (MagnetoCorp employee)
• “the bearer” (could be many of these)
Assets?
• The Commercial Paper (!)
• $1,000,000
Transactions?
• Issue Buy RedeemID:
0000475923
5
Commercial Paper: Transaction Lifecycle
Matt
Lucas
MagnetoCorp
issue
(omitting cash flows)
bearer1
bearer2
bearer3
BearerN
redeem
buy
buy
buy
6
Commercial Paper: Cash Lifecycle
Matt
Lucas
MagnetoCorp
issue
bearer1
bearer2
bearer3
BearerN
redeem
buy buy
buy
$975,000
$950,000
$925,000
$900,000
$1,000,000
7
Example: Commercial Paper
• Commercial paper is a means of providing short
term financing to companies
• Trust requirement and well-defined business
network makes a good fit for blockchain
Business Problem?
Participants?
• Magnetocorp (Issuing organization)
• Matt Lucas (Magnetocorp employee)
• “the bearer” (could be many of these)
Assets?
• The Commercial Paper
• $1,000,000
Transactions?
• Issue Buy Redeem
Q: How do we get
from these business
concepts to something
that can run on a
blockchain?
A: We will model them
8
Modeling is the mapping of business concepts into
technical concepts…
• Models don’t need to be complete, but they need to be sufficient to solve the problem at hand
• e.g. You don’t need to model each cylinder of an engine if you’re tracking the overall owner of a car
Assets Contracts Transactions Business Networks Participants
Data structures in a
pre-agreed format
Algorithm to modify
asset state
Single invocation of a
contract’s algorithm
Computer network
topology (c.f. internet)
Digital certificate for
each user/organization
9
Modeling assets
• Assets correspond to data that is stored in the blockchain “world state”
– World state is just a database; assets can be created, modified and deleted
• Approach: Business network agrees the attributes of the assets that will be shared and a blockchain solution architect
models them using an appropriate language
– E.g. UML, JSON schema, class definition, CTO file
Commercial Paper
ID: 0000475923
Issuer: MagnetoCorp
Owner: MagnetoCorp
Face value: $1,000,000
Maturity date: 2020-02-28
Attributes“Physical” asset Model definition World state
{“0000475923”,
“MagnetoCorp”,
“MagnetoCorp”,
“1000000”,
“2020-02-28”}
Instance
“commercialPaper” : {
“id”: “string”,
“issuer”: “string”,
”owner”: “string”,
”faceValue”: “integer”,
”maturityDate”: “date” }
10
Modeling contracts & transactions
• Contracts are the actions that modify assets in the world state
– Algorithms with inputs and outputs
– Should use modelled assets
• Each invocation of a contract is a transaction and logged on the
blockchain
– Once recorded on the blockchain, transaction logs cannot
be modified or deleted
• Hyperledger Fabric calls the code that implements contract logic
chaincode.
Creates a new commercial paper instance
Inputs: issuer, ID, issue date/time, maturity date/time, face value
Outputs: None
Design: Once created, the new asset’s details are stored in the world state
Transfers ownership of a commercial paper instance
Inputs: issuer, ID, current owner, new owner, price, issue date/time,
maturity date/time, face value
Outputs: None
Design:
The seller’s cash balance is incremented by the price
The buyer’s cash balance is decremented by the price
The buyer becomes the owner of the commercial paper
Update the commercial paper instance in the world state
Transfers cash matching the redemption value to the current owner
Inputs: issuer, ID, current owner, redemption date/time
Outputs: None
Design:
The paper must not have already been redeemed
The issuer’s cash balance is decremented by the redemption value
The owner’s cash balance is incremented by the redemption value
The paper is marked as redeemed
Update the commercial paper instance in the world state
Redeem
Buy
Issue
11
A contract hierarchy
• Consider a contract hierarchy for
similar contracts
– Allows you to split capabilities
based on role (e.g. regulator may
only need query operations)
• Standard object-orientation good
practice applies
– Hierarchies can be simple
sub/super class relationships, or
more complex
Contract
Superclass from
which all
deployed
contracts inherit
Commercial
Paper
Contract
Implementation of
• Query
Modifiable
Commercial
Paper
Contract
Implementation of
• Buy
• Redeem
• Issue
Deploying different subclasses to different peers in Hyperledger Fabric
requires flexible deployment model, planned for future release
12
Contracts vs. models vs. chaincode
• Chaincode should be closely linked to legal contracts and models
• They could be thought of as being different renderings of the same information for different constituencies
• Explicit links between the three artefacts can ensure correctness of implementation
• For Hyperledger Fabric, these three artefacts can be collectively thought of as the smart contract
Commercial Paper
Issuer:
Owner:
Face value:
$
Matures: YY-mm-
dd
Cash
Issuer:
Owner:
Face value:
$
Issue
Buy
Redeem
ISSUER: {{cp.issuer}} states
that it will pay the OWNER
{{cp.owner}} AMOUNT
{{cp.face_value}} on or after
MATURITY DATE
{{cp.date}}.
Legal Contract Model Chaincode
For the lawyer For the business user For the developer
13
Modeling the business network
• Organizations in the business network map to peers in a technical network
• Peers maintain a consistent ledger and world state, and signs, executes and validates
transactions
– They are run as network services, similar to web servers on the internet
– Hosted by members of the business network or by third-party cloud providers
– Gateway peers provide the entry point to the network for client applications
• It is overly simplistic to assume a 1:1 mapping between organizations and peers
– Larger organizations usually have multiple peers for high availability
– Smaller organizations might delegate responsibility for managing peers and
signing transactions to another organization
• Maybe even an organization that is not part of the business network!
– Peers shared across organizations are sometimes referred to as trust anchors
14
Modeling users and organizations
• Every organization, user and system component has an identity in the blockchain network
– Used for identifying actors in the network, signing and encrypting information
• There are standard ways of expressing identity (e.g. X.509 certificates)
• Things to consider:
– Who is a user in the blockchain system
– How certificates are issued (and revoked)
– The relationship between users and organizations, and between organizations
15
(Simplified) transaction process
1. Each administrator deploys chaincode to peers in the
network
2. The end-user application connects to a gateway peer
3. The application queries the available chaincodes on the peer
4. The application invokes an available chaincode with a set of
input parameters
5. The blockchain network executes the chaincode, agrees the
output and updates the ledger/world state on all peers
6. The peer notifies the application is notified that the
transaction has been completed
16
Some of the big questions still to cover…
• Which peers - how to handle privacy
and confidentiality?
• How does this process work?
• Is the process the same for all
blockchain implementations?
• How does the blockchain prevent
tampering?
• Why is it called a blockchain anyway?
1. Each administrator deploys chaincode to peers in the
network
2. The end-user application connects to a gateway peer
3. The application queries the available chaincodes on the peer
4. The application invokes an available chaincode with a set of
input parameters
5. The blockchain network executes the chaincode, agrees the
output and updates the ledger/world state on all peers
6. The peer notifies the application is notified that the
transaction has been completed
17
Summary
• Modeling is the art of mapping business concepts into technical concepts
• It is useful to model blockchain solution elements, as it helps pave the way to the implementation and
helps stakeholders understand the solution
– Assets
– Contracts
– Transactions
– Business Networks
– Participants
Thank you
www.ibm.com/blockchain
developer.ibm.com/blockchain
www.hyperledger.org
© Copyright IBM Corporation 2019. All rights reserved. The information contained in these
materials is provided for informational purposes only, and is provided AS IS without warranty
of any kind, express or implied. Any statement of direction represents IBM's current intent, is
subject to change or withdrawal, and represents only goals and objectives. IBM, the IBM
logo, and other IBM products and services are trademarks of the International Business
Machines Corporation, in the United States, other countries or both. Other company, product,
or service names may be trademarks or service marks of others.
Modeling Blockchain Applications

Contenu connexe

Tendances

IBM Blockchain Platform - Architectural Good Practices v1.0
IBM Blockchain Platform - Architectural Good Practices v1.0IBM Blockchain Platform - Architectural Good Practices v1.0
IBM Blockchain Platform - Architectural Good Practices v1.0Matt Lucas
 
IBM Blockchain Solutions Explained v0.6
IBM Blockchain Solutions Explained v0.6IBM Blockchain Solutions Explained v0.6
IBM Blockchain Solutions Explained v0.6Matt Lucas
 
IBM - Blockchain Explained - Introduction for Business
IBM - Blockchain Explained - Introduction for BusinessIBM - Blockchain Explained - Introduction for Business
IBM - Blockchain Explained - Introduction for BusinessIBM Sverige
 
Globalizing the world supply chain and the ibm blockchain platform short v.2
Globalizing the world  supply chain and the ibm blockchain platform short v.2Globalizing the world  supply chain and the ibm blockchain platform short v.2
Globalizing the world supply chain and the ibm blockchain platform short v.2LennartF
 
Ibm blockchain - Hyperledger 15.02.18
Ibm blockchain - Hyperledger 15.02.18Ibm blockchain - Hyperledger 15.02.18
Ibm blockchain - Hyperledger 15.02.18TelecomValley
 
IBM Cloud Côte D'Azur Meetup - 20181004 - Blockchain Hyperledger Workshop
IBM Cloud Côte D'Azur Meetup - 20181004 - Blockchain Hyperledger WorkshopIBM Cloud Côte D'Azur Meetup - 20181004 - Blockchain Hyperledger Workshop
IBM Cloud Côte D'Azur Meetup - 20181004 - Blockchain Hyperledger WorkshopIBM France Lab
 
Ibm blockchain platform explained
Ibm blockchain platform explained Ibm blockchain platform explained
Ibm blockchain platform explained LennartF
 
IBM Cloud Côte d'Azur Meetup - Blockchain Business Processes & Rule-based Sm...
IBM Cloud Côte d'Azur Meetup - Blockchain Business Processes &  Rule-based Sm...IBM Cloud Côte d'Azur Meetup - Blockchain Business Processes &  Rule-based Sm...
IBM Cloud Côte d'Azur Meetup - Blockchain Business Processes & Rule-based Sm...IBM France Lab
 
Ibp 2010 feb nyc sf meetup
Ibp 2010 feb nyc sf meetupIbp 2010 feb nyc sf meetup
Ibp 2010 feb nyc sf meetupLennartF
 
Blockchain explained cata
Blockchain explained   cataBlockchain explained   cata
Blockchain explained cataMogul Marketing
 
Globalizing the world supply chain and the ibm blockchain platform v.2
Globalizing the world  supply chain and the ibm blockchain platform v.2Globalizing the world  supply chain and the ibm blockchain platform v.2
Globalizing the world supply chain and the ibm blockchain platform v.2LennartF
 
Getting started with bc 2.0 in the cloud
 Getting started with bc 2.0 in the cloud Getting started with bc 2.0 in the cloud
Getting started with bc 2.0 in the cloudLennartF
 
Getting Started with Cloud Foundry on Bluemix
Getting Started with Cloud Foundry on BluemixGetting Started with Cloud Foundry on Bluemix
Getting Started with Cloud Foundry on BluemixDev_Events
 
IBM Blockchain Usecase - Nov 2016
IBM Blockchain Usecase - Nov 2016IBM Blockchain Usecase - Nov 2016
IBM Blockchain Usecase - Nov 2016IBM Thailand Co Ltd
 
Making Blockchain Real for Business at the "z Systems Agile Enterprise Develo...
Making Blockchain Real for Business at the "z Systems Agile Enterprise Develo...Making Blockchain Real for Business at the "z Systems Agile Enterprise Develo...
Making Blockchain Real for Business at the "z Systems Agile Enterprise Develo...DevOps for Enterprise Systems
 
Intro blockchain beyond confidential compute. views from oasis labs, ibm and...
Intro  blockchain beyond confidential compute. views from oasis labs, ibm and...Intro  blockchain beyond confidential compute. views from oasis labs, ibm and...
Intro blockchain beyond confidential compute. views from oasis labs, ibm and...LennartF
 

Tendances (20)

IBM Blockchain Platform - Architectural Good Practices v1.0
IBM Blockchain Platform - Architectural Good Practices v1.0IBM Blockchain Platform - Architectural Good Practices v1.0
IBM Blockchain Platform - Architectural Good Practices v1.0
 
IBM Blockchain Solutions Explained v0.6
IBM Blockchain Solutions Explained v0.6IBM Blockchain Solutions Explained v0.6
IBM Blockchain Solutions Explained v0.6
 
IBM - Blockchain Explained - Introduction for Business
IBM - Blockchain Explained - Introduction for BusinessIBM - Blockchain Explained - Introduction for Business
IBM - Blockchain Explained - Introduction for Business
 
Globalizing the world supply chain and the ibm blockchain platform short v.2
Globalizing the world  supply chain and the ibm blockchain platform short v.2Globalizing the world  supply chain and the ibm blockchain platform short v.2
Globalizing the world supply chain and the ibm blockchain platform short v.2
 
Ibm blockchain - Hyperledger 15.02.18
Ibm blockchain - Hyperledger 15.02.18Ibm blockchain - Hyperledger 15.02.18
Ibm blockchain - Hyperledger 15.02.18
 
IBM Cloud Côte D'Azur Meetup - 20181004 - Blockchain Hyperledger Workshop
IBM Cloud Côte D'Azur Meetup - 20181004 - Blockchain Hyperledger WorkshopIBM Cloud Côte D'Azur Meetup - 20181004 - Blockchain Hyperledger Workshop
IBM Cloud Côte D'Azur Meetup - 20181004 - Blockchain Hyperledger Workshop
 
Ibm blockchain platform explained
Ibm blockchain platform explained Ibm blockchain platform explained
Ibm blockchain platform explained
 
IBM Cloud Côte d'Azur Meetup - Blockchain Business Processes & Rule-based Sm...
IBM Cloud Côte d'Azur Meetup - Blockchain Business Processes &  Rule-based Sm...IBM Cloud Côte d'Azur Meetup - Blockchain Business Processes &  Rule-based Sm...
IBM Cloud Côte d'Azur Meetup - Blockchain Business Processes & Rule-based Sm...
 
Ibp 2010 feb nyc sf meetup
Ibp 2010 feb nyc sf meetupIbp 2010 feb nyc sf meetup
Ibp 2010 feb nyc sf meetup
 
Blockchain explained cata
Blockchain explained   cataBlockchain explained   cata
Blockchain explained cata
 
Making blockchain real for business
Making blockchain real for businessMaking blockchain real for business
Making blockchain real for business
 
Introduction to Blockchain
Introduction to BlockchainIntroduction to Blockchain
Introduction to Blockchain
 
Globalizing the world supply chain and the ibm blockchain platform v.2
Globalizing the world  supply chain and the ibm blockchain platform v.2Globalizing the world  supply chain and the ibm blockchain platform v.2
Globalizing the world supply chain and the ibm blockchain platform v.2
 
Getting started with bc 2.0 in the cloud
 Getting started with bc 2.0 in the cloud Getting started with bc 2.0 in the cloud
Getting started with bc 2.0 in the cloud
 
Getting Started with Cloud Foundry on Bluemix
Getting Started with Cloud Foundry on BluemixGetting Started with Cloud Foundry on Bluemix
Getting Started with Cloud Foundry on Bluemix
 
IBM Blockchain Usecase - Nov 2016
IBM Blockchain Usecase - Nov 2016IBM Blockchain Usecase - Nov 2016
IBM Blockchain Usecase - Nov 2016
 
Cloud Customer Architecture for Blockchain
Cloud Customer Architecture for BlockchainCloud Customer Architecture for Blockchain
Cloud Customer Architecture for Blockchain
 
Hyperledger: Advancing Blockchain Technology for Business
Hyperledger: Advancing Blockchain Technology for BusinessHyperledger: Advancing Blockchain Technology for Business
Hyperledger: Advancing Blockchain Technology for Business
 
Making Blockchain Real for Business at the "z Systems Agile Enterprise Develo...
Making Blockchain Real for Business at the "z Systems Agile Enterprise Develo...Making Blockchain Real for Business at the "z Systems Agile Enterprise Develo...
Making Blockchain Real for Business at the "z Systems Agile Enterprise Develo...
 
Intro blockchain beyond confidential compute. views from oasis labs, ibm and...
Intro  blockchain beyond confidential compute. views from oasis labs, ibm and...Intro  blockchain beyond confidential compute. views from oasis labs, ibm and...
Intro blockchain beyond confidential compute. views from oasis labs, ibm and...
 

Similaire à Modeling Blockchain Applications

Blockchain explained
Blockchain explainedBlockchain explained
Blockchain explainedIBM Sverige
 
Introduction to Hyperledger Composer
Introduction to Hyperledger ComposerIntroduction to Hyperledger Composer
Introduction to Hyperledger ComposerSimon Stone
 
Ibm system storage solutions handbook
Ibm system storage solutions handbook Ibm system storage solutions handbook
Ibm system storage solutions handbook Diego Alberto Tamayo
 
Blockchain architected
Blockchain architectedBlockchain architected
Blockchain architectedIBM Sverige
 
An introduction to blockchain and hyperledger v ru
An introduction to blockchain and hyperledger v ruAn introduction to blockchain and hyperledger v ru
An introduction to blockchain and hyperledger v ruLennartF
 
Blockchain for Business
Blockchain for BusinessBlockchain for Business
Blockchain for BusinessAhmad Gohar
 
Iata blockchain presentation icaew suisse branch
Iata blockchain presentation   icaew suisse branchIata blockchain presentation   icaew suisse branch
Iata blockchain presentation icaew suisse branchTim Moss
 
Blockchain and the investment industry stack
Blockchain and the investment industry stackBlockchain and the investment industry stack
Blockchain and the investment industry stackDavid Taylor
 
Introduction to Blockchain Business Models
Introduction to Blockchain Business ModelsIntroduction to Blockchain Business Models
Introduction to Blockchain Business ModelsGokul Alex
 
Ibp technical introduction
Ibp technical introductionIbp technical introduction
Ibp technical introductionLennartF
 
Making blockchain works for business
Making blockchain works for businessMaking blockchain works for business
Making blockchain works for businessPatrick Yong
 
Blockchain in enterprise - Challenges, Considerations and Designs
Blockchain in enterprise - Challenges, Considerations and DesignsBlockchain in enterprise - Challenges, Considerations and Designs
Blockchain in enterprise - Challenges, Considerations and DesignsMichael Chi
 
D1.reader wallet p1nruuvdowld_1.0_final
D1.reader wallet p1nruuvdowld_1.0_finalD1.reader wallet p1nruuvdowld_1.0_final
D1.reader wallet p1nruuvdowld_1.0_finalNadia Fabrizio
 
Making Blockchain Real for Business - Kathryn Harrison (IBM, Middle East and ...
Making Blockchain Real for Business - Kathryn Harrison (IBM, Middle East and ...Making Blockchain Real for Business - Kathryn Harrison (IBM, Middle East and ...
Making Blockchain Real for Business - Kathryn Harrison (IBM, Middle East and ...ideaport
 
Making Blockchain Real for Business Explained - ibm
Making Blockchain Real for Business Explained - ibmMaking Blockchain Real for Business Explained - ibm
Making Blockchain Real for Business Explained - ibmDiego Alberto Tamayo
 
Blockchain explained-v2.09
Blockchain explained-v2.09Blockchain explained-v2.09
Blockchain explained-v2.09Milan Hazra
 
Overcoming the Barriers to Blockchain Adoption
Overcoming the Barriers to Blockchain AdoptionOvercoming the Barriers to Blockchain Adoption
Overcoming the Barriers to Blockchain AdoptionMongoDB
 

Similaire à Modeling Blockchain Applications (20)

Blockchain explained
Blockchain explainedBlockchain explained
Blockchain explained
 
Digital Transformation and Blockchain
Digital Transformation and BlockchainDigital Transformation and Blockchain
Digital Transformation and Blockchain
 
Introduction to Hyperledger Composer
Introduction to Hyperledger ComposerIntroduction to Hyperledger Composer
Introduction to Hyperledger Composer
 
Ibm system storage solutions handbook
Ibm system storage solutions handbook Ibm system storage solutions handbook
Ibm system storage solutions handbook
 
Blockchain architected
Blockchain architectedBlockchain architected
Blockchain architected
 
An introduction to blockchain and hyperledger v ru
An introduction to blockchain and hyperledger v ruAn introduction to blockchain and hyperledger v ru
An introduction to blockchain and hyperledger v ru
 
Blockchain for Business
Blockchain for BusinessBlockchain for Business
Blockchain for Business
 
Iata blockchain presentation icaew suisse branch
Iata blockchain presentation   icaew suisse branchIata blockchain presentation   icaew suisse branch
Iata blockchain presentation icaew suisse branch
 
Blockchain and the investment industry stack
Blockchain and the investment industry stackBlockchain and the investment industry stack
Blockchain and the investment industry stack
 
Introduction to Blockchain Business Models
Introduction to Blockchain Business ModelsIntroduction to Blockchain Business Models
Introduction to Blockchain Business Models
 
Blockchain for the Enterprise
Blockchain for the EnterpriseBlockchain for the Enterprise
Blockchain for the Enterprise
 
Ibp technical introduction
Ibp technical introductionIbp technical introduction
Ibp technical introduction
 
Making blockchain works for business
Making blockchain works for businessMaking blockchain works for business
Making blockchain works for business
 
Blockchain in enterprise - Challenges, Considerations and Designs
Blockchain in enterprise - Challenges, Considerations and DesignsBlockchain in enterprise - Challenges, Considerations and Designs
Blockchain in enterprise - Challenges, Considerations and Designs
 
D1.reader wallet p1nruuvdowld_1.0_final
D1.reader wallet p1nruuvdowld_1.0_finalD1.reader wallet p1nruuvdowld_1.0_final
D1.reader wallet p1nruuvdowld_1.0_final
 
Making Blockchain Real for Business - Kathryn Harrison (IBM, Middle East and ...
Making Blockchain Real for Business - Kathryn Harrison (IBM, Middle East and ...Making Blockchain Real for Business - Kathryn Harrison (IBM, Middle East and ...
Making Blockchain Real for Business - Kathryn Harrison (IBM, Middle East and ...
 
Blockchain Explained for Devlopers
Blockchain Explained for DevlopersBlockchain Explained for Devlopers
Blockchain Explained for Devlopers
 
Making Blockchain Real for Business Explained - ibm
Making Blockchain Real for Business Explained - ibmMaking Blockchain Real for Business Explained - ibm
Making Blockchain Real for Business Explained - ibm
 
Blockchain explained-v2.09
Blockchain explained-v2.09Blockchain explained-v2.09
Blockchain explained-v2.09
 
Overcoming the Barriers to Blockchain Adoption
Overcoming the Barriers to Blockchain AdoptionOvercoming the Barriers to Blockchain Adoption
Overcoming the Barriers to Blockchain Adoption
 

Dernier

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 

Dernier (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 

Modeling Blockchain Applications

  • 1. Modeling blockchain applications Turning business concepts into technical concepts V1.02, 4 October 2019 IBM Blockchain Platform Technical Series Architectural Good Practices Modeling Blockchain Applications What’s New in Technology Using IBM Blockchain Platform Technical Introduction
  • 2. What is modeling Understand the concepts behind modelling and why modeling is important Modeling in blockchain Modeling the artefacts for a blockchain solution Using models Models and the process of invoking transactions
  • 3. 3 Blockchain topics • Consider the topics we’ve discussed for blockchain solutions so far: • The business problem we’re trying to solve • The participants involved (users and organizations) • The assets • The transactions, underpinned by contracts • The goal now is to move these topics into to a machine readable form and eventual deployment to a blockchain system
  • 4. 4 Example: Commercial Paper 123 Fake Street, New York, New York 28th February 2019 I promise to pay to the order of the bearer the sum of $1,000,000 on or after 28th February 2020. MagnetoCorp Matt Lucas On behalf of MagnetoCorp Matt Lucas • Commercial paper is a means of providing short term financing to companies • Trust requirement and well-defined business network make a good fit for blockchain Business Problem? Participants? • MagnetoCorp (Issuing organization) • Matt Lucas (MagnetoCorp employee) • “the bearer” (could be many of these) Assets? • The Commercial Paper (!) • $1,000,000 Transactions? • Issue Buy RedeemID: 0000475923
  • 5. 5 Commercial Paper: Transaction Lifecycle Matt Lucas MagnetoCorp issue (omitting cash flows) bearer1 bearer2 bearer3 BearerN redeem buy buy buy
  • 6. 6 Commercial Paper: Cash Lifecycle Matt Lucas MagnetoCorp issue bearer1 bearer2 bearer3 BearerN redeem buy buy buy $975,000 $950,000 $925,000 $900,000 $1,000,000
  • 7. 7 Example: Commercial Paper • Commercial paper is a means of providing short term financing to companies • Trust requirement and well-defined business network makes a good fit for blockchain Business Problem? Participants? • Magnetocorp (Issuing organization) • Matt Lucas (Magnetocorp employee) • “the bearer” (could be many of these) Assets? • The Commercial Paper • $1,000,000 Transactions? • Issue Buy Redeem Q: How do we get from these business concepts to something that can run on a blockchain? A: We will model them
  • 8. 8 Modeling is the mapping of business concepts into technical concepts… • Models don’t need to be complete, but they need to be sufficient to solve the problem at hand • e.g. You don’t need to model each cylinder of an engine if you’re tracking the overall owner of a car Assets Contracts Transactions Business Networks Participants Data structures in a pre-agreed format Algorithm to modify asset state Single invocation of a contract’s algorithm Computer network topology (c.f. internet) Digital certificate for each user/organization
  • 9. 9 Modeling assets • Assets correspond to data that is stored in the blockchain “world state” – World state is just a database; assets can be created, modified and deleted • Approach: Business network agrees the attributes of the assets that will be shared and a blockchain solution architect models them using an appropriate language – E.g. UML, JSON schema, class definition, CTO file Commercial Paper ID: 0000475923 Issuer: MagnetoCorp Owner: MagnetoCorp Face value: $1,000,000 Maturity date: 2020-02-28 Attributes“Physical” asset Model definition World state {“0000475923”, “MagnetoCorp”, “MagnetoCorp”, “1000000”, “2020-02-28”} Instance “commercialPaper” : { “id”: “string”, “issuer”: “string”, ”owner”: “string”, ”faceValue”: “integer”, ”maturityDate”: “date” }
  • 10. 10 Modeling contracts & transactions • Contracts are the actions that modify assets in the world state – Algorithms with inputs and outputs – Should use modelled assets • Each invocation of a contract is a transaction and logged on the blockchain – Once recorded on the blockchain, transaction logs cannot be modified or deleted • Hyperledger Fabric calls the code that implements contract logic chaincode. Creates a new commercial paper instance Inputs: issuer, ID, issue date/time, maturity date/time, face value Outputs: None Design: Once created, the new asset’s details are stored in the world state Transfers ownership of a commercial paper instance Inputs: issuer, ID, current owner, new owner, price, issue date/time, maturity date/time, face value Outputs: None Design: The seller’s cash balance is incremented by the price The buyer’s cash balance is decremented by the price The buyer becomes the owner of the commercial paper Update the commercial paper instance in the world state Transfers cash matching the redemption value to the current owner Inputs: issuer, ID, current owner, redemption date/time Outputs: None Design: The paper must not have already been redeemed The issuer’s cash balance is decremented by the redemption value The owner’s cash balance is incremented by the redemption value The paper is marked as redeemed Update the commercial paper instance in the world state Redeem Buy Issue
  • 11. 11 A contract hierarchy • Consider a contract hierarchy for similar contracts – Allows you to split capabilities based on role (e.g. regulator may only need query operations) • Standard object-orientation good practice applies – Hierarchies can be simple sub/super class relationships, or more complex Contract Superclass from which all deployed contracts inherit Commercial Paper Contract Implementation of • Query Modifiable Commercial Paper Contract Implementation of • Buy • Redeem • Issue Deploying different subclasses to different peers in Hyperledger Fabric requires flexible deployment model, planned for future release
  • 12. 12 Contracts vs. models vs. chaincode • Chaincode should be closely linked to legal contracts and models • They could be thought of as being different renderings of the same information for different constituencies • Explicit links between the three artefacts can ensure correctness of implementation • For Hyperledger Fabric, these three artefacts can be collectively thought of as the smart contract Commercial Paper Issuer: Owner: Face value: $ Matures: YY-mm- dd Cash Issuer: Owner: Face value: $ Issue Buy Redeem ISSUER: {{cp.issuer}} states that it will pay the OWNER {{cp.owner}} AMOUNT {{cp.face_value}} on or after MATURITY DATE {{cp.date}}. Legal Contract Model Chaincode For the lawyer For the business user For the developer
  • 13. 13 Modeling the business network • Organizations in the business network map to peers in a technical network • Peers maintain a consistent ledger and world state, and signs, executes and validates transactions – They are run as network services, similar to web servers on the internet – Hosted by members of the business network or by third-party cloud providers – Gateway peers provide the entry point to the network for client applications • It is overly simplistic to assume a 1:1 mapping between organizations and peers – Larger organizations usually have multiple peers for high availability – Smaller organizations might delegate responsibility for managing peers and signing transactions to another organization • Maybe even an organization that is not part of the business network! – Peers shared across organizations are sometimes referred to as trust anchors
  • 14. 14 Modeling users and organizations • Every organization, user and system component has an identity in the blockchain network – Used for identifying actors in the network, signing and encrypting information • There are standard ways of expressing identity (e.g. X.509 certificates) • Things to consider: – Who is a user in the blockchain system – How certificates are issued (and revoked) – The relationship between users and organizations, and between organizations
  • 15. 15 (Simplified) transaction process 1. Each administrator deploys chaincode to peers in the network 2. The end-user application connects to a gateway peer 3. The application queries the available chaincodes on the peer 4. The application invokes an available chaincode with a set of input parameters 5. The blockchain network executes the chaincode, agrees the output and updates the ledger/world state on all peers 6. The peer notifies the application is notified that the transaction has been completed
  • 16. 16 Some of the big questions still to cover… • Which peers - how to handle privacy and confidentiality? • How does this process work? • Is the process the same for all blockchain implementations? • How does the blockchain prevent tampering? • Why is it called a blockchain anyway? 1. Each administrator deploys chaincode to peers in the network 2. The end-user application connects to a gateway peer 3. The application queries the available chaincodes on the peer 4. The application invokes an available chaincode with a set of input parameters 5. The blockchain network executes the chaincode, agrees the output and updates the ledger/world state on all peers 6. The peer notifies the application is notified that the transaction has been completed
  • 17. 17 Summary • Modeling is the art of mapping business concepts into technical concepts • It is useful to model blockchain solution elements, as it helps pave the way to the implementation and helps stakeholders understand the solution – Assets – Contracts – Transactions – Business Networks – Participants
  • 18. Thank you www.ibm.com/blockchain developer.ibm.com/blockchain www.hyperledger.org © Copyright IBM Corporation 2019. All rights reserved. The information contained in these materials is provided for informational purposes only, and is provided AS IS without warranty of any kind, express or implied. Any statement of direction represents IBM's current intent, is subject to change or withdrawal, and represents only goals and objectives. IBM, the IBM logo, and other IBM products and services are trademarks of the International Business Machines Corporation, in the United States, other countries or both. Other company, product, or service names may be trademarks or service marks of others.