Pathways for DeFi on Bitcoin

Mohamed Fouda
Jul 10 · 12 min read
DeFi movement is rapidly growing

But First, What Do We Mean by DeFi?

Decentralized Finance or DeFi is an umbrella term for all the financial services that can be performed without a central authority or when the mechanism to control the financial product is decentralized between different entities. DeFi products include decentralized lending, decentralized exchanges, decentralized derivatives or even decentralized issuance of stable coins. Many argue that decentralized payments on their own are DeFi products. I happen to agree with this argument. In this regard, BTC is the cryptocurrency with most merchant adoption. Services like BTCPay Server even allow merchants to receive BTC directly without a third-party payment processor. Therefore, this article is mainly about how Bitcoin can expand its DeFi footprint beyond decentralized payments.


Overview of Bitcoin Centralized Financial Products

Before diving into the pathways for DeFi on Bitcoin, let’s start with some of the “centralized” financial services currently using Bitcoin. These will be prime targets for decentralization once DeFi can be efficiently executed on Bitcoin.

Bitcoin Lending

One of the most popular financial services built on Bitcoin is lending. We can categorize companies in this area into two buckets. First, are the companies that allow investors to borrow Bitcoin and other cryptocurrencies for trading or market making purposes; the most well-known company in this sector is Genesis Capital. Genesis Capital has reportedly processed $1.1B of crypto loans in 2018, ending the year with ~75% of these loans in BTC.

Margin Lending

Margin lending is a special case of collateral-based lending used for leveraged trading. In such scenarios, the borrowed funds are not allowed to leave the lending platform. Instead, if the trade loss is equal or below the collateral value, the margin position is liquidated to return the funds to the lender. Exchanges, such as BitMex, Kraken, Bitfinex, and Poloniex, are the major players in margin trading field. However, most of these products are not available for US customers because of regulatory uncertainty.

Stablecoins

Stablecoins that can be transferred easily with low fees have specifically been of interest to traders who want to benefit from volatility but keep a stable value when they are not in active positions. Tether (USDT) was one of the earliest stablecoins offered to address this issue. It was completely built on Bitcoin using the OmniLayer protocol. OmniLayer allows the creation and transfer of assets using Bitcoin transaction’s opcode space.

USDT usage on Ethereum is stealing activity away from USDT Omni activity. Source: CoinMetrics

Decentralized Finance in Bitcoin

Possible technological approaches to use Bitcoin for DeFi
  1. Federated sidechains to Bitcoin such as Blockstream’s Liquid. These sidechains use two-way pegs to the Bitcoin blockchain and allow the use of pegged BTC in various financial activities.
  2. Using Bitcoin within other protocols such as Ethereum or Cosmos to interact with DeFi products.
  3. Using layers on top of Bitcoin like OmniLayer or Lightning Network.

Cross-chain Swaps For Decentralized Exchanges

The simple premise of DEXs is to execute trades between Bitcoin and fiat or between Bitcoin and other cryptocurrencies while keeping custody of your coins until the trade is completed. In other words, trading without the need to deposit your valuable bitcoins into a centralized exchange wallet and be subjected to the exchange security risks.

Bitcoin DeFi Using Federated Sidechains

Bitcoin sidechain is a concept that was proposed by Blockstream in 2014 to introduce new features to Bitcoin without changing the protocol base layer. Since then the concept has developed significantly. The simple idea of sidechains is to create a separate chain with a small number of validators (called a federation) and use a token in that chain that is a pegged to BTC through a two-way peg. The benefits can include faster transaction confirmation or implementing features that may be controversial such as confidential transaction, tokenization of other assets or smart contracts. The main drawback of sidechains is the need to trust a small federation to operate the sidechain and keep it running. There is also a risk of losing money by using sidechains if, for any reason, sidechain validators decided to abandon the chain. In those situations, pegged assets would get stuck and cannot be redeemed back to BTC.

Decentralized Derivatives Using Bitcoin Layers

A third approach to implement Bitcoin DeFi products is to utilize intermediate layers built on top of Bitcoin such as Lightning Network or OnmiLayer. As LN is a relatively new Bitcoin development, building complex DeFi products using LN is a topic of research. The most notable effort there is Discreet Log Contracts which are discussed in some detail at the end of this article.

