Cointime

Download App
iOS & Android

Unlocking DeFi's Potential on Bitcoin while Preserving Protocol Security and Decentralization

After a very uncertain period, the market is finally moving again.

Bitcoin has climbed back to $30k, a very important and symbolic support.

Francesco's Joint is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.

As such, enthusiasm is slowly starting to spark.

Are we really going up?

I switch from max pain to max euphoria a few times a day.

Well, there’s no certainty on where we are right now, but one thing we do know: whenever there’s a market reversal towards the upside after a bottom, Bitcoin is the first asset to rise.

However, the returns of BTC may not be appealing enough for you crazy degens.

This article introduces Stacks, an interesting protocol trying to bring DeFi on top of BTC that may capture a big share of BTC upside.

Stacking Satoshis

The Bitcoin code base is very limited.

This is however to be intended as a feature, not a bug.

Bitcoin works exactly as it is intended to be.The code is written purposely to prioritize security, decentralization, and settlement on the network.

Any other functionality or feature introduced would come to the detriment of those.

Smart contract functionalities would, for example, introduce new logic and consequent risks to the code and the security model of Bitcoin would need to adapt accordingly.

This is an impossible scenario that would weaken the very reason why Bitcoin was created: Bitcoin is relatively slow and minimal by design and conservative in its evolution to preserve these powerful properties.

Therefore, let’s leave Bitcoin alone and just be mindful that everything that whenever people argue that Bitcoin is slow and limited, it helps us sleep better at night knowing that if everything in the world goes to shit we have Bitcoin to save us.

Still, the use case of DeFi and other crypto primitives on Bitcoin is too appealing to just be left alone.

And that’s where Stacks comes in.

What is Stacks?

The easiest way to describe Stacks is as an L2 built on top of Bitcoin both for scalability and for new functionalities: to allow everything that the limited codebase of Bitcoin doesn’t allow.

Stacks was initially launched in 2021 and is a protocol that enables smart contracts and the development of dApps that can leverage Bitcoin as an asset and settle transactions.

Q4 2023 will be a very important year for the protocol as Stacks is expected to release their Nakamoto Release, introducing:

  • Bitcoin finality for Stacks transactions (after about 100 blocks): if you are booting up a new Stacks node you can look at Bitcoin history and independently verify if you are on the right chain. After the upgrade, Stacks transactions will be guaranteed by Bitcoin hash rate and finality: reorg resistance.
  • sBTC: a decentralized and non-custodian asset pegged 1:1 to Bitcoin, that can run smart contracts faster and cheaper as well as run Atomic swaps.
  • Clarity: a new smart contracts programming language
  • Knowledge of the Bitcoin state: Stacks will be able to read Bitcoin transactions and state changes and execute smart contracts triggered by Bitcoin transactions (helps consensus and state being consistent with Bitcoin L1)
  • Faster and more scalable transactions: including faster Stacks-layer blocks between Bitcoin blocks thanks to Proof-of-transfers, as well as subnets that allow for customization between performance and decentralization
  • Fast Blocks: initially Stacks was as fast as Bitcoin (about one block every 10 minutes). With this update Stacks will be able to produce blocks each 5 seconds “in-between” two Bitcoin blocks. Fast blocks can be considered as “cryptographic proofs of passed time”.

In this way:

  • The settlement still happens with Bitcoin blocks
  • Lower and predictable latency (faster confirmation)Therefore Stacks has 2 types of Blocks:
  • Fast Blocks: produced every 5 seconds (BTF quorum)
  • Settlement Blocks: produced at each Bitcoin block, have no new transactions, but they settle the recent fast blocks.
  • Subnets: scalability and execution framework, allowing customizability based on dApps needs: subnets are designed to allow tradeoffs between throughput and decentralization - while still settling on Bitcoin.A good analogy to explain subnets it to compare Bitcoin to the internet, and subnets to a sort of intranet.Subnets also support multiple execution environments: for instance, a gaming app can become a separate subnet, that does not affect the rest of the application (Vision: scaling in modular layers and sub-networks).Contrary to Avax and Polkadot, Stacks subnets benefit from Bitcoin settlement and security + they can use sBTC, and their contracts can be triggered by Bitcoin transactions.

What is Stacks value proposition?

Bitcoin is now a $590B assets and Stacks wishes to open Bitcoin asset base to DeFi and wider uses, unlocking all the value currently not used efficiently.

Why Bitcoin though?

