Replies: 1 comment
-
Updated the withdrawal flow to omit the envisioned consensus-breaking changes. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Goal
Define the sBTC 1.0 withdrawal flows and provide illustrations for these
Proposed withdrawal flow
The main steps of this flow are as follows.
withdraw-request
function in the.sbtc
contract..sbtc
contract.2.1. The signers create a "Withdrawal accept" transaction on Bitcoin which returns the requested amount to the designated address.
2.2. Once the Bitcoin transaction is confirmed, the Stacks node burns the equivalent amount of sBTC in the
.sbtc
contract.2.3. Finally, the signers prove to the chain that they have fulfilled their duty by calling the
withdraw-accept
function in the.sbtc
contract.withdraw-reject
function in the.sbtc
smart contract. This function does the following:3.1. Returns the sBTC to the holder.
3.2. Records the signer votes.
Finally, here is a summary of the necessary contract functions.
withdraw-request
(recipient_address, amount, max_fee)
amount
of sBTC into the.sbtc
contract and records the request to withdraw returning a uniquerequest_id
. Also records the maximum fee that the user may accept to pay for the withdrawal.withdraw-accept
(request_id, bitcoin_txid, output_index, signer_bitmap)
request_id
identifies the request,bitcoin_txid
andoutput_index
together identify the Bitcoin UTXO returning the requested amount of BTC to the user.signer_bitmap
records what each signer voted if this information is not already provided in the Bitcoin transactionwithdraw-reject
(request_id, signer_bitmap)
Discussion topics
Beta Was this translation helpful? Give feedback.
All reactions