Risk Warning: Beware of illegal fundraising in the name of 'virtual currency' and 'blockchain'. — Five departments including the Banking and Insurance Regulatory Commission
Information
Discover
Search
Login
简中
繁中
English
日本語
한국어
ภาษาไทย
Tiếng Việt
BTC
ETH
HTX
SOL
BNB
View Market
Waterdrip Capital: DeFi Research on Bitcoin Lightning Network
星球君的朋友们
Odaily资深作者
2022-10-11 03:56
This article is about 12013 words, reading the full article takes about 18 minutes
The future Lightning Network could activate billions or even trillions of crypto markets.

first level title

introduction:

Bitcoin is the most mature digital currency system today. Without any middleman, users can transfer currency in the Bitcoin network to realize the ability to pay for goods and services. But as a practical payment system, Bitcoin still has some flaws. For example, Bitcoin can only process about 7 transactions per second on average, and each transaction can only be basically confirmed after 1 hour (6 trusted blocks); for micropayment (micropayment), the transaction fee may be too high, In comparison, Visa processes an average of 1,700 transactions per second and claims to be able to process 65,000 transactions per second. The Bitcoin network could change its protocol to allow more payments per second by increasing the block size or reducing the block time, but this would sacrifice Bitcoin's security and be contrary to Bitcoin's core value proposition.

In fact, many people ignore the development of Bitcoin's Lightning Network and sidechains. The Lightning Network represents a solution to Bitcoin's slow throughput without compromising the security of the Bitcoin network. Using the Lightning Network, millions of people can send fractions of bitcoins at near-instantaneous speed at the same time.

image description

lightning network

lightning network

lightning networksecondary title

1. Development Status of Lightning Network

Since its launch in 2018, the Lightning Network has had only a few niche applications. But recent developments suggest that this is changing rapidly. The use of the Lightning Network has increased significantly since the end of 2020, especially after the government of El Salvador last year supported Bitcoin as the national legal tender.

1. The basic data of Lightning Network grows steadily

image description

(Source: Arcane Research)

image description

(Source: Bitcoin Visuals)

image description

Lightning Network Nodes

image description

Lightning Network Channels

(Source: Bitcoin Visuals)

image description

(Source: Arcane Research)

image description

secondary title

2. Basic Principles of Lightning Network

The main idea of ​​the Lightning Network is not complicated. As a Layer 2 solution for Bitcoin, its core is to put a large number of transaction processes outside the Bitcoin blockchain, and only put key links on the chain for confirmation.

The Lightning Network uses a payment channel network driven by smart contracts to send transactions between peers. There are two core concepts that constitute the Lightning Network:

RSMC (Revocable Sequence Maturity Contract), a revocable contract when the sequence expires;

HTLC (Hashed Timelock Contract), hash time lock contract.

