According to DeFiLlama statistics, the total value locked (TVL) across layer-1 protocols increased by 1,189% from $18.7 billion at the start of 2021 to $240.96 billion by the end. With new money flowing into DeFi, developers are expanding its possibilities to new use cases and ecosystems, including bringing DeFi to the original blockchain itself: Bitcoin.
Three Main Challenges of Bitcoin DeFi
As of February 2022, Bitcoin’s market cap is over $700B on CoinMarketCap, yet the amount of Bitcoin being utilized in DeFi is only $12.5B. The sheer amount of latent capital locked in the Bitcoin ecosystem is drawing the attention of DeFi developers from around the world. Now, with Stacks bringing smart contracts to Bitcoin, developers can unlock the full potential of DeFi for the Bitcoin ecosystem. But this surge of interest in Bitcoin DeFi comes with challenges.
Scalability simply refers to a cryptocurrency's capacity to handle a high number of transactions. For any cryptocurrency to gain widespread adoption (and for DeFi to succeed in that ecosystem), the network will need to be able to manage millions of users.
That becomes challenging when every transaction recorded on the blockchain is public, and all of the independent nodes in the network must agree on what transactions happened and when. This scaling challenge is known as the blockchain trilemma. To put that into perspective, Bitcoin can only handle seven transactions per second (TPS), the lowest of any well-known blockchain and a stark comparison to a legacy centralized company like Visa, which boasts an average of 1,700 TPS.
When developers are considering building DeFi applications like decentralized exchanges, stablecoins, automated market makers, and everything in between, network scalability is one of the first major challenges for Bitcoin DeFi.
Another big challenge in DeFi is security. Money lost to DeFi hacks more than doubled to $1.3B in 2021, according to CertiK’s 2021 State of DeFi Security. Given how much money is flowing through DeFi applications, it’s not surprising that enterprising hackers want to exploit any bugs they find.
While the $1.3B figure looks big, and doubling the money lost sounds bad, this data can actually be considered an improvement. In 2020, the total value of hacked funds represented 2.78% of the total funds locked in DeFi, whereas in 2021, that was just 0.5%. In other words, hackers were able to steal a smaller slice of the DeFi pie in 2021 than they were the year prior. As hackers exploit bugs, developers learn from them and patch them, improving security over time.
While Bitcoin’s script itself may be secure from hacks and has stood the test of time, the same isn’t true for Bitcoin DeFi, a much newer economy. Given Bitcoin DeFi is in its infancy, with a new programming language to boot, Bitcoin DeFi must learn from other battle-tested DeFi protocols and incorporate the latest security measures available in the ecosystem. Developers have to anticipate DeFi attack vectors and write new code to meet those challenges head on. With that innovation comes some degree of trial and error.
In contrast to traditional financial systems locked behind firewalls, DeFi is open, transparent, and decentralized. For a DeFi ecosystem to succeed, DeFi apps inside that ecosystem need to be composable, meaning that different applications all use certain coding standards, or primitives, that allow them to interact with each other and also allow different smart contracts to be combined like lego blocks into entirely new use cases.
The challenge here when it comes to Bitcoin DeFi is that Bitcoin’s scripting language is extremely limited. This means that Bitcoin has small attack vectors and is incredibly secure and decentralized, but it also means that Bitcoin can’t do much else besides peer-to-peer transactions.
Want to build a Bitcoin lending protocol? A decentralized automated market maker? A stablecoin? You can’t build these standard DeFi applications on Bitcoin because Bitcoin’s script is too limited.
You can’t write the individual smart contracts that would compose Bitcoin DeFi because Bitcoin doesn’t have smart contract functionality. In fact, you need a second blockchain altogether to make Bitcoin DeFi possible.
The Benefits of Using Stacks Blockchain for Bitcoin DeFi
Stacks enables smart contracts for Bitcoin, and within the Stacks ecosystem, developers have demonstrated that Bitcoin DeFi is possible. Stacks has a unique relationship to Bitcoin that enables real Bitcoin DeFi to flourish. Here are the benefits of building Bitcoin DeFi on Stacks.
One of the limitations mentioned above was Bitcoin's limited scripting language. While Bitcoin is not easily programmable, it is secure and reliable as a decentralized store of value. Stacks unleashes Bitcoin through Clarity, a new programming language that brings smart contracts to Bitcoin.
Through Clarity, developers can deploy smart contracts on top of Bitcoin without changing Bitcoin's scripting language. Importantly, Stacks’ smart contracts can interact with Bitcoin’s global state and on-chain data, meaning you can create DeFi apps that react to native Bitcoin transactions.
Bitcoin only processes seven transactions per second compared to Ethereum's 15. Stacks provides a solution to that scalability problem by enabling transactions to occur outside of Bitcoin, and then settling those transactions on the Bitcoin blockchain every 10 minutes with the mining of a new Bitcoin block.
To bring improved scalability for Bitcoin DeFi, the Stacks ecosystem has taken on a number of new initiatives to scale the network, including microblocks, appchains, and hyperchains by Hiro. These improvements will allow Bitcoin DeFi to scale from thousands to millions of users.
Introduces Security Through Proof of Transfer
The Stacks blockchain was created so developers can benefit from Bitcoin's decentralization and security without changing Bitcoin itself. Proof of Transfer (PoX) is Stacks’ unique consensus mechanism that connects two blockchains (in this case, Bitcoin and Stacks). Importantly, all Stacks transactions settle on the Bitcoin blockchain, which means that the Stacks network benefits from Bitcoin’s security and decentralization. To change the history of Stacks, you also have to change the history of Bitcoin—and don’t forget, Bitcoin is the most decentralized and secure blockchain in existence today. Full stop.
Bitcoin is the most decentralized and secure blockchain in existence today. Full stop.
Proof of Transfer also unlocks a powerful new DeFi primitive: stacking. Users can lock up their Stacks tokens to stabilize the Stacks network and earn rewards, paid in BTC. As of January 2022, users locked $1B USD in a smart contract for Stacking, with 100+ BTC in monthly rewards being paid to stackers. Additionally, Bitcoin DeFi applications can use stacking and proof of transfer to enable all kinds of interesting use cases, such as self-repaying loans and generating yield in a different asset than the collateral.
One of the unique features of the programming language Clarity is that the source for every single Clarity contract is publicly readable on the blockchain. This effectively makes the Stacks blockchain a “GitHub” for Clarity contracts, where developers can look at the code of other smart contracts and even use that code for a new application.
Unlike other smart contract languages in which users have to take a leap of faith, Clarity enables developers (and users) to confirm that a smart contract’s code is unaltered from the source code.
Pioneers in Bitcoin DeFi
A burgeoning group of developers is creating cutting-edge technologies on the Stacks blockchain to make Bitcoin Defi a reality. Want to meet a few of them?
While interacting with the Stacks blockchain, Hiro Wallet provides a secure method to manage STX tokens, sign in to decentralized apps, and protect users’ assets. The Hiro Wallet is the most popular wallet in the Stacks ecosystem, but there are other options for users, including theBoom Wallet, Neptune Wallet, and Xverse Wallet.
ALEX is the first open-source decentralized exchange built on Stacks, complete with an automated market maker and order-book. ALEX also helps other projects bootstrap their token launches with the ALEX launchpad.
Arkadiko offers self-repaying loans on Stacks. Users can collateralize their STX tokens and borrow USDA coins. This stablecoin allows additional liquidity for Bitcoin DeFi in the form of a soft-pegged U.S. dollar stablecoin while keeping the user’s original asset exposure.
The newest addition to Bitcoin DeFi, Zest Protocol, announced just a few weeks ago, aims to provide undercollateralized Bitcoin loans to institutional borrowers and bring the $130 trillion bond market on-chain.
Looking to the Future of Bitcoin DeFi
Stacks helps overcome the challenges of Bitcoin DeFi, including scalability, security, and composability, allowing developers to innovate and build new financial applications on top of Bitcoin, all without altering Bitcoin itself. At Hiro, we create developer tools for Stacks, so you can build DeFi applications for Bitcoin.