The third type of external world pattern is the legal and smart contract pattern.
The legal industry is becoming digitized.
For example, using digital signature has now become a valid way to sign a legal agreement.
Digital legal agreements need to be executed and enforced in this environment.
An independent, trustworthy execution platform trusted by all the involved participants is needed to
execute the digital legal agreement.
How to bind a legal agreement to the corresponding smart contract or a trusted environment to ensure
a 1 to 1 mapping.
The legal and smart contract pattern answers this question.
There are some of the forces which have led to the creation of legal and smart contract pattern.
The first one is authoritative source.
A 1 to 1 mapping is required between a legal contract and its corresponding smart contract to make the
smart contract as authoritative source for the legal contract.
The second one is Secure Storage.
Blockchain provides a trustworthy data storage to keep the legal agreements in immutable form.
And the third one is secure execution.
Blockchain can also provide a trustworthy computational platform that can execute the digital agreements
to enforce the certain conditions which are defined as a part of the legal agreement.
The solution for the legal and smart contract pattern is that the blockchain can be idealized as a trusted
platform to run digital legal agreements which are bound with the corresponding on chain smart contracts.
The smart contract implements the conditions defined in the legal agreement.
When deployed, there is a variable to store the hash value of the legal agreement but is initially
a blank value.
The address of the smart contract is included, on the other hand, in the legal agreement and then
the hash of the legal agreement is calculated and added to the contract variable by binding a physical
agreement with a smart contract.
The bridge between the off chain physical agreement and the on chain smart contract is established.
The two directional binding makes sure that the legal agreement and smart contract have a 1 to 1 mapping
available.
The smart contract digitize the conditions defined within the legal agreement.
Thus, these conditions now can be checked and enforced automatically by the smart contract.
The smart contract can also enable automated regulatory compliance checking in terms of some required
information and processes.
The benefits of legal and smart contract pattern are.
It provides automation where some of the conditions defined in the legal contract can automatically
enforced by the blockchain.
It also provides audit trail.
Blockchain can be used as a permanent storage for the records for all the historical transactions related
to the legal contract.
This immutable data enables auditing at any time in future.
It also provides clarification because now if we encode the legal terms expressed in a natural language
into smart contract, we require to provide the clear interpretation for the same.
There are also some drawbacks for the legal and smart contract pattern.
The first one is that the smart contracts require some knowledge of programming languages.
Thus they have very limited expressiveness compared to the legal agreements.
Moreover, if a public blockchain is used, there is no central administrative authority to decide a
dispute or perform the enforcement of court judgment.
There also might be different ways to interpret a certain legal term and to encode them in the smart
contract.
Ambiguity of the natural language makes it a challenge to implement a certain legal term in a way that
is agreed upon by all the involved participants.
Some of the known implementations of legal and smart contract pattern are open law.
This is a platform that allows lawyers to make legally binding and self executable agreements on the
Ethereum blockchain.
The legal agreement templates are stored on a decentralized data storage such as Ipfs.
Another known implementation is a smart contract template proposed by Barclays, which uses legal document
templates to facilitate smart contracts running on blockchain platform.
This image is a representation for the legal and smart contract pattern.
You can see that on chain.
We have the smart contract and we have different conditions specified for the smart contract and off
chain.
We have the legal contract.
There is a binding available between both the contracts in the Smart contract.
You can see that we have a hash value for the legal contract.
Similarly, in the legal contract you can see that we have the address of the Smart contract, which
will be part of the legal contract.
In this way we are creating a 1 to 1 mapping for both the smart contract and legal contracts.
So that was about the external world.
Patterns and external world patterns provide the solutions for some of the common problems related to
interactivity of blockchain with external world services.
In the next lecture we are going to discuss about the data management patterns and we are going to see
that how these data management patterns can help you to create and design your enterprise blockchain
architectures.
If you have any queries, feel free to contact us at info at the rate v2 blocks.com.