Part 1-introduction to Smart (legal?) Contracts__ethereum

Source: Internet
Author: User

A version of this article the appeared in CoinDesk on April 11, 2016. Encouraged by the "feedback this received, I'll be writing" more on the subject in the near future and publishing it D elsewhere.

Over the last year, the concept of a "smart contract" has received renewed attention in both the technology industry and I n Legal and business circles. Recent advancements in a field known as "blockchain technology" have LEDs some to believe that smart contracts could soon O Ffer alternatives to traditional commercial and financial agreements, with dire results for the legal and financial S. While this enthusiasm may is premature, lawyers nonetheless remain mostly unaware of this important emerging technology And the long-term implications for their profession.

In the context, "smart contract" refers specifically to the use of computer code to articulate, verify, and execute a AG Reement between parties. Whereas a typical contract is drafted using natural language, the terms of smart contracts are expressed in code, similar To a programming language like JavaScript or HTML. The contract is then "executed" by a computer-given the conditions of the agreement, and a set of defined inputs, the SM Art contract enforces its own terms.

Readers familiar with blockchain technology would know that term "smart contract" are often used in a more general sense To the refer to no script or program, operates on a blockchain. However for the "purposes of this article", I focus on the narrower meaning described above:using code into place of Traditio NAL contractual agreements between parties.

The term "smart contract" was a-popularized by computer scientist Nick Szabo in his 1997 paper the idea of Sma RT contracts. The vending machine, he described, is the simplest form of a "smart contract"-a mechanical device designed to transfer O Wnership of a good (a candy bar) when provided with a certain defined input ($1.50). Because the machine itself "controls" the property-by being physically sealed-it are able to enforce the terms of the Contract ".

Extending the concept, Szabo suggested that computer code could is used in place of mechanical devices to facilitate far m Ore complex transactions of digital property. Rather than transfer ownership of a candy bar, a smart contract-could transfer ownership of Real-estate, or shares, or int Ellectual property. The program would define what ' inputs ' were for the ' necessary to ' contract like Execute-things, or payment of votes Members, or no other condition that can is expressed by code.

Consider a basic options contract. A call options contract entitles of the holder to buy a given security at a defined price. In our example, Alice buys we "smart options contract" from Bob. The contract entitles Alice to purchase shares of ACME Inc. from BOB in a defined price of $ per share. The contract has a expiry date, after which Alice isn't longer entitled to buy the share at the defined ' strike price '.

Expressed in pseudo-code, a simple "smart options contract" might look like this:

