Smart Contracts
Smart Contract
Due to the cost-saving benefits that smart contracts can bring to the financial services industry by reducing the cost of transactions and simplifying complex contracts, rigorous research is being carried out by various commercial and academic institutions to formalize and make the implementation of smart contracts easy.
History
Smart contracts were first theorized by Nick Szabo in the late 1990s in an article named Formalizing and Securing Relationships on Public Networks.
As described by Szabo
“A smart contract is an electronic transaction protocol that executes the terms of a contract. The general objectives are to satisfy common contractual conditions (such as payment terms, liens, confidentiality, and even enforcement), minimize exceptions both malicious and accidental, and minimize the need for trusted intermediaries. Related economic goals include lowering fraud loss, arbitrators and enforcement costs, and other transaction costs.”
The original article written by Szabo available at http://firstmonday.org/ojs/index.php/fm/article/view/548
This idea of smart contracts was implemented in a limited fashion in Bitcoin in 2009, where Bitcoin transactions using a limited scripting language can be used to transfer value between users, over a peer-to-peer network where users do not necessarily trust each other, and there is no need for a trusted intermediary.
Definition(One of)
A smart contract is a secure and unstoppable computer program representing an arrangement that is automatically executable and enforceable
Dissecting this, a smart contract is, in fact, a computer program that is written in a language that a computer or target machine can understand. Also, it encompasses agreements between parties in the form of business logic. Another fundamental idea is that smart contracts are automatically executed when certain conditions are met. They are enforceable, which means that all contractual terms are executed as defined and expected, even in the presence of adversaries.
Smart contracts are self-enforcing as opposed to legally enforceable.
They are secure and unstoppable, which means that these computer programs are required to be designed in such a fashion that they are fault-tolerant and executable in a reasonable amount of time.These programs should be able to execute and maintain a healthy internal state, even if external factors are unfavorable.
Secure and unstoppable may well be considered requirements or desirable features but it will provide more significant benefits in the long run if security and unstoppable properties are included in the smart contract definition from the beginning.
Some researchers suggest smart contracts need not be automatically executable; instead, they can be what’s called automatable, due to manual human input required in some scenarios. Ex, a manual verification of a medical record might be required by a qualified medical professional.
But this can be fully automated. Some inputs that need to be provided by people can and should be automated via the use of Oracles.
Even though smart contracts are named smart, they in fact only do what they have been programmed to do, and that is fine because this very property of smart contracts ensures that smart contracts produce the same output every time they are executed.
In summary, a smart contract has the following four properties:
Automatically executable.
Enforceable
Semantically sound
Secure and unstoppable
The first two properties are required as a minimum, whereas the latter two may not be required or implementable in some scenarios and can be relaxed. For example, a financial derivatives contract does not perhaps need to be semantically sound and unstoppable but should at least be automatically executable and enforceable at a fundamental level. On the other hand, a title deed needs to be semantically sound and complete, therefore, for it to be implemented as a smart contract, the language must be understood both by computers and people.
Ian Grigg addressed this issue of interpretation with his invention of Ricardian contracts.
Ricardian contracts
Ricardian contracts were initially proposed in the paper, Financial Cryptography in 7 Layers, by Ian Grigg in the late 1990s. These contracts were used initially in a bond trading and payment system called Ricardo.
A Ricardian contract is a document that has several of the following properties:
A contract offered by an issuer to holders
A valuable right held by holders and managed by the issuer
Easily readable by people(Like contract on paper)
Readable by programs(parsable).
Digitally signed
Carries the keys and server information
Allied with a unique and secure identifier.
Smart contract templates
This idea was proposed by Clack et al. in their paper published in 2016, named Smart Contract Templates: Foundations, design landscape and research directions. The paper also proposed that domain-specific languages should be built to support design and implementation of smart contract templates.
Contracts in the finance industry is not a new concept, and various domain-specific language DSLs are already in use in the financial industry to provide specific language for a specific domain. For example, there are DSLs available that support development of insurance products, represent energy derivatives, or are being used to build trading strategies.
It is also important to understand the concept of DSLs as this type of language can be developed to program smart contracts. These languages are developed with limited expressiveness for a particular application or area of interest. Domain-Specific languages(DSLs) are different from general-purpose languages (GPLs).
Based on the design philosophy of DSLs it can be envisaged that such languages will be developed specifically to write smart contracts. Some work has already been done, and Solidity is one such language that has been introduced with Ethereum blockchain to write smart contracts. Vyper is another language introduced for Ethereum contract development.
This idea of DSLs for smart contract programming can be further extended to a graphical DSL, a smart contract modelling platform where a domain expert (not a programmer, for example, a front desk dealer) can use a graphical user interface and a canvas to define and draw the semantics and performance of a financial contract.
Oracles
Oracles are an important component of the smart contract ecosystem. The limitation with smart contracts is that they cannot access external data, which might be required to control the execution of the business logic.
An Oracle is an interface that delivers data from an external source to smart contracts.
Oracles are also capable of digitally signing the data proving that the source of the data is authentic.
Comments
Post a Comment