#27 - Bitcoin Finance, Building and much more!
⚡ Everything at the intersection of Bitcoin & Finance
If you enjoy this content, feel free to spread the word!
🤓 Bitcoin Finance - Part 1
Bitcoin is the embodiment of decentralized finance. Why? Because Bitcoin is the first secure and decentralized electronic value transfer network. Bitcoin is secured by Proof-of-Work and is decentralized because the cost of running a Bitcoin node is low. Anyone can verify and propose transactions and blocks.
New services are emerging to provide Bitcoin-based trust-minimized financial uses cases. Let’s use the term “Bitcoin Finance” to refer to these solutions. They can be built on Bitcoin’s Layer 1, Layer 2 or on Sidechains, with varying trust assumptions.
We will first provide an overview of some Bitcoin Finance projects already live or being developed on top of Bitcoin’s Layer 1 & Layer 2. In our next issue, we will explore Bitcoin Finance projects on Sidechains.
Bitcoin Finance on Layer 1
Discreet Log Contracts - DLCs - may be the most promising trust-minimized financial construction on Layer 1. The goal of DLCs is to enable setting up contracts between two parties directly on the Bitcoin blockchain, using an oracle to determine the contract outcome. The innovative part about DLCs is enabling the execution of the contract by the parties without them having to notify the oracle.
For more details, check the Discreet Log Contract specification, a set of document that aims to be what BIPs are to Bitcoin or BOLTs to Lightning, which describes how anyone can write their own code to create DLCs and become an oracle.
Companies building in the nascent DLC space include:
Crypto Garage with their P2PDerivatives application written in C++, which enables users users to enter into DLCs with each others.
Suredbits which are implementing DLCs on bitcoin-s, the open source bitcoin library in Scala they support, and have developed several services (such as their oracles explorer) and types of DLCs. Their blog is a great resource to find out more!
Atomic Finance which aims to provide a transparent way to earn yield on Bitcoin with DLCs.
Now, you may wonder what DLCs look like in real life! Well, here is an example of contract we set up with Chris Stewart from Suredbits, thanks to their Bitcoin-s wallet. Chris suggested the following terms:
The oracle is the BTCUSD price on Deribit on July 1st. At the time of negotiation of the DLC, on June 29th, BTCUSD price is $35,000. Chris and us would each lock up 60,000 sats in the contract. The payout would be that of a bear put spread (long put $40,000 / short put $30,000). So, at maturity:
If BTCUSD is below $30,000, payout = 120,000 sats
If BTCUSD is between $30,000 and $40,000, payout = 12 X ($40,000 - BTCUSD) sats
If BTCUSD is above $40,000, payout = 0
This payout is expressed with 5 potential outcomes that the oracle can sign: the ranges [0, $30,000], [$30,000, $35,000], [$35,000, $40,000] and [$40,000, $262,413] ($262,413 = 2^18 is the maximum value for which the oracle can sign a price range).
Our counterparty was gentle enough to let us be long on this DLC. We have the symmetrical payout. After reviewing his DLC offer, we send acceptance to our counterparty:
Our counterparty will then prepare, sign and send to us the Bitcoin transaction expressing this DLC. After verifying it, we can also sign it and broadcast the DLC to the Bitcoin blockchain:
The funding transaction of our DLC, with the total collateral required for the contract, is now published to the Bitcoin blockchain, without any external observer, and certainly not the oracle, being able to grasp any information from this contract:
On July 1st, the oracle bore bad news (for us at least). The outcome at maturity is BTCUSD = $33,528. Hence, our PL is -17,664 sats, a solid -30% return 😬
Thanks to the Oracle Signature, we can broadcast the closing transaction of our DLC. Had we attempted to broadcast a false outcome, for example BTCUSD = $40,000, our counterparty could claim the entire collateral locked in the DLC, since we would not be able to provide a valid oracle signature for that outcome.
How cool is that ?! We have completed a DLC, “a monetary contract between two parties redistributing their funds to each other, based on preset conditions, without revealing any details of those conditions to the blockchain”!
Now let’s move on to Atomic Finance Bitcoin yield-earning solution. You may wonder how is this yield generated? Thanks to optional strategies called covered calls. Writing a covered call means being long an underlying instrument + shorting a call option on this underlying. For a Bitcoin holder, that would mean locking up bitcoin on-chain and selling call options on it. The yield you would get depends on several factors, notably the strike price K of the option, its maturity and the volatility of the underlying.
Here is for example the pay-off for a 1-month covered call with a strike at $35,000 and a call premium around $4,000:
As you can see, while BTCUSD remains below ~$40k, you would receive an additional yield (the difference between the green and blue line, more or less equal to the call option premium $4,000). However, there is no free lunch in finance. Should BTCUSD go above $40k at maturity, you would be forced to sell some of your long Bitcoin position, capping your net resulting position to $40,000 + $4,000 = $44,000.
The big novelty here is that Atomic Finance does not take custody of your bitcoins! Upon maturity of the option, an oracle reveals a signature, which allows either the user or market maker to close the contract, without Atomic Finance ever having custody of the funds.
As you can see with Crypto Garage, Suredbits and Atomic Finance, DLCs on Layer 1 represent a very promising area of development for Bitcoin Finance.
Bitcoin Finance on Layer 2
An interesting feature of the Bitcoin’s Lightning Network is its fee architecture. Node operators in the Lightning Network can earn non-custodial routing fees in exchange for offering a path for lightning payments, which requires to lock bitcoin inside payment channels. This is akin to a Bitcoin risk free rate of return.
Node operators specify two types of fees: a base fee, a fixed fee charged each time a payment is routed, and a fee rate, a variable fee proportional to the payment value. Since March 2020, LN Markets’ node has forwarded more than 60,000 payments, for a total of 130 BTC, with a max payment of 0.24 BTC. Doing so, we have collected around 400,000 sats in routing fees for this honest work.
Routing fees will keep growing with the increased usage of the Lightning Network. And pioneer exchanges who already support Lightning such as Bitfinex see a sharp growth:
Liquidity providers on the Lightning Network can also earn yield in a new non-custodial way with Lightning Pool. Pool is a marketplace where node operators with available capital can meet other nodes in need of inbound liquidity and where the former can open channels with the latter for a certain duration (hence the term Lightning Channel Lease for this contrac). Pool orchestrates non-custodial auctions for liquidity where bids are kept private and trades clear periodically:
At a high level, Pool can be seen as a first implementation of the concept of “shadowchain”, used to implement non-custodial smart contract systems on top of Bitcoin Layer 1. As Ryan Gentry puts it in a previous issue:
“Shadowchains are just incredibly cool new constructions. In my humble opinion, sidechains have not taken off on Bitcoin because they require users to give up custody of their coins to a set of validators who may or may not give the coins back. Shadowchains are like sidechains where you maintain custody of your funds, and get a chance to validate every transaction that involves your funds, rather than needing to trust an external set of validators. The tradeoff is that you need run a node, but that’s the price of trustlessness.”
Lastly, hard for us not to mention LN Markets, the first Lightning-native derivatives trading platform. Though we are currently counterparty to all derivatives trades (CFDs and soon options), our goal is to leverage our liquidity, DLCs and other Bitcoin techniques to build a fully non custodial bitcoin-based derivatives trading platform!
DLCs on Lightning is a long-term goal which requires Point Time Locked Contracts (PTLCs) to work with some other features. Taproot upgrade will enable the activation of Schnorr signatures and the deployment of PTLCs, conditional payments that could replace the use of HTLCs in Lightning payment channels. However, it may take some time for all Lightning node implementations to be ready to handle non HTLCs outputs in their channels.
Bitcoin Finance on Sidechains
To be continued in our next issue!
We have deployed a major release on Testnet with a brand new UI, documentation and several bug fixes. What do you think?
You loved this Bitcoin Miami highlight of Alyse Killeen on Bitcoin DeFi?
Then this Odd Lots episode is a must-listen! Alyse is a charismatic “sound tech maximalist” VC who shares sharp insights on Bitcoin, DeFi and where it’s going next:
📉 We all know the feeling
🇸🇻 No matter the outcome of the Salvadorian Bitcoin, it’s so cool to see the Lightning Network changing lives!
Thank you for your support and let’s keep building the future of finance together!