mattySTX Profile picture
Dec 14 33 tweets 8 min read
1/ The long awaited $sBTC whitepaper just dropped.

Nothing can beat a firsthand read of the paper yourself, but having read through the whole thing, here are a few key takeaways and topics to focus on:
2/ Trustlessly using native #Bitcoin for smart contract applications (dApps, DeFi, etc) has remained an elusive "holy grail".

The fundamental challenge is Bitcoin itself is not programmable. Some may say this is a flaw in Bitcoin, while others believe this is a core strength.
3/ The ethos in the @Stacks ecosystem is to extend #Bitcoin functionality, and leverage its security as the most secure base settlement layer, without modifying or altering Bitcoin itself.
4/ Barring options that would alter #Bitcoin itself, attempts to make BTC more accessible and programmable have required significant tradeoffs.

For example $wBTC, wrapped BTC on Ethereum, is *custodial*, meaning it requires trusting the centralized entity backing wBTC
5/ As we've seen just this year from Celsius, BlockFi, FTX, Hodlnaut, and others, this is far from ideal, and not consistent with the trustless and decentralized ethos of #Bitcoin itself.
6/ Another option that lives between fully-centralized and highly decentralized extremes is to take a federated approach.

#RSK takes this approach with their $RBTC token, requiring users to trust in a federated network of centralized entities backing RBTC with native BTC.
7/ Other approaches which are further decentralized, (in theory) such as $tBTC or $renBTC, still require a degree of trust in network operators, rely on chains that do not ultimately settle to the Bitcoin chain, and/or require inputs from 3rd party oracles to function correctly.
8/ Unlike earlier attempts, $sBTC is the first non-centralized representation of native Bitcoin on a smart contract chain that settles to, and reaches finality on, the Bitcoin chain.

In other words, sBTC is native Bitcoin on Stacks, and the Stacks chain settles to Bitcoin.
9/ $sBTC also leverages some additional traits unique to @Stacks such as smart contracts that can read Bitcoin state, that Stacks natively forks with Bitcoin forks, a built in on-chain price oracle with BTC, and other mechanics from Stack's PoX consensus mechanism.
10/ (I've shared another thread at the end of this one w/ more about Stacks and how it settles to the Bitcoin chain for those interested).

Staying on $sBTC for now...

We've discussed the problem sBTC is solving, but how does it work and what tradeoffs does its approach make?
11/ There are two primary moving pieces to $sBTC to understand:

a) Peg-ins: converting native BTC 1:1 to sBTC on Stacks
and
b) Peg-outs: converting sBTC on Stacks 1:1 to native BTC

We'll begin with peg-ins
12/ To peg-in, users send a native $BTC transaction, sending for example 0.3 BTC to a "threshold signature wallet" - basically a multisig native Bitcoin wallet that requires a certain percentage of signers.

For brevity, I'll refer to this special wallet as the "TS wallet".
13/ When a user send a peg-in request by sending native $BTC to the TS wallet (the threshold signature wallet), they don't pay any fees other than Bitcoin tx gas fees

The @Stacks chain then natively observes when the BTC is received by the TS wallet, with no 3rd parties required
14/ Once the $BTC is received, a 1:1 corresponding amount of $sBTC is minted on the @Stacks chain.

So in our example, for the BTC user who sent 0.3 BTC, their corresponding Stacks wallet would receive 0.3 sBTC after the native BTC transaction is confirmed.
15/ The TS wallet they sent their 0.3 $BTC to is controlled by stackers.

Stackers are the collective group of $STX holders that have locked up their STX in the PoX consensus mechanism for that cycle.
16/ More specifically, the TS wallet is controlled by a threshold of 70% of stackers, meaning it would take 70% or more of stackers to use the wallet for any purpose - well intentioned or not (more on that later).
17/ The TS wallet contains native BTC in a 1:1 ratio to the total existing supply of sBTC. Anyone, at any time, can see on-chain how much native BTC is in the TS wallet, and how much sBTC exists in total.

What though, prevents wallet maintainers from stealing the native BTC?
18/ This brings us to peg-out requests...

Returning to our example, after using their 0.3 sBTC in a variety of DeFi, dApp, and smart contract applications, the user decides to convert their 0.3 sBTC back into native 0.3 BTC.
19/ To do this, they send a peg-out request to stackers that is broadcast as a native Bitcoin transaction on the BTC chain.

Stackers then need to respond within roughly 24 hours - they do so signing a transaction on the BTC TS wallet.
20/ This means that when stackers behave well, they process the sBTC peg-out request, sending a native BTC tx of 0.3 *from* the TS wallet *to* the peg-out requester's BTC address and burning the corresponding 0.3 sBTC.
21/ A quick note for existing stackers wondering how this signing process will work.

