This document provides a critical look at smart contracts from Drandres Guadamuz, University of Sussex. It begins with an overview of smart contracts and blockchains, explaining how blockchains use cryptography and distributed networks to create immutable and tamper-free ledgers. It then discusses characteristics of blockchains like proof of work, and issues around decentralization. The document analyzes smart contracts, how they are written in code and deployed, and outlines some intended and unintended consequences. It concludes by discussing several problems with smart contracts, such as irreversible errors, attacks on decentralization, and lack of remedies when issues arise.
Test Identification Parade & Dying Declaration.pptx
Smart Contracts and Blockchains: A Critical Look
1. A L L WAT C H E D O V E R B Y M A C H I N E S
O F L O V I N G G R A C E : A C R I T I C A L
L O O K AT S M A R T C O N T R A C T S
D R A N D R E S G U A D A M U Z , U N I V E R S I T Y O F S U S S E X
3. “I like to think
(it has to be!)
of a cybernetic ecology
where we are free of our
labors
and joined back to nature,
returned to our mammal
brothers and sisters,
and all watched over
by machines of loving
grace.”
Richard Brautigan
4. W H AT I S A S M A R T
C O N T R A C T ?
• Part of a larger topic dealing with
autonomous agents and AI and
the Law.
• Excellent scholarship on
translating legal norms to
machine-readable expressions.
• Traditional concept is just a self-
executing contract written in code.
• Latest iteration includes the use of
cryptographic tools, particularly
the blockchain.
6. W H AT I S A
B L O C K C H A I N ?
• A blockchain is quite simply
an open, permissionless,
cryptographic, decentralised
ledger.
• The ledger is public and
decentralised, and since
anyone can check past,
present and proposed
transactions, there is
increased reliability in the
system.
7. I M M U TA B L E A N D
TA M P E R - F R E E
• A hash function: a mathematical operation
that can produce a unique output
depending on the input.
• Take some text, turn it into numbers, and
then apply a formula (the hash function) that
will produce a unique number (the hash
value).
• Changing the original text, then the
resulting number would not match the hash
value.
• Blockchains consist of blocks of transactions
that are chained together by appending the
hash of the previous transaction, making it
impossible to change, and therefore makes
them tamper-free.
9. C H A R A C T E R I S T I C S
• Proof of Work. Reward for running the program to verify transactions.
• Proof of Stake: Chooses the allocation of the next block between
those with a stake in the system without the need for large
expenditure of resources.
• Authentication. This is the main function of a blockchain, the
implementation must be designed to validate transactions securely
and unequivocally.
• Decentralization. The blockchain must be decentralized, so copies of
the entire ledger cannot be held centrally. This presents a few
technical problems, such as the increasingly unmanageable size of the
blockchain as more transactions accumulate.
10.
11. B L O C K C H A I N
P O T E N T I A L
• Verify banking transactions.
• Verify bets.
• Verify music uses to give
royalties to artists real time.
• Identify a work owner.
• Verify contracts.
• Verify provenance.
12. B L O C K C H A I N
L A W S
• Several US states have amended
their legislation to allow smart
contracts, or have implemented sui
generis laws.
• Arizona, Delaware, Illinois, Nevada,
Tennessee, Vermont, and
Wyoming.
• Usually they define blockchain and
smart contracts in one way or
another.
• Pretty poor definitions, not
technology neutral.
13. A R I Z O N A L A W
2 0 1 7 ( H B 2 4 1 7 )
• “Blockchain technology" means
distributed ledger technology
that uses a distributed,
decentralized, shared and
replicated ledger, which may be
public or private, permissioned
or permissionless, or driven by
tokenized crypto economics or
tokenless. The data on the
ledger is protected with
cryptography, is immutable and
auditable and provides an
uncensored truth.
14. S E V E R A L O T H E R
E F F O R T S
• In Europe, Lichtenstein has been one
of the first to regulate smart
contracts and blockchain.
• Switzerland will be following suit
with a new legislation:
“Bundesgesetz Vorentwurf zur
Anpassung des Bundesrechts an
Entwicklungen der Technik verteilter
elektronischer Register”.
• Detailed responses that seem to be
regulating yesterday’s technologies
and exchanges.
• Are they needed?
16. W H AT I S A S M A R T
C O N T R A C T ?
• There was a time before
the blockchain!
• Traditionally smart
contracts meant any code
implementation of a
contract where the parties
were automated.
• It’s been in use in B2B
contracts for decades.
17. “ S T R O N G ” S M A R T
C O N T R A C T S
• Implemented in code using a
common language (eg
Solidity).
• Pegged to a cryptocurrency
for automated payments and
transactions.
• Transaction and contract get
written into the blockchain.
• Immutable code, openly
verifiable transactions.
18. A R I Z O N A L A W
2 0 1 7 ( H B 2 4 1 7 )
• "Smart contract" means an
event-driven program, with
state, that runs on a
distributed, decentralized,
shared and replicated
ledger and that can take
custody over and instruct
transfer of assets on that
ledger.
19. T Y P E S O F S M A R T
C O N T R A C T S
• Machine-to-machine transactions
• Cryptocurrencies
• Crowdfunding (ICO)
• Governance (DAO)
• Decentralised apps (ÐApps)
• Rights management
• Registries
• Dispute resolution
20. U S E F U L
C O N C E P T S
• Contract Source Code
• Wallet: Where your coins are
stored.
• Token: represents any fungible
tradable good: coins, loyalty
points, gold certificates, IOUs,
in-game items, etc.
• Keys: Used to digitally sign the
contract, usually pegged to
your token, need the key to
access your coins.
23. C A N B E R U N L O C A L LY, O R O N A
D I S T R I B U T E D P L AT F O R M
24. S T E P S T O D E P L O Y
A C O N T R A C T I N
E T H E R E U M
• Write it in code (Solidity).
• Run it locally to test it.
• Test it in a small external net
(ethereumjs-testrpc)
• Compile using a Solidity
compiler.
• Upload the contract using
command line node that
interacts with the Ethereal
blockchain (geth).
25. S O M E R E L E VA N T
C H A R A C T E R I S T I C S
• As the most popular smart contract
platform is Ethereum, the smart
contract relies on that platform,
development team, software tools,
and governance structure.
• Once deployed in the blockchain,
the contracts cease to exist
independently, they are distributed
and their performance depends on
miners.
• The miners will run calculations to
obtain cryptocurrency as a reward
for operating the network.
28. C A N A B L O C K C H A I N
B E U S E D T O C O N D U C T
A C O N T R A C T ?
• Yes, if the parties can express
properly offer and acceptance (and
consideration), and other
formalities according to national
law.
• Art 9 E-commerce Directive
2000/31/EC: “Member States shall
ensure that their legal system
allows contracts to be concluded
by electronic means.”
• US blockchain legislation allows
contract formation using smart
contracts.
29. R I C H L I T E R AT U R E O N L E G A L A S P E C T S
• Durovic M and Janssen A, ‘The Formation of Blockchain-Based Smart
Contracts in the Light of Contract Law’ (2018) 26 European Review of
Private Law 753.
• Cannarsa M, ‘Interpretation of Contracts and Smart Contracts: Smart
Interpretation or Interpretation of Smart Contracts?’ (2018) 26
European Review of Private Law 773.
• Giancaspro M, ‘Is a “Smart Contract” Really a Smart Idea? Insights
from a Legal Perspective’ (2017) 33 Computer Law & Security Review
825.
• Geiregat S, ‘Cryptocurrencies Are (Smart) Contracts’ (2018) 34
Computer Law & Security Review 1144.
30. S O M E I N T E N D E D
A N D U N I N T E N D E D
C O N S E Q U E N C E S
• The parties in the smart
contract are not necessarily
in control.
• Coded contracts that are
placed in a public ledger
may rely on an army of
intermediaries, from platform
developers to miners.
• Various points for legal
accountability?
31. A F E W T H I N G S
T O K E E P I N M I N D
• Not all “smart contracts” are
contracts.
• Smart contracts can be
anonymous, so legitimacy
and capacity could be an
issue.
• Electronic Identification and
Trust Services Regulation:
advanced electronic
signatures need to identify
the person.
32. P R O B L E M S W I T H S M A R T
C O N T R A C T S
34. W H E R E T O
S TA R T ?
• Clunky, heavy, expensive,
environmentally unfriendly.
• Do not scale well, particularly PoW
blockchains.
• Lots of projects that start out as
blockchain have been abandoned,
or became non-blockchain.
• Immutable nature presents several
problems.
• Whoever writes the blockchain
writes history forever.
35. P R O B L E M S W I T H
I M M U TA B I L I T Y
36. I M M U TA B L E
E R R O R S
• Immutability could be a
problem.
• Once written, the contract
tends to stay that way forever.
• Bugs can lead to huge losses.
See the Parity Wallet, an
Ethereum smart contract that
locked out between $100 and
$300 million USD due to a bug.
• Other bugs have allowed
fraudsters to take advantage.
37. D E C E N T R A L I Z E D A U T O N O M O U S
O R G A N I Z AT I O N ( D A O )
38. D A O “ T H E F T ”
• DAO operates a pool of millions of
USD worth in Ether (ETH).
• Only those participating in contract
verification can withdraw funds
according to terms of participation.
• On June 17 2016, a bug in the
code allowed malicious party to
syphon funds from common pool
(estimated 3.6m ETH, about $50
million USD at the time).
• Hard fork from developers “turned
back time”.
39. L O R D H O D G E
• “Smart contracts” are
contracts which can be
partially or fully executed or
enforced without human
intervention […] Courts will
not be able to cancel the
performance of the contract.
But a remedy may lie in the
law of unjust enrichment...
to compel the parties to re-
transfer the property or
money".
40. P R O B L E M S W I T H
“ D E C E N T R A L I S AT I O N ”
41. AT TA C K O F T H E
B L O C K C H A I N
• The problem is that
blockchains have specific
features that may make
enforcement difficult.
• Anonymity
• Reliance on a network
• 51% attack
• Forking
42. “ D E -
C E N T R A L I S E D ”
C O N T R A C T S
• Contracts not run locally,
dependent on a variety of
actors.
• Jurisdictional nightmare.
• Anonymous parties,
foundations based in
Switzerland, with funds in
all over the place.
• Miners based in China.
43. 5 1 % AT TA C K
• Blockchains are immutable. As
long as no miner gains majority
control of the network, then they
can perform what is known as a
51% attack.
• This allows a malicious agent to
broadcast wrong information
and validate it as true.
• Several attacks to smaller coins
have taken place, biggest victim
was Ethereum Classic in January
2019.
48. S C E N A R I O S
• Error in code cannot be changed, funds
are frozen, who is liable? Who can you
sue?
• Contract contains purposeful error by
fraudster.
• Coin used for payment that loses all
value.
• Developers fork code, making two
copies of contract, perhaps diluting
value.
• Miners decide to attack a contract,
changing history in the ledger.
• “Garbage in, garbage out”.
49. R E M E D I E S
• Here’s where the few articles dealing
with smart contracts talk about
remedies.
• No reason to forego existing
principles of contract law. Error,
contracting under mistake, frustration,
unjustified enrichment, etc.
• Assumption is that under normal
circumstances, smart contracts should
be treated as any other contract.
• But these are not normal
circumstances. Contract cannot be
changed or re-written!
50. S U E T H E M I N E R S ?
G O O D L U C K W I T H T H AT …
51. S U E T H E
D E V E L O P E R S ?
• A tempting idea is to think of suing
the developers.
• As Ethereum has demonstrated with
the DAO hack, developers can fork
the code and “turn back time".
• Could you sue a developer to
mandate a fork?
• A couple of early attempts in the US
have been abandoned, but this could
be interesting avenue.
• However, developers exist around the
world, they could simply not comply.
54. M I S TA K E N
O W N E R S H I P
• Registry systems would still
need a central authority.
• Person got “ownership” of
the Mona Lisa in a
blockchain registration
system.
• “Garbage in, garbage
out”.
55.
56. D R M O N
S T E R O I D S
• A common criticism of digital
rights management systems is
that they often bypass
exceptions and limitations.
• Users have a set of permissions
under copyright which an
automated and self-executing
smart contract would ignore.
• It would be difficult to code
the complex intricacies of fair
use and fair dealing.