Bitcoin is the most secure and decentralized cryptocurrency protocol. Nonetheless, the limited expressivity of its language does not allow sophisticated dApps to be built on top of it.

While there are a lot of efforts to extend Bitcoin functionalities, such as RGB, and Lightning, it currently cannot support general-purpose application development.

Stacks wishes to extend and improve what can be done on Bitcoin without affecting the Bitcoin L1 directly.

It wishes to “unlock the deployment of hundreds of billions of dollars of latent Bitcoin capital into applications like decentralized Bitcoin-backed lending, Bitcoin-backed stablecoins, and more”.

Bitcoin is the most secure, durable, and valuable blockchain; it is already used as a store of value by millions of people. It is robust, "hard" money, with unprecedented non-custodial ownership and a lack of inflation. The Bitcoin blockchain is also the best settlement layer for transactions, as it is the most decentralized, censorship-resistant, and durable blockchain.

By building on top of Bitcoin Stacks benefits from :

  • Bitcoin Finality and Security: this is a major security upgrade for Satcks. Currently, it has a separate security from Bitcoin, defined as “the BTC capital spent by Stack miners”.

With the Nakamoto Update, after 1 day Stacks’ blocks are secured by the entire hash of the Bitcoin blockchain (unlike in Merge mining).

In order to reorg the Stacks chain and transactions, miners would need to attack and reorg the whole Bitcoin chain.

Furthermore, Stacks blocks are visible on Bitcoin, making it easy to detect possible attacks.

  • Smart Contracts triggered by Bitcoin Transactions: Stacks nodes also run Bitcoin nodes as part of their consensus, as such, smart contracts can read Bitcoin states and be triggered by Bitcoin transactions.
  • Writing Transactions on Bitcoin: atomic swaps allow dAppas to deploy BTC directly from the Bitcoin chain, and users to swap BTC and other assets on Stacks. The non-custodial pegged BTC introduced by Stacks also does not rely on third parties or a federation, therefore being more decentralized than its predecessors.
  • Settlement on Bitcoin: all Stacks tx settle on Bitcoin.
  • Bitcoin Liquidity: huge amount of liquidity unitilized.

A Revolutionary Consensus Model: the Proof-of-Transfer (PoX)

Novel consensus mechanism using both Stacks and Bitcoin layers that recycles POW energy.

Similar to Bitcoin POW:

  1. Miners bid for blocks using previously minted BTC and (if they win) they are rewarded in STX as a block reward. Their possibilities of miners becoming a leader and choosing the new block to commit are weighted according to their bids (BTC you are willing to spend).The amount of BTC bid is the input here (like electricity for POW).
  2. Stakers can stake STX to participate in the consensus (identify the right chain) and earn BTC rewards.

In practice, POX reuses the electricity used by Bitcoin miners — it does not consume any additional electricity and pays BTC rewards to STX stakers.

Furthermore, the hashes of all Stacks smart contracts and transactions are settled and recorded on the Bitcoin blockchain.

Permissionless: anyone can become a miner. Any holder can lock STX to participate in the consensus and earn BTC rewards.

Stacks has a system of incentives in place to create value for the ecosystem, and disincentivize bad actors — but without slashing.

On-Chain Bitcoin Price Oracle: the price ratio of BTC/STX is always recorded and available on-chain

A graphical representation of the design of the POX consensus:

How is Stacks different than other Bitcoin Sidechain Solutions?

Previous attempts to scale Bitcoin have focused on building sidechains (e.g. RSK, Liquid).

The problem with sidechains is that they have “pegged” to a different blockchain as a 1:1 pegged assets. As such:

  • They don’t really interact much with the Bitcoin blockchain itself — aside from when users “peg-in or peg-out” assets to the Bitcoin blockchain.
  • No record of them on the Bitcoin blockchain
  • Rely on a federation of custodians for peg-outs, sacrificing decentralization
  • Rely on merge mining which does not guarantee Bitcoin finality: a merge mining chain is as secure as the amount of Bitcoin miners choosing to mine the sidechain.

Lightning for example, directly interact with Bitcoin and settle transactions on L1.

What would we expect from a Bitcoin L2?

  • Secured by Bitcoin hash power
  • Can be triggered by Bitcoin transactions
  • Can write signed transactions on Bitcoin in a decentralized and trustless manner
  • Transaction settlement on Bitcoin (so records are verifiable)

Stacks fulfills most of these objectives:

it has its own global ledger and execution environment, to support smart contracts and to not overwhelm the Bitcoin blockchain with additional transactions.

