Smart contracts mark the evolution of the binding contract from a set of terms and conditions, governed by the common law, into a set of conditional statements governed by a programming language and the tenets of blockchain technology. In developing a legal understanding of this evolution and its ever growing implications, smart contracts can be regarded as the "mirror image" of the traditionally understood binding contract - in that it is very similar, but also very different.
Structure of smart contracts
Smart contracts that are deployed to the Ethereum blockchain are written in the Solidity programming language which operates a hybrid language that is contract object-orientated. Smart contracts comprise of two essential elements: self-executing functions; and storage state variables. As both a smart contract and a traditional contract share the same end goal, which is to give effect to the intention of contracting parties in their dealings with one another, the fundamental structure of a smart contract is comparable to the fundamental structure of a traditional contract. The storage state variables and self-executing functions making up a smart contract are comparable to, and share common traits with, the contractual definitions and rights and obligations set out in a traditional written contract.
State variables vs Contract Definitions
Contractual definitions, which are defined outside of the contractual rights and obligations of the contract, operate as particular terms to which the parties have agreed to assign a contract specific meaning. On the other hand, as an object-oriented programming language, Solidity requires a smart contract to declare state variables at the start of the contract which variables will persist through the life of the smart contract.
Both contractual definitions and state variables ultimately serve that same purpose within the structure of a contract. Namely, to assign a state of affairs, instance or data to a particular variable or defined term with the intention that such defined terms or state variables will operate as static elements of the contract that will, in turn, interact with, and give effect to, the rights and obligations or the self-executing functions of the traditional or smart contract, respectively.
However, the key differentiating characteristic between the two pertains to the nature of what is assigned to a contractual definition versus what is assigned to a state variable. In the case of a contract definition, the parties assign a particular meaning to a defined term. This meaning represents the state of affairs, instance or data that the parties wish to record as being one of the subjects of the contract. In the case of a state variable, the parties assign a particular type of storage capability to the state variable. While a contractual definition is a representation of a particular value or information, a state variable is a piece of programming that actually stores the particular value or information. For instance, while the term "premium" as a contractual definition can be used to represent a particular sum of money, "premium" as a state variable can be the name given to a piece of Solidity programming that is designed to store the actual sum of money within the smart contract itself.
Self-Executing Functions vs Contractual Rights and Obligations
In addition to the contractual definitions, a traditional contract similarly houses sets of rights and obligations which operate in tandem with one another. For every obligation imposed on a party, there is an associated right that can be invoked by the other party. Smart contracts differ in that, instead of a set of rights and obligations, smart contracts contain a set of "if/else" conditional statements, which operate on the "if this - then that" principle.
Both the self-executing functions and the set of rights and obligations are designed to bring about an intended or mutually agreed upon end result (be it a payment of funds or transfer of assets). The rights and obligations set out in a traditional contract achieves this by stipulating the precise nature of the obligations and the associated rights as well providing for enforcement and remedial mechanisms should a party not fulfil the required obligations.
Due to the structure of a smart contract and the nature of the underlying decentralised Ethereum blockchain, smart contracts deployed to the Ethereum network are able to operate as an independent intermediary of sorts between the contracting parties. Rather than merely stipulating the precise nature of the contractual rights and obligations, the decentralised technology enables the smart contract, through its self-executing functions, to operate as proxy performer of the parties' respective contractual obligations, as well as the enforcer of such performance.
Trust vs Trustless
Ultimately, in as much as a smart contract may resemble the structure and underlying functionality of a traditional contract, it differs in one crucial aspect - trust based performance. In a traditional contract, rights and obligations are essentially premised on a promise to perform. As such, the performance in a traditional contract is, by its very nature, dependent upon the parties trusting one another, or a 3rd party, to perform or fulfil the obligations set out in the contract. In a smart contract structure, the required contractual performances are not dependent upon the parties' trust in one another, or a 3rd party, but rather are dependent upon the parties' trust in the smart contract itself which is not premised on a promise to perform but on intentional programing designed to achieve a specific objective.