Bitcoin DeFi: An overview
If bitcoin revolutionised the technology of saving, DeFi aims to revoluti...
What is DeFi?
DeFi is short for Decentralized Finance which is a movement within cryptocurrency to replicate existing financial products using smart contracts in a decentralized way.
Bitcoin revolutionised savings by becoming a permissionless, decentralised, non confiscatable, store of value, DeFi aims at doing similar things for other parts of the financial system.
DeFi projects are focused on the areas of lending and borrowing, asset management, insurance, derivatives, and prediction markets.
The Ethereum platform is the popular choice for developers building DeFi apps but some developers are building DeFi apps on bitcoin too.
The value of DeFi?
DeFi aims at revolutionising the financial markets which sees trillions of dollars exchanged in contracts every year. If bitcoin revolutionised the technology of saving, DeFi aims to revolutise all other parts of the financial system, which is a gargantuan task to say the least.
Real problem or cool tech?
Jimmy Song makes a good point when he says DeFi-mania is nothing new. It was preceded by IEO-mania which was preceded by ICO-mania which was preceded by altcoin-mania.
A lot of things that start on the Ethereum platform seem flimsy and experimental - ERC-20 utility tokens come to mind. At this early stage in the DeFi lifespan, it's not clear that DeFi has many customers or that customers in the near future will want this. Decentralised exchanges were often touted as the next best thing that would usurp centralised exchanges, but years later, there's little evidence of this happening.
Developers working on DeFi are pushing the boundaries of what is possible on the bitcoin blockchain (as well as off-chain and side-chains). This is one of the things developers excel in. Whilst the audience may not be here yet, customer trends may change, the technology is likely to improve, and the future is very much still left to play for. Having said that the best startups find solutions to existing problems, it's not clear that every part of DeFi is solving a genuine problem.
Bitcoin applications showcasing DeFi
Companies such as DG Labs and Atomic loans have created Bitcoin DeFi applications:
Earlier this year DG Labs released a P2P derivatives market built on top of Bitcoin.
Atomic Loans use smart contracts to use your bitcoin as collateral for a loan, received as a stablecoin.
Jeremy Rubin created a programming language named Sapio, for building smart contract applications on Bitcoin.
RSK have created a smart contract platform for creating DeFi applications on a bitcoin sidechain.
Some of the problems with DeFi
Smart contract risk
DeFi relies on developers writing smart contracts that are verifiably correct which is difficult to do. Vulnerabilities have been exposed on a number of products on both Ethereum and Bitcoin DeFi platforms: https://atomic.loans/blog/vulnerability-disclosure-and-pause-new-loan-requests/
If your futures contract doesn't execute you can approach the broker and get them to remedy it, with a DeFi product there is no third party so it is imperative that developers get this right from day one. Memories last a long time. Stories of someone losing lots of money is enough to keep people away for a very long time.
DeFi products often rely on a trusted third party to broadcast some truth. Examples may include Coinbase broadcasting the price of bitcoin, or the NBA broadcasting scores.
Why hasn't DeFi taken off in bitcoin yet?
The Ethereum blockchain natively allows complex smart contracts, which exposes it to a series of potential security issues that have previously led to a loss of funds. The Bitcoin platform (bitcoin, lightning) doesn't currently permit the level of complexity needed to run complex derivative contracts. However a lot of work has gone into getting Discrete Log Contracts and CTV implemented in Lightning and Bitcoin respectively which will make complex smart contracts much easier.
What is a Discrete Log Contract?
Discrete Log Contracts are smart contracts that enable conditional payments based on a decision/data from an oracle, without revealing the contract details to the blockchain. DLC's enable financial derivatives and prediction markets to be created on top of Bitcoin or more accurately, Lightning.
What is Check Template Verify?
This is a new OP_CODE that will be added to Bitcoin Script that enables you to add granular conditions on how you spend bitcoin. With CTV you can add conditions to how bitcoin can be spent at the transaction level (more granular) instead of just the script level.
Bitcoin does not have a platform or well established library for building DeFi projects in the same way that Ethereum has MetaMask or Web3. This means building on Bitcoin and DeFi is somewhat more difficult and time-consuming.
We are still very early in the lifespan of DeFi so it makes sense that at this stage very few products exist.