@@ -4,7 +4,7 @@ sidebar_position: 4
4
4
5
5
# Fedimint Wallet
6
6
7
- To be backed by Bitcoin the federation needs a federated on-chain wallet. It is used to receive deposits that clients
7
+ To be backed by Bitcoin, the federation needs a federated on-chain wallet. It is used to receive deposits that clients
8
8
exchange for blind tokens and to make payouts when clients want to withdraw. Generally it is just a multisig wallet
9
9
defined by a script descriptor. For example
10
10
@@ -21,7 +21,7 @@ will also use a randomness beacon.
21
21
22
22
## Chain tip consensus
23
23
24
- To validate transactions a wallet needs to know the current chain tip. The problem with this is that different
24
+ To validate transactions, a wallet needs to know the current chain tip. The problem with this is that different
25
25
federation members might see different chain tips either due to latency or even shallow forks.
26
26
27
27
To avoid the forking
@@ -58,19 +58,19 @@ $$f$$
58
58
59
59
malicious proposals do not suffice to meaningfully alter the median.
60
60
61
- Of course this assumes that all honest participants stay reasonable close to the real chain tip, but this is the task
61
+ Of course this assumes that all honest participants stay reasonably close to the real chain tip, but this is the task
62
62
of the operators and outside our protocol.
63
63
64
64
## Fee consensus
65
65
66
66
We also face a similar problem when spending Bitcoin. While the destinations and amounts are generally assumed to be
67
- outputs of the consensus protocol and thus unproblematic one factor of transactions is not easily made deterministic:
68
- the fees. But to avoid depletion attacks by overpaying fees we need to agree on them.
67
+ outputs of the consensus protocol and thus unproblematic, one factor of transactions is not easily made deterministic:
68
+ the fees. To avoid depletion attacks by overpaying fees we need to agree on them.
69
69
70
70
Naively we could use an algorithm that uses on-chain analysis to determine proper fee levels. But we only agree on
71
71
a tip buried 100 blocks deep, which would make the algorithm quite unresponsive. Furthermore other algorithms that take
72
- the mempool into account may be preferable, but agreeing on the mempool is a fool's errand. Instead we use a modified
73
- version of the algorithm used for the chain tip consensus. During each round each, participant does the following:
72
+ the mempool into account may be preferable, but agreeing on the mempool is a fool's errand. Instead, we use a modified
73
+ version of the algorithm used for the chain tip consensus. During each round each participant does the following:
74
74
75
75
1 . Query ` bitcoind ` for the current optimal fee rate
76
76
2 . Propose said rate as the consensus fee rate
@@ -82,9 +82,9 @@ The median argument works similarly and we achieve an honest consensus on fee ra
82
82
83
83
In some cases it is useful to have access to agreed-upon, fair randomness. Thus every round every participant also
84
84
proposes 32bytes of random data. The ones included in the consensus outcome are then XORed to form the round's
85
- randomness beacon. We note that this is only safe if the items proposed to the consensus are encrypted till there is
85
+ randomness beacon. It is important to note that this is only safe if the items proposed to the consensus are encrypted till there is
86
86
agreement on which contributions will be included. This is the case for AlephBFT. Otherwise an attacker could wait for the
87
- other participants to announce their contribution and then adaptively chose his own to influence the outcome.
87
+ other participants to announce their contributions and then adaptively choose his own to influence the outcome.
88
88
89
89
## Address Derivation
90
90
@@ -104,7 +104,7 @@ When depositing Bitcoin into the federation a client proceeds as follows:
104
104
3 . Send BTC to the resulting address
105
105
4 . Generate [ TxOutProof] and fetch raw transaction. These compact data structures allow the federation to verify the
106
106
deposit with only the block hashes being synced and not the whole chain.
107
- 5 . The tweak together with the TxOutProof and the raw transaction can now be sent to the federation to prove money was
107
+ 5 . The tweak, together with the TxOutProof and the raw transaction, can now be sent to the federation to prove money was
108
108
deposited. The federation should require a signature using the secret key.
109
109
110
110
Note that only once the federation is in possession of the tweak can they actually spend the funds as it is also needed
@@ -114,11 +114,11 @@ to tweak the private keys.
114
114
115
115
## Sending Bitcoin
116
116
117
- Once the federation agrees on paying Bitcoin to a set of destinations every participant deterministically selects
118
- the necessary outputs. The previously agreed-upon fee rate is used to determine the fee. In case a change address is needed
117
+ Once the federation agrees on paying Bitcoin to a set of destinations, every participant deterministically selects
118
+ the necessary outputs. The previously agreed-upon fee rate is used to determine the fee. In case a change address is needed,
119
119
the randomness beacon is used to derive a random change address just as a deposit address would be derived.
120
120
121
121
This transaction is then signed by each participant individually and the signatures broadcasted via the consensus
122
122
protocol. Note that due to the transaction being generated deterministically it does not need to be exchanged itself.
123
123
124
- After receiving sufficient signatures each party can assemble the final transaction and broadcast it.
124
+ After receiving sufficient signatures, each party can assemble the final transaction and broadcast it.
0 commit comments