-
Notifications
You must be signed in to change notification settings - Fork 0
/
DeFi.v
65 lines (51 loc) · 1.88 KB
/
DeFi.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
(* A theory of AMMs and DeFi, embedded in Coq
This is an outline of future work that leverages morphisms, bisimulations,
and meta specifications to create a theory of AMMs and DeFi, embedded in Coq.
Below is a rough sketch of what is needed, and a rough outline of
what development of a formalized theory of DeFi might look like.
*)
From Coq Require Import Basics.
From Coq Require Import List.
From Coq Require Import String.
From Coq Require Import Sets.Ensembles.
From Coq Require Import ZArith.
From Coq Require Import ProofIrrelevance.
From Coq Require Import Permutation.
From Coq Require Import FunctionalExtensionality.
From ConCert.Execution Require Import ChainedList.
From ConCert.Execution Require Import Blockchain.
From ConCert.Execution Require Import Serializable.
From ConCert.Execution Require Import ResultMonad.
From FinCert.Meta Require Import ContractMorphisms.
From FinCert.Meta Require Import ContractSystems.
From FinCert.Meta Require Import Bisimulation.
Import ListNotations.
(* What is needed for a theory of DeFi:
- Process-algebraic semantics which build off the bigraph encoding in
FinCert.Meta.ContractSystems
- Formalizations and axiomatizations of key building blocks of DeFi,
including:
- Token contracts (FA2, FA1.2, etc.)
- AMMs (a la Dexter2)
- other kinds of DEXs such as auctions
- etc.
With these we can build a theory of AMMs and DeFi in roughly the
following structure:
*)
Section Primitives.
(* a formal definition of key primitives and atomic abstractions such as:
- swaps
- swap rate
- exchange rate
- liquidity provider
- liquidity
*)
End Primitives.
Section Properties.
(* a formal derivation of key properties, such as:
- demand sensitivity
- incentive consistency
- positive trading cost
- zero-impact liquidity change
*)
End Properties.