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

  • US Spot Bitcoin ETF Sees Net Outflow of $61.1 Million Yesterday

    On August 13, according to monitoring data from Farside Investors, the US spot Bitcoin ETF experienced a net outflow of $61.1 million yesterday.

  • US Spot Ethereum ETF Sees $7.4 Million Net Inflow Yesterday

    On August 13, according to data monitored by Farside Investors, the US spot Ethereum ETF recorded a net inflow of $7.4 million yesterday.

  • CFTC Warns Prediction Markets: Trader Incentive Programs May Encourage False Trading and Market Manipulation

    On August 13, the U.S. Commodity Futures Trading Commission (CFTC) Market Oversight Division issued a regulatory advisory reminding designated contract markets (DCM) of their regulatory obligations when self-certifying market maker, liquidity, trading, or incentive programs under CFTC Rules 40.5 and 40.6. The advisory addresses the increasing number of incentive program rule filings submitted under CFTC Rule 40.6(a), particularly those related to event contract products. The CFTC noted that some of these filings contain procedural or substantive deficiencies. These deficiencies may hinder staff's ability to assess whether the DCM has adequately notified the terms of the programs and whether it has sufficiently evaluated the compliance of the relevant programs with core principles and other regulatory requirements of the Commission. The guidance clarifies staff expectations regarding the procedural and substantive requirements when submitting materials under CFTC Rules 40.5 and 40.6, including initial submissions of incentive programs, amendments or changes to relevant programs, and submission procedures.

  • Metaplanet CEO: Transfer of 5,014 BTC Between Custodial Addresses is Routine, No Sale Made

    On August 13, Cointelegraph reported that Metaplanet CEO Simon Gerovich stated that the company's transfer of 5,014 BTC between custodial addresses is a routine operation. He emphasized, 'No Bitcoin has been sold, and the company's holdings remain at 43,000 BTC.'

  • Bullish Sentiment in Bond Market Rises as 10-Year Treasury Yield Falls Below 1.7%

    On August 13, the domestic bond market has seen a continued rise in bullish sentiment, with long-term rates experiencing a significant breakthrough. Market data shows that after fluctuating around 1.7% for several days, the yield on the 10-year Treasury bond fell below the 1.7% mark again on August 12, closing at 1.694%. Meanwhile, the yield on the 30-year Treasury bond also declined, closing at 2.160%, marking a low for the year. Industry insiders believe that the current bond market trend is driven by multiple factors including expectations of loose monetary policy, a balanced and relaxed funding environment, and institutional investors increasing their positions. However, after the key level was breached, the market's bullish and bearish dynamics intensified, and the effective conditions for a sustained downward trend in interest rates still need further validation.

  • NVIDIA Shares Rise Over 3%

    On August 12, NVIDIA's stock price increased by 3.35%, reaching $224.80 per share, the highest level in two months, with a total market capitalization of $5.44 trillion.

  • Trump: The U.S. Has Complete Control Over the Strait of Hormuz

    On August 12, U.S. President Trump posted: "The United States has complete control over the Strait of Hormuz. I believe we will continue to maintain that control! Our maritime blockade is referred to by everyone as a 'steel wall,' and Iran is powerless against it. They have no navy, no air force, and their remaining soldiers have not been paid. The Revolutionary Guard has been severely damaged and is in retreat, while their 'leadership' can at best be described as uncertain! They have no funds—this country is already 'full of holes.' All they have are fake news and 300% inflation, and the situation is worsening! Iran is now just talk without action, no longer the bully of the Middle East!"

  • Semiconductor Equipment Sector Continues Uptrend, Aehr Test Systems Rises Over 11%

    On August 12, the semiconductor equipment sector continued its upward trend, with Aehr Test Systems rising over 11%. Teradyne increased by over 6%, while Lam Research, Ichor Holdings, and Applied Materials each rose over 4%. KLA gained over 3%, and ASML and Ambarella both rose over 1%. In news, Aehr Test Systems announced a follow-up mass production order worth $22 million from its leading wafer-level AI processor customer. In industry news, Bernstein released a research report raising its forecast for wafer fabrication equipment (WFE) spending, citing increased confidence in the ongoing upcycle. The firm raised its 2026 WFE spending forecast to $148 billion, a 26.3% year-on-year increase; the 2027 forecast was raised to $204 billion, a 32.6% year-on-year increase; and the 2028 forecast was raised to $259 billion, a 27% year-on-year increase.

  • Lightspeed Plans to Raise $600 Million for Secondary Fund to Invest in OpenAI and Anthropic

    On August 12, Bloomberg reported that Lightspeed Venture Partners is seeking to raise approximately $600 million through secondary transactions to extend its investment exposure to OpenAI and other artificial intelligence companies, as well as to increase its investment in AI model company Anthropic. According to insiders, this fundraising effort is internally codenamed 'Project Mercury' and involves multiple secondary funds under Lightspeed, including the Select V Fund, Opportunity II Fund, and certain assets in a separately managed account. Lightspeed aims to provide liquidity to investors through secondary market transactions while maintaining long-term holdings in leading companies in the AI sector.

  • SK Hynix Shares Rise Over 8%

    On August 12, SK Hynix's stock price increased by 8.6%, reaching $153.95 per share, with a total market capitalization of $1.12 trillion.