Bitcoin DeFi With External Help

Wrapped BTC on Ethereum

A completely different approach to allow using Bitcoin in DeFi is to leverage other networks like Ethereum or Cosmos. As most DeFi projects now work on Ethereum, it seemed logical to try to find ways to use BTC on Ethereum. The simplest idea is to issue a BTC-backed ERC20 token (WBTC) that can be traded on any Ethereum DEX or used in various Ethereum DeFi projects. The BTC used to mint WBTC are secured in mutisig wallets maintained by the project custody providers. As of early July 2019, only ~540 WBTC were minted is a tiny fraction of the BTC circulating supply.

Growth of the Wrapped BTC (WBTC) supply over time

Cosmos Zones

Interoperability blockchain projects, such as Cosmos, opened new opportunities to bring DeFi to assets like Bitcoin. For example, Cosmos protocol defines Peg Zones where assets (issued on Cosmos) can be pegged to other blockchain assets like Bitcoin. In these zones, it is possible to add smart contract functionality to the pegged asset and benefit from faster finality. This approach has garnered the support of some hardcore Bitcoin supporters like Eric Meltzer for one specific reason: in this approach, Bitcoin will remain the native currency to pay fees and use the peg zone. Bitcoiners can stake their pegged bitcoins in the zone to process the zone transactions and claim the zone fees. In that sense, Bitcoin will benefit from the new tech without depending on a different asset. This comes in stark contrast to WBTC, which requires using ETH to pay for fees or interact with DeFi protocols.


Research to Expand Bitcoin DeFi Capabilities

Merkelized Abstract Syntax Trees (MAST)

Bitcoin, in its current form, has a limited form of smart contract capabilities through the Script language. Script is not a Turing-complete language meaning it cannot be used to describe general programs. However, it still can be used to implement some smart contract functionality. This is done via Pay to Script Hash (P2SH) and SegWit addresses, in which, a transaction cannot be spent unless some conditions (defined through a Script program) are satisfied. The problem with that approach is that complex transactions with multiple conditions would be excessively large, making them too expensive to use. For those reasons, there is a proposal to implement Merkelized Abstract Syntax Trees (MAST) in Bitcoin. MAST is simply an extension to the P2SH capabilities that would make it cheaper and viable to utilize complex conditions to spend Bitcoin transactions.
While the obvious benefit of MAST is improving Bitcoin scalability by saving block space, the less obvious benefit is that it could allow for some Bitcoin DeFi use cases. For example, if we assume a decentralized price-feed oracle can be implemented, MAST could allow for decentralized lending or even decentralized stable coin issuance using BTC as collateral.

Discreet Log Contracts

Another research idea that can expand Bitcoin DeFi capabilities is the Discreet Log Contracts (DLCs) suggested by Tadge Dryja of the MIT Digital Currency Initiative (DCI). A simple explanation of a DLC is that it is a way for two parties to create a Futures Contract which is simply a bet on the future price of an asset. A DLC requires both parties to select an oracle (or a number of oracles) that publicly broadcasts the asset price before they create the contract. At the time of the contract settlement, any of the two parties can use the publicly broadcasted signed messages from the oracle to settle the contract and claim their profits. DLCs utilize Schnorr signatures to hide the contract details from the oracle. This guarantees the oracle cannot game the output of the contract. As DLCs use similar technology to that of Lightning Network, it is possible to integrate DLCs with LN channels.

Conclusion

DeFi protocols have been generating a lot of buzz since early 2018. While Ethereum is recognized as the lead protocol within the DeFi movement, developers and investors have been eyeing the massive potential of Bitcoin in DeFi as the most liquid cryptocurrency. This great interest is pushing many developer teams to figure out the best ways to make it happen. While this would bring even more competition between Bitcoin and Ethereum and probably all new smart contract platforms, such competition is what is needed to encourage progress and deliver the vision of a public decentralized financial system.

Token Daily

In depth research on the latest trends in crypto.

Thanks to Imran Khan.

Mohamed Fouda

Written by

Crypto researcher and Investor. Token Daily Capital | PhD @NorthwesternU

Token Daily

In depth research on the latest trends in crypto.