Unless a stacker is malicious, signing would be akin to running mining software, signing transactions for peg-out requests that are properly submitted.
22/ So what makes stackers behave well though?

What ensures they sign peg-out requests, instead of doing nothing, or even worse, instead of signing txs to send native BTC from the TS wallet to themselves?
23/ In short, two factors - decentralization and economic incentives.

Firstly, greater than 70% of stackers are required to sign the TS wallet to send native BTC transactions, meaning more than 70% would need to collude in order to send malicious txs.
24/ Secondly, economic incentives come into play. If stackers do not, or can not (because they misused the native BTC) process peg-out requests, then their $STX remains locked, and they additionally forfeit their PoX rewards.
25/ As an additional feature to improve resiliency, if stackers are taking too long to respond to peg-out requests, then the native BTC PoX rewards typically paid to stackers are instead routed to fulfill peg-out requests.
26/ Together, this means for stackers to abuse the TS wallet, there must be a material concentration in stackers that collude and they must either be irrational, or they must be both short-term profit motivated and their collateral must be less than the BTC in the TS wallet.
27/ That isn't to say risks don't exist or that the system doesn't care at all whether stackers behave well or not

While the 1:1 ratio of sBTC to BTC does not depend on value of stacked $STX, the total value of the BTC in the TS wallet to the total value stackers have locked up
28/ The system has limits in place to avoid this happening, such as a cap on the total amount of $sBTC that can created in relation to the total value of what stackers have locked up.

Nevertheless, collateral risks exists, which everyone should be aware of.
29/ In summary, $sBTC is the first trustless peg of native $BTC that is not federated, does not rely on 3rd party oracles, and which exists on a chain that is secured by, and ultimately settles to, the native BTC itself.
30/ Users of $sBTC don't have to pay fees to create sBTC or redeem it for native $BTC beyond native BTC tx gas fees that every BTC tx must pay.

Stackers still earn the yield from PoX consensus, but must now perform even more value for the network to be eligible to do so.
31/ And protocols, dApps, Defi, smart contracts, and more on @Stacks can make use of a programmable asset, $sBTC, redeemable 1:1 for native $BTC, and without any changes made to Bitcoin itself.
32/ Thanks for reading. Nothing replaces reading the whitepaper yourself though, so I highly recommend checking it out if you're interested:

33/33 And as promised, here is an earlier thread that gets into @Stacks itself, its PoX consensus mechanism, and how Stacks transactions ultimately settle to the Bitcoin chain itself:

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with mattySTX

mattySTX Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @mattyTokenomics

Jul 8
State of $STX Mining - July 2022

I have compiled a detailed report on the last 12 months of @Stacks mining.

The report examines miner profitability, decentralization, strategy, and insights for how to improve PoX.

Here are some key findings... 🧵

docs.google.com/document/d/e/2…
Stacks blocks occur one every 11.6 minutes on average.

5.17 blocks per hour
124 blocks per day
17 days per 2,100 stacking cycle
There are typically 7.3 miners on a given day.

It typically requires 3.7 miners on a given day to combine in order to stage a "51% attack".
Read 9 tweets
May 10
Stable coins like $UST are hard to keep stable.

In fact, any tokenized asset is difficult to keep pegged to its underlying value. (Stable coins are really just a subset of tokenized assets - tokenized fiat USD)

Here's why tokenizing assets (of any kind) is a challenge...

🧵
Let's start with tokenized fiat USD, ie stable coins.

The most *direct* way to tokenize USD is to have a bank account of actual USD, and issue a stable coin like $USDC that is 1:1 matched to USD held in a centralized, traditional bank account.

Obviously this has issues...
Which is why so many DeFi protocols have attempted fully on chain, decentralized, algorithmic stable coins.

This shifts the problem - if not backed 1:1 by literal USD sitting in a vault, what are the stable coins backed by?

Which introduces another element, collateral...
Read 30 tweets
Feb 10
Noticing healthy skepticism about @Stacks and its claim to be "smart contracts for #Bitcoin."

Bottom line: Stacks enables fully expressive smart contracts secured by #BTC.

How does $STX do it?
Most people have heard that $STX chain state is secured on $BTC in each block, so that the BTC chain is the ultimate source of truth for Stacks.

To which a natural response is often:
"So what? Any chain could write its state to BTC!"
And that's true, any chain *could* write its state to $BTC.

For example, you could write each $ETH block's hash to each BTC block. But would that make ETH smart contracts for Bitcoin?

Of course not. So what makes $STX any different?
Read 25 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(