Contract Option {
   Strikeprice = $
   holder = Alice
   seller = Bob
   asset = Shares of ACME Inc.
   Expirydate = June 1st, 2016
   function exercise () {
       
      if message Sender = holder, and
      if current Date < Expirydate, then
         holder Send ($5,0 To seller, and
         seller send (asset) to Holder
   }
}

In the "the", the smart options contract defines the relevant terms-the underlying asset, the strike price, the Identities of each party, and the expiry date. Then, a function we ' ve named "Exercise" enables the holder to trigger the purchase of shares in the strike price in any MO ment before the expiry date. The function checks to the entity triggering it (the ' message Sender ') is the holder, and then checks to That's the contract is still within the expiry date. If both are true, then the contract immediately executes by transferring cash and the holder s from the seller to the holder and according to the contract ' s terms.

Until recently, smart contracts were little more than theory. In general, there were two fundamental challenges-needed to is addressed before smart contracts could is used in Real-world setting.

(1) How would a smart contract, actually control, real assets The IT could enforce an agreement? A vending machine, to return to Szabo's example, controls property by physically securing it inside of itself. But How could code do the same? In our options contract above, the "exercise" function is transfers money and assets between the two parties. But can a computer program control Real-world assets like cash and shares?

(2) What computer would being trusted to "execute" those terms in a way that both parties could rely? Parties must not only agree on the code of their contract, but also the computer which the interprets and executes the code. A shared standard, at the minimum, would have to exist, and is used in a way that is verifiable by each party-ideally, Without requiring the parties to physically inspect the computer in question.

In the last few years, solutions to both of this problems have into come. Emerging and development surrounding what is called "blockchain technology" could provide a basis to make smart con Tracts a reality in the near future.

The "a" of blockchain technology was the digital currency Bitcoin, made famous to its mysterious creator and sudden Price increase in late 2013. In the last few years, the underlying "blockchain" technology has been intensely studied and adapted their use expand Ond simple digital currencies. Startups, Open-source communities, and large financial institutions alike are improving and expanding the technology with The aim of one day using it to facilitate exchange of fully digital assets.

A Blockchain is A authoritative database. It is a database which, by virtue of the way it is maintained and updated, has very high trust properties. Blockchains are not controlled by a. There is no A and organization, or person this has ultimate control over a blockchain. Rather, a blockchain are maintained, updated, and secured by a network of participating computers.

Each computer keeps a full copy of the blockchain database, and each copy are kept in synchronization with the others by a System of cryptographically-enforced rules called a consensus algorithm. Crucially, Blockchains are append-only databases, meaning that once information are validly added, it can never be removed. Each update to the blockchain are secured by a cryptographic process known as a hash function, which allows the network to Immediately detect and reject any attempt to distribute a edited copy of the database.

In this way, Blockchains form the foundation for the recording and transfer of fully digital. Because the blockchain is always kept in synchronization, there are only ever one true record of ownership-essential to P revent anyone trying to double-spend their assets by sending it to multiple in the parties time, a same that problem Ed previous attempts to create digital assets. Because it was impossible to edit a blockchain once it has been properly updated, parties have mathematically-enforced conf Idence that record of their ownership would persist into the future.

While the technology was still in early stages, many now believe so if Blockchains can create a secure platform for the T Rade of digital assets, they may also solve the two fundamental challenges the facing smart contracts.

A, recall that smart contracts require a way for computer code to control real assets. By enabling fully digitized assets, the blockchains make it possible for the code to exercise control. On a blockchain, control over an asset means controlling a cryptographic key that corresponds to the asset in question, RA Ther than any physical object. Thus in my example above, the options contract Could itself have control of the underlying assets, rather than An escrow agent. When the ' exercise ' function is called, the operation of the code would transfer the assets without-requiring any human as Sistance.

Second, smart contracts need a "trusted computer" that would execute the terms of the contract. This is the blockchain itself. The blockchains that are being developed this are not only databases, but Distributed computers that can execut e code as as the record ownership of assets. Our "smart option" example would itself is uploaded and stored on a blockchain, and would is executed by the blockchain En instructed to did so. The same properties that make blockchains ideal to record ownership of assets also make them ideal for executing smart con Tracts. Once the code of the contract is uploaded and recorded onto the blockchain, the parties can have confidence the CONTR Act cannot is altered, and that it would always perform as expected.

Blockchain smart contracts may is as far away as we expect. Banks, exchanges, and financial institutions are actively developing blockchain technologies that would enable them t o Store and trade real assets over blockchain systems. Nasdaq, in partnership with blockchain startup Chain, has developed and begun testing a private-market equity trading plat Form. A next-generation open-source blockchain called Ethereum, launched in July 2015, the aims of is the foundation for a new Indus Try of non-traditional decentralized commerce. A consortium of banks, working with blockchain firm R3, have begun work on a shared industry platform based on Blockcha In technology specifically designed to facilitate financial agreements. Within a few years, financial markets may is trading the fully-digital assets across blockchain-networks, with the terms of th OSE trades enforced by code.

The impact won't be limited to financial contracts, although this are the most obvious use cases. As techniques are developed that enable other types of the property to is recorded and transacted on a blockchain the possible Applications for smart contracts would multiply.

If they ever become widely used, smart contracts could alter the nature of Corporate & commercial transactions. The advantages of software, have revolutionized so many industries-automation, predictability, and speed-could fin Ally is brought to the segments of the legal industry.

Representing contractual terms in code, rather than natural-language, could bring clarity and predictability to Agreeme Nts. A Smart contract could is tested against any set of inputs-in other words, against any set of material facts the IT TA Kes as inputs-allowing lawyers on either side of a deal to know precisely how the contract would execute in every comput Ationally-possible outcome.

In my simple Smart Options example above, each of Alice and Bob could "dry run" the contract in a simulated environmen T, where every possible input is tested. While the is unnecessary in such a simple example, imagine a contract with thousands of inputs, and hundreds of nested if -then Statements-as is common in many complex financial. These, too, could are tested against every possible input defined in the code. Analogous to how software developers "debug" their own code by testing it in every possible circumstance, lawyers could te St contracts, giving each side of a deal a clearer understanding of their risk-and perhaps requiring fewer billable S.

Of course, smart contracts'll never fully replace natural-language law. many types of agreements can never be fu Lly expressed in (code or executed by a computer-for instance, those that involve human, performance rather than just the Exchange of dematerialized assets. Even fully self-executing contracts'll ultimately need to make reference to legal terms and concepts that'll define EA CH Party ' s rights if their relationship leads to litigation. Rather, the emergence of smart contracts'll leads to a re-evaluation of common practice, as lawyers and clients dis Cover which types of agreements and terms are best suited to code, which should is left to natural language, and you to co Mbine each to achieve the best of both worlds.

For now, smart contracts are still speculative fiction. But for the "I" have a technology that could is used to bring into them. While this may still is years away, the firms would is wise to consider how this innovations could the impact their busin Ess. By the time smart contracts become viable, the legal industry should and hope that they have to match.


https://medium.com/@jjmstark/introduction-to-smart-contracts-part-1-8f191a324d0a

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.