-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathescrow.html
More file actions
148 lines (145 loc) · 5.7 KB
/
Copy pathescrow.html
File metadata and controls
148 lines (145 loc) · 5.7 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Escrow and settlement — SatCode</title>
<meta name="description" content="A four-path Taproot vTXO shared by both dispute-resolution modes." />
<meta name="theme-color" content="#0a0a0a" />
<link rel="stylesheet" href="style.css" />
</head>
<body>
<a class="skip-link" href="#main">Skip to content</a>
<header class="site-header">
<div class="header-inner">
<a class="wordmark" href="index.html">satcode<span>.</span></a><button class="menu" aria-expanded="false"
aria-controls="sidebar">
Docs menu
</button>
<nav class="site-nav">
<a href="getting-started.html">How it works</a><a href="glossary.html">Glossary</a><a href="faq.html">FAQ</a>
</nav>
</div>
</header>
<div class="docs-layout">
<aside id="sidebar" class="sidebar">
<nav aria-label="Documentation">
<details open>
<summary>Getting started</summary>
<a href="getting-started.html">How SatCode works</a><a href="roles.html">Roles & responsibilities</a><a
href="agents.html">Who is SatCode for?</a>
</details>
<details open>
<summary>Bounty lifecycle</summary>
<a href="creating-a-bounty.html">Define & negotiate</a><a href="funding-escrow.html">Fund escrow</a><a
href="submitting-work.html">Submit & settle</a><a href="resolving-disputes.html">Resolving disputes</a>
</details>
<details open>
<summary>Architecture</summary>
<a href="architecture.html">System architecture</a><a href="escrow.html">Escrow & settlement</a><a
href="dispute-resolution.html">Dispute resolution</a><a href="trust-model.html">Trust model</a><a href="bitcoin-enforcement.html">Bitcoin enforcement</a>
</details>
<a class="side-single" href="glossary.html">Glossary</a><a class="side-single" href="faq.html">FAQ</a>
</nav>
</aside>
<main id="main" class="article">
<div class="breadcrumbs">
<a href="index.html">Home</a><i>/</i><span>Architecture</span>
</div>
<header class="article-head">
<p class="kicker">Architecture</p>
<h1>Escrow and settlement</h1>
<p>
A four-path Taproot vTXO shared by both dispute-resolution modes.
</p>
</header>
<div class="article-body">
<h2 id="leaves">Four spending paths</h2>
<table>
<thead>
<tr>
<th>Leaf</th>
<th>Purpose</th>
<th>Required</th>
</tr>
</thead>
<tbody>
<tr>
<td>A</td>
<td>Cooperative payout</td>
<td>Maker + taker</td>
</tr>
<tr>
<td>B</td>
<td>Taker wins dispute</td>
<td>Arbiter threshold + taker</td>
</tr>
<tr>
<td>C</td>
<td>Maker wins dispute</td>
<td>Arbiter threshold + maker</td>
</tr>
<tr>
<td>D</td>
<td>Late maker reclaim</td>
<td>Maker after timeout</td>
</tr>
</tbody>
</table>
<div class="infobox">
<p>
<pre><code>
Taproot output (with SDK output introspection)
├── Internal key: NUMS point (provably unspendable)
│
├── Leaf A — Happy path (Maker + Taker cooperate)
│ <maker_pubkey> OP_CHECKSIGVERIFY
│ <taker_pubkey> OP_CHECKSIG
│
├── Leaf B — Arbiter releases to Taker (taker wins dispute)
│ ⚠ CLTV must come FIRST so the final OP_CHECKSIG result gates the script:
│ <bounty_deadline + Δ_dispute> OP_CHECKLOCKTIMEVERIFY OP_DROP
│ <panel_aggregate_key> OP_CHECKSIGVERIFY
│ <taker_pubkey> OP_CHECKSIG
│
├── Leaf C — Arbiter releases to Maker (maker wins dispute)
│ <bounty_deadline + Δ_dispute> OP_CHECKLOCKTIMEVERIFY OP_DROP
│ <panel_aggregate_key> OP_CHECKSIGVERIFY
│ <maker_pubkey> OP_CHECKSIG
│
└── Leaf D — Maker reclaim (taker never accepted or bounty deadline passed)
⚠ MUST mature AFTER Leaf B/C so the panel can act before maker reclaims.
<bounty_deadline + 5 days + 2 days> OP_CHECKLOCKTIMEVERIFY OP_DROP
<maker_pubkey> OP_CHECKSIG
(Δ_dispute=5d, Δ_reclaim=2d → Leaf D opens 7 days after bounty_deadline)
</code></pre>
</p>
</div>
<h2 id="custody">What “non-custodial” means here</h2>
<p>
The Ark Operator co-signs rounds but cannot satisfy a leaf alone. An
arbiter threshold also cannot take the bounty: Leaves B and C
require the winning party. SatCode holds no escrow key.
</p>
<h2 id="timelocks">Ordering matters</h2>
<p>
Dispute leaves mature at the bounty deadline plus five days; maker
reclaim at plus seven. Reversing that order could let a maker
front-run a verdict. The taker must verify it.
</p>
</div>
<nav class="article-nav" aria-label="Article navigation">
<a href="architecture.html"><small>Previous</small>System architecture</a><a class="next"
href="dispute-resolution.html"><small>Next article</small>Dispute resolution →</a>
</nav>
</main>
</div>
<footer class="site-footer">
<div class="footer-inner">
<a class="wordmark" href="index.html">satcode<span>.</span></a>
<p>SatCode is currently in development.</p>
</div>
</footer>
<script src="main.js"></script>
</body>
</html>