Skip to content

Commit

Permalink
New stuff + restructuring
Browse files Browse the repository at this point in the history
  • Loading branch information
inariksit committed Jun 17, 2020
1 parent 2395f1d commit bc68b49
Show file tree
Hide file tree
Showing 13 changed files with 86 additions and 32 deletions.
2 changes: 1 addition & 1 deletion automatic_contract_processing.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ tags:

# Automatic contract-processing

Tasks that can be performed on <contract>s.
Tasks that can be performed on one or more <contract>s.

This list is from [Camilleri (2017)](https://gupea.ub.gu.se/bitstream/2077/53815/1/gupea_2077_53815_1.pdf), which in turn cites Prisacariu's presentation from 2013. Slides are no longer online.

Expand Down
9 changes: 2 additions & 7 deletions computable_contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,10 @@
date: "2020-06-15"
tags:
- paper
- concept
---

# Computable contracts
# Computable contracts (Surden, 2012)

Paper by Harry Surden from 2012.
TODO: read paper.


Also a general term. Examples of computable contracts:

- <daml_smart_contracts>
TODO: read paper.
19 changes: 2 additions & 17 deletions contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,11 @@ tags:

# Contract

_Contract_ means slightly different things in different fields. Following description paraphrased from [Camilleri (2017)](https://gupea.ub.gu.se/bitstream/2077/53815/1/gupea_2077_53815_1.pdf).
_Contract_ means slightly different things in different fields. [Camilleri (2017)](https://gupea.ub.gu.se/bitstream/2077/53815/1/gupea_2077_53815_1.pdf) lists the following 4.

### Legal contract

Normative text that describes an agreement between parties. The parties are bound by law to fulfil the contract. (Even if the contract is [ridiculous](https://www.rt.com/business/man-outsmarts-banks-wins-court-221/).)
<z:zettels?tag=contract&cf>

### Financial contract

A promise of payment between parties. It's kind of like money or other valuable goods, just potential sort of those. This means people sell and trade them, and they can change in value just like any goods.

Explanation that makese sense for a functional programmer:
Peyton Jones and Eber (2003) _[How to write a financial contract](https://citeseerx.ist.psu.edu/viewdoc/download;jsessionid=F1689CB5CC0D35AD06ACE3DD04FF14D2?doi=10.1.1.14.7885&rep=rep1&type=pdf)_

### Blockchain smart contract

Like previous, this is also a promise of exchanging goods between parties.

Unlike previous, a smart contract doesn't require third parties to make it reliable. It's reliable because it's
- Written as code. This means that conditions can be automatically validated. "Did Alice pay Bob 50 dollars" is not up to negotiation, it can be checked automatically.
- Distributed publicly in a decentralized system. This means that Bob can't just burn the contract after Alice has paid (or hack the server of a single provider that hosts the contract).

### Software engineering

Expand Down
25 changes: 25 additions & 0 deletions contracts_as_code.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
date: "2020-06-17"
tags:
- approach
---

# Contracts as code

Broad term that covers
- <automatic_contract_processing> of <legal_contract>s
- <smart_contract>

### Languages for writing contracts as code
- <daml>


### Terminology

Documenting here what terms are used where.

Used in Surden 2012 <computable_contracts>
- “computable contract(ing)”
- “data-oriented contract(ing)”
- “contract-as-data”
- “autonomous computer-to-computer contract(ing)”
8 changes: 5 additions & 3 deletions daml_smart_contracts.md → daml.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
---
date: "2020-06-15"
tags:
- language
---

# DAML smart contracts
# DAML

[DAML web page](https://daml.com/)

An interpretation of <rules_as_code>, where the <contract>s are
automatically generated and signed by computers and sent between servers.
A language for writing <smart_contract>.
The contract is automatically generated and signed by computers and sent between servers.

For example, one company places an order of T-shirts for a conference. Now it
is important for both companies that they can prove that the order is placed and confirmed
14 changes: 14 additions & 0 deletions financial_contract.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
date: "2020-06-17"
tags:
- concept
- contract
---

# Financial contract


A promise of payment between parties. It's kind of like money or other valuable goods, just potential sort of those. This means people sell and trade them, and they can change in value just like any goods.

Explanation that makes sense for a functional programmer:
Peyton Jones and Eber (2003) _[How to write a financial contract](https://citeseerx.ist.psu.edu/viewdoc/download;jsessionid=F1689CB5CC0D35AD06ACE3DD04FF14D2?doi=10.1.1.14.7885&rep=rep1&type=pdf)_
2 changes: 2 additions & 0 deletions formal_model.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
date: "2020-06-17"
tags:
- concept
---

# Formal model
Expand Down
2 changes: 1 addition & 1 deletion index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ Proposed solutions to fix legal drafting:

- <teach_humans>
- <summarize_for_humans>
- <automatic_contract_processing>
- <rules_as_code>
- <contracts_as_code>
- Legal <ontology>

Alternative points of view:
Expand Down
14 changes: 14 additions & 0 deletions legal_contract.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
date: "2020-06-17"
tags:
- concept
- contract
---

# Legal contract

Normative text that describes an agreement between parties.

The parties are bound by law to fulfil the contract. (Even if the contract is [ridiculous](https://www.rt.com/business/man-outsmarts-banks-wins-court-221/).)

Traditionally, a legal contract is drafted by humans. In the glorious future, we'll have <contracts_as_code>.
3 changes: 2 additions & 1 deletion rules_as_code.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ tags:

Legal drafting = writing code.

(Remember the old days when you had to write contract in English and then <formal_models_of_legal_text>)

Useful things can be generated from that code:
- <automatic_contract_processing>
- <legal_expert_systems>
Expand All @@ -16,4 +18,3 @@ Useful things can be generated from that code:

See also:
- <spreadsheets_for_law>
- <computable_contracts>
14 changes: 14 additions & 0 deletions smart_contract.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
date: "2020-06-17"
tags:
- concept
- contract
---

# Smart contract

Like <financial_contract>, this is also a promise of exchanging goods between parties.

Unlike traditional (financial) contract, a smart contract doesn't require third parties to make it reliable. It's reliable because it's
- Written as code. (<contracts_as_code>) This means that conditions can be automatically validated. "Did Alice pay Bob 50 dollars" is not up to negotiation, it can be checked automatically.
- Distributed publicly in a decentralized system. This means that Bob can't just burn the contract after Alice has paid (or hack the server of a single provider that hosts the contract).
4 changes: 3 additions & 1 deletion teach_humans.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ tags:

The only feasible approach before computers were mainstream.

(TODO: is there modern support for this approach?)
(TODO: modern support for this approach)

May use tools such as <visualization> or linters as help.

Examples:

Expand Down
2 changes: 1 addition & 1 deletion visualization.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ tags:
- approach
---

# Visualization of contracts
# Visualization

Visual representations of legal text, in order to make it easier for humans to read.

Expand Down

0 comments on commit bc68b49

Please sign in to comment.