Smart Contracts Flashcards

(45 cards)

1
Q

Traditional Contracts Drawbacks

A

Manual Processing (Drafting, signing, enforcing)
Legal Costs (Legal expertise for draft, enforce, resolve, all expensive)
Limited Transparency (One party misinterprets the contract)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Smart Contract Definition

A

Computerise transaction protocol that executes the terms of a contract (introduced by ethereum)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Smart contract properties

A

Self-executing, autonomous and enforceable through computer code
Facilitates exchange of digital value
Digital representation of legal contract, deterministically executed (set of outcomes, predetermined beforehand, all parties know exactlywhat will happen and when)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Contract execution (traditional vs smart)

A

Interactions between humans and objects, punishment application. Definitions interpreted in a trial
Program execution with only 1 interpretation, not reversible and autonomous

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Contract definition (traditional vs smart)

A

Paper vs Software program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Contract audit/control (traditional vs smart)

A

Semi-manual data recollection vs real time immutable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Smart contract immutability

A

Account on the blockchain controlled by code instead of a user
Code cannot be changed by any individual/organisation in anyway

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Smart contract trustless

A

Smart contract conditions evaluated and executed by computer code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Smart contracts vs the cloud pros

A

Application logic transparaency (less corruption)
Application logic and execution can’t be tampered with
No censorship in permissionless blockchains
Non-repudiation of execution as execution results stored as transactions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Smart contracts vs the cloud cons

A

Slower performance with transaction latency
Difficult maintenance with immutable application logic
Expensive due to fees and gas-based execution model

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Smart Contract Life Cycle Phases

A

Development, deployment, invocation, execution

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Smart contract development phase

A

Smart contract written in one of the available languages

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Smart contract deployment phase

A

Written smart contract is compiled and then deployed on the blockchain as a transaction

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Smart contract invocation phase

A

Deployed smart contract is invoked by an external actor (or another smart contract) with specific input

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Smart contract execution phase

A

Invoked smart contract executed the chosen function returns the outputs and applies the changes in the blockchain state
Transaction

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Smart contract binary

A

Stored in the blockchain before being invoked and then executed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Smart contract execution storage

A

Execution of contract stored in the blockchain
Result as well as updated state
Transaction

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Decentralised Applications

A

Software applications which run on a decentralised p2p network which is often a blockchain

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Decentralised application pros

A

Secure, transparent and accountable because the data and transactions stored on blockchain
More democratic and open-source development process
No single node has complete control (no single point of failure/vulnerability)

20
Q

dApps examples

A

Augur (prediction markets)
Filecoin (filestorage network)
Brave (web browser)

21
Q

dApps challenges

A

Scalability and performance
Regulatory uncertainty
Usability and accessibility

22
Q

dApps scability and performance

A

Can be slower and less efficient depending on consensus algorithms and network status
Improved with sharding, sidechains and layer 2 solutions

23
Q

dApps regulatory uncertainty

A

Not controlled by any single entity/jurisdiction. Difficult to determine how existing laws and regulations apply
New frameworks and regulations required

24
Q

dApps usability and accessibility

A

Dependent on complex cryptographic systems requiring users to manage their own private keys and digital wallets. Difficult for non-technical users

25
Smart contract inputs
inputs may not be available within the network Inputs often associated with some trusted 3rd party centralised organisation
26
Oracle definition
Third-party service or program Provides external data and triggers smart contract execution when predefined conditions are met Agent which finds and verifies real-world occurrences and provides this information to a blockchain to be used by smart contracts Allows interaction with outside world so actions can be performed
27
Oracle trustworthiness
Not part of the blockchain consensus mechanism, need trustworthy information source Smart contracts only as good as the data input they receive Cascading bad data input Careful choice of trustworthy oracles, need mechanisms to verify and validate data from oracles
28
Best use for smart contracts
Creating trust and resolving uncertainty (nothing routine)
29
Smart contract minimalism
Simplify information in contract as much as possible Ensures users understand the contract Reduces risk of misunderstandings or disputes Fewest possible elements, reduce elements to essentials whilst still maintaining intended function First defence against defects with non-trivial consequences So simple there are no defects
30
Achieving smart contract minimalism
Define essential enduring facts about the application. Narrow scope of concerns. What needs to be proven and the minimum logic and data required to construct the proof
31
Future proofing
Smart contracts run automatically -> Lack of execution control after deployment Need highly secure code, not practicable as blockchain technology is still changing Can cause bugs and security issue
32
Non-trivial contracts
Non trivial contracts will have bugs in (need to reposing to these gracefully) Software patterns to help protect contracts against unexpected events
33
Smart contract plans for failures
Natural language description of the code Test cases Write constructors, validate all arguments passed, exceptions when arguments aren't valid inputs Write code to change the state of the contract
34
Future proofing examples
Emergency stop Rate limiters Delay action Limit the balance
35
Emergency stop
Stop deployed contract by trusted admins defined in contract
36
Rate limiters
Stop a method in a contract being called so often it effects the operation of the contract
37
Delay actions
Slow things down to give contract owners time to react to a malicious event
38
Limit the balance
Monitor the amount of Ether and reject payments which exceeed the predefined maximum
39
Smart contract drawbacks (governing body)
Encoding and automating the execution of a complex agreement dependent on formal rules with well-specified inputs Not flexible for unpredictable and unforeseen events. Rules may need to be slightly altered. Need for human oversight as people are better at responding to complex eventualities (May need governing body intervention)
40
Smart contract drawbacks (early stages)
Long way away from being an independent contract with no reference to natural language document. Natural language contracts with encoded payment and performance mechanisms. Still far away from contract being written in code fully
41
Smart contract drawbacks (Grey Areas)
No flexibility in contract or ability to provide reasoned analysis E.g. indemnity and amounts payable subject to individual facts in question subject to court interpretation
42
Smart contract drawbacks (Acts as a judge)
Smart contracts would need to act as a judge. Taking spirit of contract into account and make a decision which is fair in unclear circumstances and extenuating circumstances. Smart contracts follow the rules encoded and cannot look at circumstances or the spirit of a contract
43
Smart contract drawbacks (Unclear Legal Justification)
Generally don't encode obligiations and rights which are legally binding Software agent acts within a distributed ledger in an automated way Emulates contract logic in the real world in the distributed ledger world. Legal justification unclear.
44
Smart contract drawbacks (Flexibility)
Flexibility key in ensuring commercial agreements operate as intended. Smart contracts are black and white by nature Traditional contracts have flex room in them ("reasonable efforts", "material adverse change" are expressions with flexibility and allow parties to resolve issues by not determining in advance exactly what the obligation involves)
45
Smart contract drawbacks (Oracles as judge)
Oracles act as dumped down version of a judge Rights to a digital asset ultimately decided by some authority and oracle needs to be trusted Contract written with the subjectivity and risk of human judgement