Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: apply formatting updates #14

Merged
merged 6 commits into from
Oct 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 15 additions & 9 deletions docs/technical/bitcoin-bridge.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ it is broadcast to bitcoin for confirmation.

Deposits and withdrawals are allowed in a denomination of $D$ BTC where
$D = 10 \ \text{BTC}$ is a value predefined by the bridge federation.
The operator fee is set at 5% of the bridge denomination.
The minimum relay fee for transactions is 10 satoshis per vByte.

!!! info

Expand All @@ -44,7 +46,9 @@ it is broadcast to bitcoin for confirmation.
The deposit process is initiated by the user,
who sends 10[^fees] BTC to a P2TR address, where:

[^fees]: The user must pay the bitcoin network fees for both the Deposit Request and Deposit Transactions.
[^fees]:
The user must pay the bitcoin network fees for both
the Deposit Request and Deposit Transactions.

1. The key path spend is unspendable, following
[BIP 341](https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki#constructing-and-spending-taproot-outputs)
Expand All @@ -68,8 +72,8 @@ who sends 10[^fees] BTC to a P2TR address, where:
1. "Take back" path,
which allows the user to take back their funds if the bridge fails to
move funds from the Deposit Request Transaction (DRT)
into the bridge address within a two-week period,
i.e. it is time-locked and the user provides a signature to spend it.
into the bridge address within a 1-week period,
i.e. it is time-locked and the user can spend it by providing a signature.

This transaction has some metadata attached to it, in the form of an `OP_RETURN`
output, that can be up to 80 bytes long (according to bitcoin standardness policy),
Expand Down Expand Up @@ -122,12 +126,14 @@ sequenceDiagram
The user requests a withdrawal on Strata and an operator is assigned to
fulfill the request on bitcoin:

1. The user requests a withdrawal making sure to burn the
same amount of `BTC` on Strata.
1. The assigned operator creates and signs a Withdrawal Transaction
(WT) where they spend 10 BTC from the bridge address' UTXO set,
while subtracting the operator's fee and the mining fee,
and requests the other $N−1$ operators to sign
1. The user initiates a withdrawal request, in response to which the corresponding
amount of Strata BTC is burned.
1. After the burn is confirmed, the assigned operator creates and signs
Withdrawal Transaction (WT) on the bitcoin blockchain where they spend 10 BTC
from the bridge address' UTXO set,
while subtracting the operator's fee (5% of the bridge denomination)
and the mining fee (minimum 10 satoshis per vByte),
and requests the other $N-1$ operators to sign
the Withdrawal Transaction.
1. Once all the signatures have been aggregated, the transaction is submitted to
bitcoin.
Expand Down