Furthermore, it also has unique properties and mechanisms such as

  • Fast Blocks
  • Decentralized Peg
  • Subnets

AND, it also has its own native asset: STX.

The STX token and the Positive Feedback Loop

In fact, all previous approaches lacked a native token.

As such there were only a few incentives to support a permissionless system.

What is the point of STX?

A central role in POX consensus:

  1. Incentivize the mining of Stacks blocks with block subsidies paid (since Bitcoin transaction fees are currently not enough to sustain a new ledger)
  2. “Liveness incentive and the basis for the economically secured decentralized Bitcoin peg”.

What matters here is that STX does not compete with Bitcoin, but rather is instrumental in strengthening the network.

  • The main goal of Stacks is to build an ecosystem of dApps making Bitcoin more efficient and useful.
  • This will increase demand for block space and make Bitcoin more valuable.
  • Higher transaction fees for Bitcoin miners: more apps = more transactions = more fees
  • Stacks mining and settlement on Bitcoin results in high-fee BTC transactions, increasingly important as Bitcoin block rewards decrease.
  • Fewer reasons to use other chains

Clarity

It’s pretty hard to bootstrap a new programming language for a protocol.

  • Are developers coming and building?
  • How hard it is to integrate with third parties?

Stacks is written using Clarity, a programming language deemed to be “much more secure” than Ethereum Solidity.

Clarity is non-turing complete, so devs will already know and predict what programs will do. As such this guarantees the correctness of the code when executed: smart contracts code will be visible on the blockchain, guaranteeing execution safety.

As mentioned, Stacks also leverage subnets, that allow devs to build on EVM or other languages…

sBTC: Scaling Bitcoin

The Problem: to truly use BTC, smart contracts on BTC must be able to modify the Bitcoin state, that is, signing txs on-chain with private keys.

It is, in fact, difficult to perform all updates on-chain on Bitcoin, as this would be slow and expensive.

Let’s have a practical example of the functioning of sBT:

  1. Users lock BTC in a “Peg wallet” on Bitcoin, issuing an equivalent amount on the other chain (“peg in”)
  2. Assets can be used as much as possible
  3. Whenever is desired, an amount is destroyed and an equivalent amount is released back in Bitcoin. This operation is called the peg-out and is the one that allows Stacks to write on Bitcoin.

The main issue with previous Bitcoin solutions is that they all sacrificed decentralization, as most pegs were managed by either centralized custodians or a federation of permissioned entities.

Instead, sBTC:

  • Does not rely on centralized entities
  • No wrapping fees
  • Maintained by a permissionless, open-membership group of dynamically changing entities (with clear economic incentives to maintain the peg): the STX stakers. In fact, a new group of Stacks miners is elected at each new Bitcoin block (about 10 minutes), and they can mine for the Stacks blocks until the next Bitcoin block

Those users lock (“stack” STX) and perform per-out signing.

In return, they are rewarded with BTC (proportionally to staked Stacks).

sBTC also allows Atomic Swaps, since running a Stacks node also provides full visibility into the Bitcoin transactions.

As such Stacks contracts can be triggered on Bitcoin.

Let’s imagine you want to swap BTC to a stablecoin in a fully trustless manner:

you send your BTC on L1, which is swapped for an asset on an L2 in the same transaction, or else the swap will fail.

Food for Thought

Stacks finds itself somewhere in the middle:

  • Bitcoiners hate it because of what they do and accomplish
  • Non-bitcoiners hate it because they argue that they can already do this stuff on other chains

These are classic Mid-curve comments.

IMHO what matters is what follows:

  1. Stacks development does not impact Bitcoin settlement layer, nor weakens it
  2. Like it or not there’s a lot of potential that can be unlocked by introducing more and more possibilities to Bitcoin holders and the way Stacks is moving forward to it while not sacrificing decentralization and settlement of Bitcoin is indeed very interesting.

This is also reflected in a switch in the general thesis about Bitcoin: from 2018-2021 the common thesis was that users liked to build on other chains, and there was not ot much going on on Bitcoin.

Nonetheless, the rise of Ordinals and BRC-20 among others, have contirbuted to a change in this thesis and highlighting new use cases for Bitcoin.

For instance, Bitcoin is now the #2 in terms of NFTs total volume, something totally unimaginable even just 6 months ago.

This is reflected in the number of new tools and wallets being developed to support these emerging use cases. Nonetheless, arguably Bitcoin..

  • infrastructure
  • tooling
  • devs
  • infrastructure
  • wallets

