Skip to content

Commit ee2a416

Browse files
authored
Add timeline to non-cooperative exit (#92)
* show vtxo tree with radix 4 * leaving.md: - fix links to nomenclature - add timeline to non-cooperative exit
1 parent 53bd542 commit ee2a416

File tree

2 files changed

+58
-8
lines changed

2 files changed

+58
-8
lines changed

website/docs/learn/leaving.md

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,56 @@ Alice wants to leave the Ark and get her funds back on-chain. It requires an on-
1111

1212
#### Timeline of events
1313

14-
1. Alice tells ASP she wants to trade [VTXO](#vtxo) for UTXO
15-
2. ASP (with Alice) prepares next [Pool transaction](#pool-transaction-aka-ark-transaction):
14+
1. Alice tells ASP she wants to trade [VTXO](./nomenclature#vtxo) for UTXO
15+
2. ASP (with Alice) prepares next [Pool transaction](./nomenclature#pool-transaction-aka-ark-transaction):
1616
- an additional output is added, locked by `Alice`
17-
3. Alice creates a [Forfeit transaction](#forfeit-transaction-):
17+
3. Alice creates a [Forfeit transaction](./nomenclature#forfeit-transaction):
1818
- spends from VTXO (1) with `Alice + ASP`
1919
- adds connector output from Pool transaction (2) as input
2020
- signs it and send it to the ASP
21-
4. ASP broadcasts [Pool transaction](#pool-transaction-aka-ark-transaction)
21+
4. ASP broadcasts [Pool transaction](./nomenclature#pool-transaction-aka-ark-transaction)
2222
5. Alice has now a new UTXO
23-
6. For at most 4 weeks, Alice will be able to double spend her [VTXO](#vtxo), but if she does it, the ASP will have time (24 hours) to grab the funds from the [VTXO](#vtxo) to itself using the [Forfeit transaction](#forfeit-transaction-)
24-
23+
6. For at most 4 weeks, Alice will be able to double spend her [VTXO](./nomenclature#vtxo), but if she does it, the ASP will have time (24 hours) to grab the funds from the [VTXO](./nomenclature#vtxo) to itself using the [Forfeit transaction](./nomenclature#forfeit-transaction)
2524

2625
### Non-cooperative exit
2726

2827
If ASP is unresponsive, Alice can unilaterally exit revealing the branch of the Pool transaction that locks her funds.
2928

3029
#### Timeline of events
3130

32-
TBD
31+
1. Assuming a [VTXO](./nomenclature#vtxo) tree with radix of 2 and 8 [VTXOs](./nomenclature#vtxo):
32+
33+
```mermaid
34+
flowchart TB
35+
tx1(TX 1) --> tx2(TX 2)
36+
tx1 --> tx3(TX 3)
37+
tx2 --> tx4(TX 4)
38+
tx2 --> tx5(TX 5)
39+
tx3 --> tx6(TX 6)
40+
tx3 --> tx7(TX 7)
41+
tx4 --> v1(VTXO 1)
42+
tx4 --> v2(VTXO 2)
43+
tx5 --> v3(VTXO 3)
44+
tx5 --> v4(VTXO 4)
45+
tx6 --> v5(VTXO 5)
46+
tx6 --> v6(VTXO 6)
47+
tx7 --> v7(VTXO 7)
48+
tx7 --> v8(VTXO 8)
49+
```
50+
51+
2. Assuming VTXO 1 and 2 belong to Alice and Bob
52+
3. Alice reveals the [VTXO](./nomenclature#vtxo) tree to spend the [Shared Output](./nomenclature#shared-output-aka-shared-utxo).
53+
4. Alice doesn't need to reveal the entire tree, just enough to validate it:
54+
55+
```mermaid
56+
flowchart TB
57+
tx1(TX 1) --> tx2(TX 2)
58+
tx1 --> tx3(TX 3)
59+
tx2 --> tx4(TX 4)
60+
tx2 --> tx5(TX 5)
61+
tx4 --> v1(VTXO 1)
62+
tx4 --> v2(VTXO 2)
63+
```
64+
65+
5. Alice will need to wait 24 hours to be able to spend her [VTXO](./nomenclature#vtxo). This gives enough time to the ASP to prevent any double spend attempts by Alice.
66+
6. Bob can also spend his [VTXO](./nomenclature#vtxo) in 24 hours, or do nothing and maintain his [VTXO](./nomenclature#vtxo) on the Ark.

website/docs/learn/nomenclature.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ Different ASPs can use different ways for users to board their Ark.
118118

119119
### Shared output (aka Shared UTXO)
120120

121-
- Represents a binary tree of transactions
121+
- Represents a tree of transactions
122122
- In an optimistic scenario, this tree is never revealed
123123
- Each leaf on this tree represents a VTXO
124124

@@ -137,3 +137,19 @@ flowchart LR
137137
end
138138
shared --> tx1
139139
```
140+
141+
- Tree can have a radix higher than 2 (ex: radix 4)
142+
143+
```mermaid
144+
flowchart LR
145+
subgraph Onchain
146+
shared(Shared output)
147+
end
148+
subgraph Virtual
149+
tx1(TX 1) --> v1(VTXO 1)
150+
tx1 --> v2(VTXO 2)
151+
tx1 --> v3(VTXO 3)
152+
tx1 --> v4(VTXO 4)
153+
end
154+
shared --> tx1
155+
```

0 commit comments

Comments
 (0)