Skip to content

Commit

Permalink
docs: apply formatting updates (#14)
Browse files Browse the repository at this point in the history
* docs: apply formatting updates
# Documentation Pull Request Template

## Description

This pull request updates the Bitcoin bridge documentation to improve clarity, accuracy, and completeness. The main changes are:

1. Update time-lock to 1 week based on current DRT implementation
2. Add information on current operator fee and mining fees
3. Ensure proper nesting in points of deposit process
4. Minor improvements to the withdrawal process description for better clarity.

These updates aim to provide more accurate and up-to-date information about the Bitcoin bridge operations, enhancing user understanding and reducing potential misinterpretations.

---

## Type of Change

- [ ] New Document
- [x] Update to Existing Document
- [ ] Bug Fix
- [ ] Question/clarification
- [ ] Other (please describe):

---

## Related Issues

Fixes #[issue number related to documentation update, if any]

---

## Checklist

- [x] I have reviewed the existing documentation to avoid duplication.
- [x] The new or updated document includes clear and concise information.
- [ ] All relevant sections (e.g., introduction, usage examples, references)
      are included.
- [x] The document follows the project's style guide and formatting rules.
- [ ] I have included any necessary references or external resources.
- [x] Spellcheck and grammar check have been performed.
- [x] (For updates) I have verified that the changes reflect the current state
      of the project.

---

## Additional Information

The updates to the time-lock period and fee information reflect the current implementation of the Bitcoin bridge. The restructuring of certain sections aims to improve readability and reduce potential misunderstandings.

---

## Reviewer Checklist

- [ ] The purpose and scope of the document are clear.
- [ ] The document is easy to understand and follow.
- [ ] There are no typos or grammatical errors.
- [ ] All necessary sections are included and well-structured.
- [ ] The document is consistent with the project's style guide.
- [ ] Any referenced links or resources are valid and appropriate.

* fix formatting issue

* Fix formatting / typos

* Fix typo

* docs: fix line length format

Co-authored-by: Jose Storopoli <[email protected]>

* fix: lints and formatting

---------

Co-authored-by: sudikshyapant <[email protected]>
Co-authored-by: John Light <[email protected]>
Co-authored-by: Jose Storopoli <[email protected]>
  • Loading branch information
4 people authored Oct 7, 2024
1 parent b67cded commit 17049b3
Showing 1 changed file with 15 additions and 9 deletions.
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

0 comments on commit 17049b3

Please sign in to comment.