..need to be much more mature to support Stacks vision.

I am personally looking forward to the Nakamoto upgrade as it will be a gamechanger for Stacks.

Francesco's Joint is a reader-supported publication. To receive new posts and support my work, consider becoming a free or paid subscriber.

Comments

All Comments

Recommended for you

  • Morgan Stanley: The U.S. dollar will peak before the end of the year and enter a "bear market pattern" in 2025

    Morgan Stanley predicts that the strong US dollar will peak before the end of the year and then enter a "bearish market trend", slowly declining until 2025. The bank believes that due to the Bank of Japan's rate hikes and gradual easing actions by the Reserve Bank of Australia, the potential for the yen and Australian dollar to rise next year is the greatest.

  • Equation News calls out Binance for "insider trading": You are destroying the sentiment of the trading market

    On November 25th, Formula News reported that to those insider traders who participated in the listing of Binance perpetual contracts, please slow down when selling your chips next time. The WHY and CHEEMS crashes you caused resulted in a 100% negative return for everyone involved in the trade, and you are destroying the emotions of the trade. Earlier today, Binance announced the listing of 1000WHYUSDT and 1000CHEEMSUSDT perpetual contracts, which caused a short-term crash in WHY and CHEEMS and sparked intense discussion within the community.

  • Bitcoin price dip may spur buying spree in BNB, AVAX, NEAR and OKB

    Bitcoin sellers take the upper hand as BTC struggles to rally to $100,000. What will altcoins do?

  • Bitcoin may reach $180K by the end of 2025 — TYMIO founder

    The current CryptoQuant Bitcoin exchange reserve metric is roughly 2.5 million coins — the lowest level recorded during this market cycle.

  • ON–293: Yield

    Coverage on Convex Finance, Stake DAO, and Pendle

  • Comparing IBIT & CBOE to BTC Options on Deribit

    Since this week the crypto derivatives market offers various platforms for trading Bitcoin options, most notably the iShares Bitcoin Trust ETF (IBIT) options in the U.S. and the BTC options on Deribit and soon the ETF index options on CBOE.

  • U.S. Congressman Mike Flood: Looking forward to working with the next SEC Chairman to revoke the anti-crypto banking policy SAB 121

     US House of Representatives will investigate Representative Mike Flood's recent statement: "Despite widespread opposition, SAB 121 is still operating as a regulation, even though it has never gone through the normal Administrative Procedure Act process." Flood said, "I look forward to working with the next SEC chairman to revoke SAB 121. Whether Chairman Gary Gensler resigns on his own or President Trump fulfills his promise to dismiss Gensler, the new government has an excellent opportunity to usher in a new era after Gensler's departure." He added, "It's not surprising that Gensler opposed the digital asset regulatory framework passed by the House on a bipartisan basis earlier this year. 71 Democrats and House Republicans passed this common-sense framework together. Although the Democratic-led Senate rejected it, it represented a breakthrough moment for cryptocurrency and may provide information for the work of the unified Republican government when the next Congress begins in January next year."

  • Indian billionaire Adani summoned by US SEC to explain position on bribery case

    Indian billionaire Gautam Adani and his nephew, Sahil Adani, have been subpoenaed by the US Securities and Exchange Commission (SEC) to explain allegations of paying over $250 million in bribes to win solar power contracts. According to the Press Trust of India (PTI), the subpoena has been delivered to the Adani family's residence in Ahmedabad, a city in western India, and they have been given 21 days to respond. The notice, issued on November 21 by the Eastern District Court of New York, states that if the Adani family fails to respond on time, a default judgment will be made against them.

  • U.S. Congressman: SEC Commissioner Hester Peirce may become the new acting chairman of the SEC

    US Congressman French Hill revealed at the North American Blockchain Summit (NABS) that Republican SEC Commissioner Hester Peirce is "likely" to become the new acting chair of the US Securities and Exchange Commission (SEC). He noted that current chair Gary Gensler will step down on January 20, 2025, and the Republican Party will take over the SEC, with Peirce expected to succeed him.

  • Tether spokesperson: The relationship with Cantor is purely business, and the claim that Lutnick influenced regulatory actions is pure nonsense

     a spokesperson for Tether stated: "The relationship between Tether and Cantor Fitzgerald is purely a business relationship based on managing reserves. Claims that Howard Lutnick's joining the transition team in some way implies an influence on regulatory actions are baseless."