@agoric/inter-protocol 0.13.2-dev-8dcc836.0 → 0.13.2-dev-1ab6c45.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/inter-protocol",
3
- "version": "0.13.2-dev-8dcc836.0+8dcc836",
3
+ "version": "0.13.2-dev-1ab6c45.0+1ab6c45",
4
4
  "description": "Core cryptoeconomy contracts",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -29,17 +29,17 @@
29
29
  },
30
30
  "homepage": "https://github.com/Agoric/agoric-sdk#readme",
31
31
  "dependencies": {
32
- "@agoric/assert": "0.5.2-dev-8dcc836.0+8dcc836",
33
- "@agoric/ertp": "0.15.4-dev-8dcc836.0+8dcc836",
34
- "@agoric/governance": "0.9.2-dev-8dcc836.0+8dcc836",
35
- "@agoric/internal": "0.2.2-dev-8dcc836.0+8dcc836",
32
+ "@agoric/assert": "0.5.2-dev-1ab6c45.0+1ab6c45",
33
+ "@agoric/ertp": "0.15.4-dev-1ab6c45.0+1ab6c45",
34
+ "@agoric/governance": "0.9.2-dev-1ab6c45.0+1ab6c45",
35
+ "@agoric/internal": "0.2.2-dev-1ab6c45.0+1ab6c45",
36
36
  "@agoric/nat": "^4.1.0",
37
- "@agoric/notifier": "0.5.2-dev-8dcc836.0+8dcc836",
38
- "@agoric/store": "0.8.4-dev-8dcc836.0+8dcc836",
39
- "@agoric/swingset-vat": "0.30.3-dev-8dcc836.0+8dcc836",
40
- "@agoric/vat-data": "0.4.4-dev-8dcc836.0+8dcc836",
41
- "@agoric/vats": "0.13.1-dev-8dcc836.0+8dcc836",
42
- "@agoric/zoe": "0.25.4-dev-8dcc836.0+8dcc836",
37
+ "@agoric/notifier": "0.5.2-dev-1ab6c45.0+1ab6c45",
38
+ "@agoric/store": "0.8.4-dev-1ab6c45.0+1ab6c45",
39
+ "@agoric/swingset-vat": "0.30.3-dev-1ab6c45.0+1ab6c45",
40
+ "@agoric/vat-data": "0.4.4-dev-1ab6c45.0+1ab6c45",
41
+ "@agoric/vats": "0.13.1-dev-1ab6c45.0+1ab6c45",
42
+ "@agoric/zoe": "0.25.4-dev-1ab6c45.0+1ab6c45",
43
43
  "@endo/bundle-source": "^2.3.1",
44
44
  "@endo/captp": "^2.0.15",
45
45
  "@endo/eventual-send": "^0.16.5",
@@ -49,7 +49,7 @@
49
49
  "@endo/promise-kit": "^0.2.49"
50
50
  },
51
51
  "devDependencies": {
52
- "@agoric/deploy-script-support": "0.9.5-dev-8dcc836.0+8dcc836",
52
+ "@agoric/deploy-script-support": "0.9.5-dev-1ab6c45.0+1ab6c45",
53
53
  "@endo/init": "^0.5.49",
54
54
  "@fast-check/ava": "^1.0.1",
55
55
  "ava": "^4.3.1",
@@ -76,5 +76,5 @@
76
76
  "publishConfig": {
77
77
  "access": "public"
78
78
  },
79
- "gitHead": "8dcc836823cd4b29aa86469f4a10bb5d5d27394f"
79
+ "gitHead": "1ab6c451d44e5d758713b7480cd34b8d47d04067"
80
80
  }
@@ -0,0 +1,71 @@
1
+ # Parity Stability Module
2
+
3
+ The Parity Stability Module supports efficiently minting/burning a stable token
4
+ at a specified fixed ratio to a reference stable token, which thereby acts as an
5
+ anchor to provide additional stability. For flexible economic policies, the fee
6
+ percentage for trading into and out of the stable token are specified
7
+ separately.
8
+
9
+
10
+ ## Usage
11
+
12
+ See the [Smart Wallet integration test](/packages/smart-wallet/test/test-psm-integration.js) for how it's used.
13
+
14
+ End users can make swap offers in the CLI or GUI.
15
+
16
+ ### CLI
17
+
18
+ See [psm.js command file](/packages/agoric-cli/src/commands/psm.js) and its [integration test script](/packages/agoric-cli/scripts/).
19
+
20
+ ```mermaid
21
+ sequenceDiagram
22
+
23
+ actor user
24
+
25
+ participant cli as Dapp PSM
26
+ participant disk
27
+ participant B as Cosmos / Swingset <br/> bridge
28
+ participant C as smart-wallet<br/>contract
29
+ participant PSM as PSM<br/>contract
30
+
31
+ user ->> cli: create a swap offer
32
+ user -->> disk: write offer data
33
+ user ->> cli: sign and send swap offer
34
+ disk -->> cli: read offer data
35
+ cli ->> B: spending transaction
36
+ B ->> C: unpack ocap data
37
+ C ->> PSM: route offer
38
+ ```
39
+
40
+
41
+ ### GUI
42
+
43
+ The GUI is in https://github.com/Agoric/dapp-psm
44
+
45
+ It introduces another layer of communication (between the dapp and Wallet UI):
46
+
47
+ ```mermaid
48
+ sequenceDiagram
49
+
50
+ actor user
51
+
52
+ participant dapp as Dapp PSM
53
+ participant ls as localStorage
54
+ participant ui as Wallet UI
55
+ participant Keplr
56
+ participant B as Cosmos / Swingset <br/> bridge
57
+ participant C as smart-wallet<br/>contract
58
+ participant PSM as PSM<br/>contract
59
+
60
+ user ->> dapp: configure offer and click
61
+ dapp ->> ls: write offer record
62
+ ls ->> ui: notify offer record
63
+ ui ->> user: display offer for signing
64
+ user ->> ui: click Approve
65
+ ui ->> Keplr: request signing
66
+ Keplr ->> user: pop-up transaction
67
+ user ->> Keplr: click to sign
68
+ Keplr ->> B: spending transaction
69
+ B ->> C: unpack ocap data
70
+ C ->> PSM: route offer
71
+ ```