Skip to content

Commit 7745219

Browse files
Update Wallet.md
1 parent 3282753 commit 7745219

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

docs/MiniMintDetails/Wallet.md

+13-13
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ sidebar_position: 4
44

55
# Fedimint Wallet
66

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
88
exchange for blind tokens and to make payouts when clients want to withdraw. Generally it is just a multisig wallet
99
defined by a script descriptor. For example
1010

@@ -21,7 +21,7 @@ will also use a randomness beacon.
2121

2222
## Chain tip consensus
2323

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
2525
federation members might see different chain tips either due to latency or even shallow forks.
2626

2727
To avoid the forking
@@ -58,19 +58,19 @@ $$f$$
5858

5959
malicious proposals do not suffice to meaningfully alter the median.
6060

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
6262
of the operators and outside our protocol.
6363

6464
## Fee consensus
6565

6666
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.
6969

7070
Naively we could use an algorithm that uses on-chain analysis to determine proper fee levels. But we only agree on
7171
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:
7474

7575
1. Query `bitcoind` for the current optimal fee rate
7676
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
8282

8383
In some cases it is useful to have access to agreed-upon, fair randomness. Thus every round every participant also
8484
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
8686
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.
8888

8989
## Address Derivation
9090

@@ -104,7 +104,7 @@ When depositing Bitcoin into the federation a client proceeds as follows:
104104
3. Send BTC to the resulting address
105105
4. Generate [TxOutProof] and fetch raw transaction. These compact data structures allow the federation to verify the
106106
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
108108
deposited. The federation should require a signature using the secret key.
109109

110110
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.
114114

115115
## Sending Bitcoin
116116

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,
119119
the randomness beacon is used to derive a random change address just as a deposit address would be derived.
120120

121121
This transaction is then signed by each participant individually and the signatures broadcasted via the consensus
122122
protocol. Note that due to the transaction being generated deterministically it does not need to be exchanged itself.
123123

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

Comments
 (0)