Skip to content

Commit

Permalink
fix(bridge): important details on DRT (#19)
Browse files Browse the repository at this point in the history
## Description

While testing the Bridge Client, I've realized that we're missing some
important details on the Deposit Request Transaction (DRT) about:

1. that the multisig N-of-N is a Schnorr aggregated sig
1. that the `OP_RETURN` needs to be the first output

---

## Type of Change

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

---

## Checklist

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

---

## Reviewer Checklist

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

---

**Thank you for contributing to our documentation!**
  • Loading branch information
john-light authored Oct 12, 2024
2 parents ec0c3ad + 9bfd71d commit d39aa27
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
8 changes: 7 additions & 1 deletion docs/technical/bitcoin-bridge.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,20 @@ who sends 10[^fees] BTC to a P2TR address, where:
1. The script path spend has two paths:
1. "Deposit path", an $N$-of-$N$ multisig path,
where $N$ is the number of operators in the bridge.
Note that this uses Schnorr key aggregation,
hence the signature is aggregated into a single signature that
validates all $N$ operators' signatures.
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 approximately 8.5 hours,
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),
output, that must be the **second** output of the transaction in order for the
sequencer to be able to detect the transaction.
The `OP_RETURN` output can be up to 80 bytes long
(according to bitcoin standardness policy),
and is composed of the following data:

1. Magic bytes.
Expand Down
1 change: 1 addition & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ spell-check:
spell-add *WORDS:
@echo "Adding {{ WORDS }} to the dictionary"
for word in {{ WORDS }}; do echo $word >> project-words.txt; done
@just spell-sort

# Sort the dictionary
spell-sort:
Expand Down
1 change: 1 addition & 0 deletions project-words.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
NUMS
PUSHBYTES
Rollkit
Schnorr
Taproot
Tapscript
Taptree
Expand Down

0 comments on commit d39aa27

Please sign in to comment.