JURIX 2015: Coding Smart Contracts for the Blockchain

Here is an overview of the half-day tutorial I will be giving on December 9, 2015 during JURIX 2015 at the University of Minho, Law School, Campus of Gualtar, Braga, Portugal.

Brief Description

This tutorial and live-coding session will teach attendees how to code their own automatically-executing smart (or “crypto”) contracts and inject them into the blockchain. It will also educate attendees about: (1) the basics of blockchain technology; (2) existing blockchain smart contract platforms such as Ethereum and Bitcoin; and (3) methods of harvesting data from these platforms in order to study smart contract behavior. Lastly, the tutorial will outline some of the legal, judicial, and regulatory issues surrounding blockchain smart contracts, hopefully fomenting further research on and discussion of the topic.

Detailed Outline

Coding Smart Contracts for the Blockchain

a. What is the blockchain and how does it work?

A review of the basic technology underlying the distributed blockchain.

b. How can we use the blockchain to craft contracts?

A canvassing of theoretical and real-world applications of the blockchain to contract-making, including a discussion of the (arguable) advantages of smart contracts over their analog counterparts and a survey of existing and in-development blockchain smart contract platforms (including, but not limited to, Ethereum and Bitcoin).

c. How do we code such contracts?

Live coding session in which the instructor (and attendees who wish to follow along on their machines) program several simple yet useful contracts in Ethereum’s Solidity language. After doing so, we will use Ethereum’s Geth client to check our code and then inject our contracts into a testnet Ethereum blockchain. There, we can watch them automatically execute in real time. If we have time (and Ether!), we may even try injecting a few into the real Ethereum blockchain.

An adumbration of some the legal, judicial, and regulatory implications of smart contracts, including but not limited to: (1) The effect blockchain smart contracts may have on the role of parties, attorneys, and programmers in crafting agreements; (2) The new paradigms of contract construction and revision under this platform; (3) How courts might enforce –through traditional or technical means– the agreements embodied in blockchain smart contracts when the technology thwarts the intentions of the parties; (4) How blockchain-based distributed applications (such as Ethereum’s DApps) might be programmed to emulate the dispute solving mechanisms of courts and arbitrators; (5) How regulatory bodies (for example, financial regulatory bodies) might, if necessary, detect and purge out-of-bounds contracting behavior on the blockchain (for example, unregistered derivatives contracts – see, e.g., Sand Hill Exchange).

e. How can we collect data on blockchain smart contract behavior?

Demonstration of how to harvest and study smart contract behavior through third party data feeds such as Etherscan.io or Blockchain.info.

What You’ll Need For the Tutorial

It is important that attendees bring a Mac laptop, if possible. Coding along will really help attendees to get the hang of engineering smart contracts.

One really useful thing to do ahead of time is install the Ethereum CLI tool, Geth. Read about how to install Geth here. If you have trouble, read my pointers here.

Once you do that, you might try to follow this great tutorial to set up a testnet. We’ll repeat this in class, but having some familiarity with the process will enhance your experience. UPDATE: I built atop of that tutorial and covered some new ground here.

The Presenter: Profiles and Personal Information

Bill Marino is a practicing attorney, based in New York and specializing in securities, antitrust, and intellectual property litigation. He is also a candidate for M.Eng. in Computer Science at Cornell Tech and the Data Science Fellow at online publisher Mashable. This fall, Mr. Marino will be researching and blogging for the Initiative for CryptoCurrencies and Contracts, an initiative of faculty members at Cornell University, Cornell Tech, the University of Maryland, and the University of California, Berkeley. Mr. Marino has a B.A. in Ethics, Politics, and Economics from Yale University and a J.D. from Columbia University School of Law. For more info: