Closed whoabuddy closed 1 year ago
We found a possible issue in the implementation and could definitely use some feedback.
If we boil this down to the steps in the Miro doc:
User = party sending BTC TX Runner = party processing STX TX to receive BTC (fee implied)
Two options that immediately come to mind:
Both have some drawbacks, and this will require us to carefully think through the states within the minting process to make sure there are no dead ends.
For option 1, some questions from the technical call:
Just dropping the nBTC paper for reference. Its different as users create a threshold signature sent to a taproot address but maybe has enough overlap to be helpful.
I just set up a testnet node to see if i can deploy the script and get a better understanding.
This has been further simplified by looking at the NFT mint as one half of a Catamaran Swap, where the BTC will go directly to a single address (the artist, charity, etc) and through monitoring that BTC address the subsequent mint can be processed on the Stacks side.
Next up will be handling the ownership piece in #6
This issue covers one of the major milestones / protocol design points: we need a way to receive BTC from any wallet (linking #2 as well).
Looking at the normal model for Clarinet, this would be done with an authority address which represents the Bitcoin/Stacks keys running the chainhook.
PROS: simple, single address to send to CONS: no decentralization, no way to get BTC back on failure?
Looking at HTLCs like those used with Magic Bridge, this would be done by creating a deterministic Bitcoin address that locks the funds up for a set amount of time. During that time, the party processing the transaction on the Stacks side can perform the mint action, then claim the BTC as a result.
PROS: single address to send to, deterministic address can be externally verified CONS: difficult to know address to monitor
Combining the two may be a useful approach here, but we want to avoid any unnecessary complexity as well.
Also worth noting - to run a chainhook it requires a Bitcoin + Stacks node (handled by
clarinet integrate
for devnet), with the chainhook acting as an event observer for the node.