This repository has been archived by the owner on Dec 4, 2024. It is now read-only.
generated from stacks-network/.github
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* First draft of sBTC DR docs, so we can start working and discussing * Apply suggestions from code review Co-authored-by: Mårten Blankfors <[email protected]> * feat: add boostrap page * feat: add simple flow page for sbtc 0.1 * summary of hand-off process clarified which contract call --------- Co-authored-by: MarvinJanssen <[email protected]> Co-authored-by: Mårten Blankfors <[email protected]> Co-authored-by: friedger <[email protected]> Co-authored-by: José I. O <[email protected]>
- Loading branch information
1 parent
11a2e8d
commit 8e5bfd2
Showing
5 changed files
with
61 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Bootstrapping sBTC 0.1 | ||
|
||
## Local setup | ||
### Requirements | ||
* install [clarinet](https://github.com/hirosystems/clarinet) | ||
* checkout sbtc-mini/631-deployments branch of repository [github.com/Trust-Machines/stacks-sbtc](https://github.com/Trust-Machines/stacks-sbtc) | ||
|
||
### Launch devnet | ||
|
||
In a first console | ||
``` | ||
cd sbtc-mini | ||
# Press N when asked to overwrite deployment script | ||
./scripts/integration-test.sh | ||
``` | ||
See clarinet dashboard what until local devnet is ready (around block 137) | ||
|
||
![clarinet dashboard](https://user-images.githubusercontent.com/1449049/258456703-44d219ae-3516-47a3-aa4b-d3e6dc6a8f6a.png) | ||
|
||
In a second console run the bootstrap call | ||
|
||
``` | ||
# Press Enter when asked to overwrite | ||
clarinet deployments apply deployments/bootstrap.devnet-plan.yaml | ||
``` | ||
|
||
In first console, press N to produce a block and see how the tx is processed. | ||
|
||
See `settings/Devnet.toml` for seed phrases for pre-filled accounts. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Hand-off process | ||
|
||
The contract call required to confirm the hand-off process is `sbtc-hand-off::relay-hand-off-fulfillment`. | ||
|
||
The hand-off process can start during the `start-transfer-window` window of the current cycle which is defined in the sbtc-stacking-pool contract as the `transfer` state. The length of the window is defined in the sbtc-staking-pool contract as `normal-transfer-period-len`. | ||
|
||
The hand-off can be triggered when a Bitcoin transaction that sends the peg-balance to the shared threshold address is confirmed. This Bitcoin transaction must have all of its outputs pointing to the next treshold wallet scriptpubkey. It is not a hard requirement that all of the outputs aren't required to point to the shared treshold address, in this implementation of the contract, it is (open to other implementations). The value of all the outputs must be greater than or equal to the peg balance for the hand-off function to pass. | ||
|
||
The transaction being confirmed must be submitted in the segwit-encoded format even if its inputs do not contain segwit inputs (open to other implementations). | ||
|
||
# Incentives | ||
|
||
The signers are incentivized to confirm that the hand-off process has been fulfilled or else penalties will start to be applied. We're assuming happy path in the DR so these penalties are not applied. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Simple Flow | ||
|
||
## Local environment | ||
Signer uses wallet_1, wallet_2, wallet_3 from the settings.toml file. | ||
|
||
sBTC User uses wallet_9. | ||
|
||
1. In cycle N registration window (block #140), signer calls sbtc-stacking-pool.signer-pre-register with wallet_1 btc address as reward address. | ||
2. In cycle N + 1 registration window (block #150), signer calls sbtc-stacking-pool.signer-register with wallet_2 btc address as reward address and wallet_3 public key for sBTC wallet. | ||
3. In cycle N + 1 voting window (block #156), signer calls sbtc-stacking-pool.vote-for-threshold-wallet-candidate for the wallet_3 btc address. | ||
4. User sends deposit tx (using sbtc-cli) from wallet_9 to ??? |