The principle of RSMC is that the two parties hold a contract that is unfavorable to their own side under the chain (the transaction information on the chain is not released) to record the current transaction status. When updating the state, give each other the "handle" (Revocation Key) to invalidate the previous state (because if you want to unilaterally repent and publish an outdated state on the chain, the other party can use the "handle" to get more assets). In this process, the blockchain is only required when withdrawing cash. In addition, even if both parties confirm a withdrawal, the first party who proposes to withdraw the funds will arrive later than the other party, which encourages everyone to complete the transaction outside the chain as much as possible. Through RSMC, a large number of intermediate transactions can be realized off-chain. (https://twitter.com/hu_zhiwei/status/1529332924679860224?s=20&t=laBZlrZvHTpmTwcOuNT9LQ, author @hu_zhiwei, modified)

image description

(Source: lightning.network)

RSMC ensures that direct transactions between two people can be completed off-chain. HTLC solves the problem of cross-node transfer of Bitcoin on the basis of RSMC, and ensures that transfers between any two people can be completed through a payment channel. The Lightning Network formed by the combination of these two types of transactions enables transactions between any two people to be completed off-chain.

Basis of Lightning Technology (BOLT)

(source:

(source:https://blog.csdn.net/mutourend/article/details/118671063

secondary title

3. Lightning Network Ecosystem

image description

(Source: Arcane Research)

As can be seen from the figure above, products and projects using Lightning Network are quite rich, including nodes and liquidity services, payment infrastructure and merchant solutions, wallets/banks, finance and trade, and even games, podcasts, streaming media and social applications, etc.

The most used ones are:

Cash App

A financial services platform that, in addition to providing banking services (provided by Cash's banking partners), also provides Bitcoin services that can be used for payment, consumption and investment, etc. As mentioned above, in March of this year, it was estimated that more than 80 million people were using the Bitcoin Lightning Network to pay through the Cash App.

Strike

Strike has become one of the most popular applications on the Lightning Network since El Salvador listed bitcoin as legal tender alongside the U.S. dollar.

first level title

OmniBOLT

In order to solve this problem, the OmniBOLT protocol came into being.OmniBOLT can be seen as an extension of the Bitcoin Lightning Network. It focuses on moving tokens faster and cheaper. It not only focuses on Bitcoin, but also integrates other smart assets on the Lightning Network.

OmniIt is an old brand in the blockchain industry, dating back to Mastercoin in 2012 (renamed Omni in 2015), it hasOmni Foundationsupport. Omni's greatest contribution is to use existing Bitcoin to build a new currency layer (Omnilayer) with new procedures at the protocol level without changing the foundation of Bitcoin and without generating alternative technologies to deal with new rules.

OmniLayerBuilt on top of Bitcoin, it supports functions such as smart contracts and issuing tokens. The well-known USDT in the encryption world was first issued based on OmniLayer.

OmniBOLT is the second important protocol after OmniLayer, both proposed by the Omni Foundation.At the same time, OmniBOLT is also a core member of the Omni Foundation.

As mentioned above,BOLT stands for Lightning Network Technology Foundation, which is the de facto standard for the Lightning Network.Based on this standard, Lightning Network can be compatible with Bitcoin, Litecoin (or other Bitcoin-like Tokens). However, those tokens based on OmniLayer are excluded.

In order to solve this problem, Omni proposed the OmniBOLT protocol, so that a series of Omni-aware assets and stable coins represented by USDT can be connected to the Lightning Network. In addition, it allows multi-chain assets to interact within the onion network.With the emergence of OmniBOLT, it is possible to enter all blockchains and related digital assets into channels designed according to Lightning Network specifications through a protocol.Through the OmniBOLT standard, it fully realizes the asset-aware Lightning Network node, and is committed to linking different public chains and ecology, providing externally consistent interfaces and user environments,secondary title

OBD network

The OBD network is actually an uncustodial OmniBOLT daemon (None-Custodial-OmniBOLT-Daemon). In the OBD design, the channel is decoupled from the underlying public chain network, so as to support more public chain assets to enter the OBD network circulation.

secondary title

How OmniBOLT works

1. The protocol on the chain is Omnilayer, which is the issuance and settlement layer;

OmniBOLT itself does not issue tokens. All tokens are issued on OmniLayer, enter the OmniBOLT network through the channel supported by P2(W)SH, lock on the main chain, and can be exchanged on the Omnilayer main chain at any time.

2. The network protocols that mainly constitute OmniBOLT include channel management peer-to-peer protocols, RSMC and OmniLayer transactions, HTLC, and payment routing.

It should be noted that only Bitcoin addresses cannot perceive any asset information other than Bitcoin. When a user transfers Omni assets to a Bitcoin address transaction channel that does not support the Omni layer, it is difficult or impossible to recover the transferred Omni assets. Therefore, the address in OmniBOLT and its implementation must be the Omnilayer address created by Omnicore. This is also the reason why the current lnd channel cannot become an OmniBOLT channel. In the near future, OmniBOLT will be updated to the "OmniLayer Secure Segregated Witness Address Format".

According to our understanding,OmniBOLT will also have its own node, these nodes are expected to be distributed all over the world, and their number will be equal to or exceed that of LN. also,Nodes that support OmniLayer (all exchanges, wallets, etc. basically support OmniLayer) can also be upgraded to OmniBOLT lightning network nodes.

first level title

Bitcoin DeFi projects worthy of attention

secondary title

Uprets

secondary title

Taro

secondary title

RGB

secondary title

Kollider

secondary title

Portal

Portal is a peer-to-peer exchange using the Bitcoin Lightning Network. It has previously announced financing information, led by Coinbase. The project is currently developing a cross-chain atomic transaction application.

secondary title

RSK

We understand RSK as a side chain of the Bitcoin main chain, which can be extended through additional functions such as smart contracts without forking or changing the original Bitcoin. The RSK MainNet network was launched in early January 2018. Smart Bitcoin (RBTC) is RSK's native token and is used as the gas to execute transactions in the RSK network. RBTC is pegged to Bitcoin at a ratio of 1:1 (1 RBTC = 1BTC), and can be automatically converted between BTC and RBTC through the so-called "Bitcoin-RSK Bridge Mechanism", thus combining the Bitcoin and RSK protocols.

In addition, RSK has good compatibility and is highly compatible with Ethereum at the following levels: execution virtual machine (EVM), javascript programming interface (web3), node inter-process connection (JSON-RPC) and smart contract programming language (Solidity ). RSKVM offers additional functionality not found in the EVM, and taking advantage of these improvements requires some changes to the smart contract source code. In addition, RSKVM also has a specific pre-compiled contract that can provide a bridge function with Bitcoin.

secondary title

Stacks

Stacks is another well-known side chain of the Bitcoin main chain, formerly known as Blockstack, and changed its name to Stacks in the fourth quarter of 2020. Different from RSK, Stacks uses the STX it issues as the native cryptocurrency of the Stacks network (the maximum supply of STX is 1.818 billion, and the circulating market value is about 550 million US dollars). It is used to fuel Bitcoin's smart contracts, reward miners on the Open Stacks network, and enable holders to earn Bitcoin through Stacking.

As a Bitcoin sidechain, Stacks achieves this by connecting directly to the Bitcoin blockchain through its Proof of Transfer (PoX) consensus mechanism, which lets miners pay BTC to mint new Stacks (STX) tokens. Additionally, STX token holders can also stack (not stake) their tokens to earn Bitcoin as a reward.

secondary title

Liquid Network(Blockstream)

Liquid Network is a side chain of the Bitcoin main chain developed by Canada's Blockstream, which can realize fast and private transfers, and can also issue digital currency on the side chain, such as issuing security tokens and other digital assets.

In November last year, the government of El Salvador planned to issue a $1 billion "bitcoin bond" on Liquid Network. The bond is a 1 billion dollar-denominated 10-year bond with a coupon rate of 6.5%. Half of the proceeds will be used to buy bitcoins and hold them for five years, with the rest used to fund bitcoin-related construction projects. The El Salvador government has pioneered this new bond issuance method backed by Bitcoin as the underlying asset, and it may also become a new way of playing Bitcoin DeFi.

Other Bitcoin sidechain projects include Nomic, Impervious, etc., but they are still to be developed.

secondary title

Uprets——Lightning Swap

1. Automated Market Maker (AMM) Model Analysis

Uprets VS. Uniswap

The most important thing about DEX is its AMM model. I believe everyone is already familiar with AMM models such as Uniswap, Curve and Balancer.

Simply put, the AMM model is to run on the AMM model by defining global constants and invariants to ensure the certainty of transactions and the effective use of transaction capital on the chain. Their smart contracts hold liquidity reserves of various token pairs against which traders swap directly.

In this model, the price is set automatically according to the constant product x*y=k model (or its variants), where x is the amount of token A and y is the amount of token B in the pool. When a trader sells x' token A for y' token B, the amount of token A in the pool increases and the amount of token B decreases, but the product remains the same: (x+x')*(y- y')=x*y=k.

Liquidity Providers (LPs) are incentivized by charging transaction fees (typically 0.3%). This is also the underlying logic of major public chains competing to imitate and promote various DeFi innovations after the DeFi Summer exploded in 2020. It can be said that the entire market rise in 2020-2021 is driven by the continuous innovation of DeFi and its derivatives.

The DEX on Bitcoin is completely different from the traditional DEX mechanism.To understand the core mechanism of Uprets AMM work on Lightning Network, you need toArbitrageurJoin the model. We assume that readers are familiar with Lightning Network and AMM, and the introduction of basic concepts is omitted. For ease of understanding, let’s compare it to Uniswap.

1. Liquidity pool

The Lightning Network already has funding channels that support multi-hop HTLC payments. Channels funded by some token form a logical network in which Alice can pay Bob even without a direct channel.The nodes on the payment path provide liquidity, and if the payment is successful, the channel will receive part of the fee.Alice and Bob involved in the transaction receive payments and transactions through the Lightning Network, and no additional Gas fees will be incurred.

In Uniswap's AMM model, liquidity providers play a similar role: if the Swap is successful, those who deposit funds into the LP pool will receive a commission in proportion to their contribution to the liquidity pool. However, when users trade, they actually invoke the smart contract, so they need to pay the network Gas fee.

global pool

The capital channel of Uprets in the lightning network forms a global liquidity pool, the difference is thatThe entire lightning network is a pool, and each node maintains a part of liquidity, while Uniswap AMM uses one contract address to collect liquidity: all tokens are stored in one address.

Organic combination of CEX and DEX (Bitcoin version of Uniswap V3)

Conceptually, an order book is a discrete space consisting of a series of orders with multiple prices. There must be a price difference between the highest bid and the lowest bid, if the price difference is too large, no deal will be made. If the order book dex is on-chain, the market maker usually also bears the loss of gas fees.

In order to obtain certainty of the transaction, Uprets utilizes financing channels to fill the price gap between all prices. Therefore, there will be a continuum that covers the entire price space. When prices change, liquidity providers have an incentive to pool liquidity around the current price in order to earn higher commissions. They revoke the old liquidity range and submit a new one covering the current price. This hedges against the liquidity sparsity of the order book model.It acts like a combination of Uniswap V3 and CEX order books.

2. Liquidity mining

After a node submits a liquidity range, it will receive a commission when exchanging within that range. Lightning Network does not have a contract to charge commissions for liquidity providers, but insteadUtilizes routing protocols to enable channel funds from liquidity providers to be used for transactions, so these channels directly earn commissions.

increase liquidity

Adding liquidity to the Lightning Network is simple: just open a channel with your counterparty and fund it. Lightning Network discovers new channels and updates the network graph so your channels contribute to global payment liquidity.

remove liquidity

Withdraw signed and committed orders and in-scope liquidity, or close channels and withdraw tokens to the main chain.

It should be noted that BTC gas is required to finance the channel. But adding (removing) liquidity has no cost (based on Lightning Network).

3. Channel status

In the Lightning Network, transactions, adding or removing liquidity, will change the state of the channel

4. Tracker that runs the matching engine

When an OmniBOLT node is online, it must announce itself to the network via its connected trackers, acting as a rendezvous point, informing its neighbors to update their token type, channel count, and liquidity reserve. The Omnibolt application tracks the network to register nodes and update the state of the node graph. Any tracker can be a rendezvous point that allows nodes to connect.

5. Fee structure

Token A to Token B transaction: Pay 0.3% in A.This fee will be shared among the nodes in the atomic swap payment path, which means that although there are many liquidity providers in the pool, not all of them get paid for each trade. Trackers balance the workload across the network: if a node is busy processing HTLCs, another node is chosen as a hop and earns exchange fees. If a liquidity provider thinks that the tracker he is connected to is not fair enough, he can choose another one. Each tracker should publish its path/node selection strategy. In Uniswap, it is automatically allocated through smart contracts.

6. Non-permanent loss (also known as impermanent loss)

Payment liquidity providers in Uprets will almost never face any losses(Because the funds are equivalent to only participating in the intermediate "advance payment" link during arbitrage, and can earn the price difference).

Uniswap's LP providers hope to use liquidity to earn transaction fees, and there may be potential losses.

The diagram below shows an example of how impermanent loss occurs and how large it can be.

7. Summary

Uprets Ligntning Swap and Uniswap-style AMM model comparison table

8. In addition, Uprets (Lightning Swap) has many advantages as a native transaction solution of the Bitcoin network, such as:

1) A large number of Bitcoin miners/BTC holders can directly exchange BTC for Omni-USDT on the Bitcoin Lightning Network, no longer having to rely on certain CEXs for transactions, exposing personal information, or even being troubled by freezing withdrawals for no reason ;

2) No need to rely on other centralized institutions to wrap BTC into DeFi, you can directly participate in native DeFi (LiFi) protocols such as Uprets, and at the same time bring other assets into the Lightning Network, activating the potentially huge DeFi of the Bitcoin network itself ( LiFi) market.

Review and Prospect

Review and Prospect

The Lightning Network has now become the world's most popular cryptocurrency payment protocol. OmniBOLT is the second important protocol proposed by the Omni Foundation after OmniLayer.

What many people may not know is that USDT (should) be the first blockchain application based on the Bitcoin network other than Bitcoin. As early as 2014, the first batch of USDT was born on the Bitcoin network, and it was officially launched on several major exchanges in February 2015. Before 2018, there was only one USDT transfer path, and that was Omni-USDT based on the Bitcoin network.

Later, as the Ethereum network became popular, projects developed based on Ethereum began to explode. Tether issued ERC20-USDT based on the Ethereum network in 2018. The most widely used and issued USDT is the TRC20-USDT issued by Tether in 2019 based on TRON. Although TRC20-USDT is not as secure as Bitcoin and USDT on the Ethereum network, the transfer cost using TRC20-USDT is lower, faster, and more catering to the needs of the market, so it is widely used. (After obtaining bandwidth and energy through pledge, you can transfer money at zero cost and arrive at the account in seconds, but when the number of transfers exceeds the consumption of bandwidth or energy, you need to pledge or lease more bandwidth and energy)

image description

(source:https://tether.to/en/transparency)

Although the Omni-USDT based on the Bitcoin network was the first to be issued and enjoys the security level of the Bitcoin network, Omni-USDT also inherits the disadvantages of the Bitcoin network in terms of user experience: the transfer fee is too high and the arrival time is relatively long (about 1 hour), completely unsuitable for frequent small transfers and payments. Therefore, it is gradually ignored by everyone, and the circulation is equivalent to billions of dollars all the year round.

If Omni-USDT can seamlessly access the Lightning Network through OmniBOLT and Uprets, compared with TRC20-USDT, the payment/transfer/transaction speed is faster and the cost is lower (no need to pledge resources such as token bandwidth), and it is more Safe, so what's going to happen?

In fact, at the beginning of this year, Tether officially announced on Twitter,In 2022, Tether will join forces with Synonym to bring tokens (not only USDT) into the Lightning Network through OmniBOLT to promote the development of the Bitcoin economy.


And in March of this year, Synonym completed the first USDT stablecoin transaction on the Bitcoin Lightning Network through OmniBOLT (https://mempool.space/address/3N5YQzhGGaJMbbVSC2KTWZaqMVtZmvyoQT

Media such as Bitcoin magazine rushed to report (https://bitcoinmagazine.com/business/usdt-pilot-brings-tokens-to-bitcoin-lightning

What is worth looking forward to is that the OmniBOLT protocol and Uprets (Ligntnig Swap) products developed by OmniLab are expected to release the beta version in 1-2 months. If Omnilayer assets headed by USDT and other public chain assets can be successfully connected to the Lightning Network through it, with the security of the Bitcoin network itself, the convenience of the Lightning Network, and the huge asset volume and good liquidity of the Bitcoin network , Now that there is a native counterparty (USDT), Bitcoin transactions in the future can completely no longer rely on CEX. I believe that the transaction volume on Bitcoin DeFi such as DEX will be amazing. In addition, we learned from the OmniBOLT core team that the team is using zero-knowledge proof to realize the real smart contract on BTC/OmniBOLT,Smart contract based on payment networkAnother potential killer feature. Over 1 billion USDTs that have been silent on OmniLayer will definitely be activated. After a certain period of accumulation,The number of Omni-USDT issued on the Bitcoin network may exceed the sum of USDT issued on all other chains, pushing Bitcoin DeFi and the blockchain industry to a new height【references】

【references】

1、https://lightning.network/lightning-network-paper.pdf

2、https://arcane.no/research/reports/the-state-of-lightning

3、https://arcane.no/research/reports/the-state-of-lightning-volume-2

4、https://arcane.no/research/the-lightning-network-is-bringing-payments-back-to-bitcoin

5、https://bitcoinvisuals.com/lightning

6、https://mirror.xyz/huzhiwei.eth/J2Kv1ATWo0_d3ZidG-8BDrIJcYX7DFew_ruQ2p03sgU

7、https://omnilab.online/

8、https://github.com/omnilaboratory/OmniBOLT-spec

9、https://github.com/omnilaboratory/obd

10、https://github.com/omnilaboratory/OmniBOLT-spec/blob/master/OmniBOLT-06-Automatic-Market-Maker-and-DEX.md

11. Zou Jun, Zhang Haining. Blockchain technology guide [M]. Beijing: Machinery Industry Press, 2017.220-226.

This article does not constitute any investment advice and is for reference only.

BTC
DeFi
Waterdrip Capital
lightning network
Welcome to Join Odaily Official Community