-
Cryptocurrencies
-
Exchanges
-
Media
All languages
Cryptocurrencies
Exchanges
Media
Litex Lab is a decentralized value exchange ecology. Based on layer 2 technology, it can realize off-chain expansion and cross-chain communication, which solves the core pain points of low efficiency of the main chain and islands of public chains in the blockchain industry. The value ecology of Litex Lab can carry upper-level applications such as micropayments and decentralized exchanges, open the underlying functions through the API layer, establish a rich value exchange ecology, connect the digital world and the real world, and form an infrastructure that connects the future blockchain world .
Decentralized ecology: The legal currency in the system is provided by the currency buyer, and all parties in the ecosystem share the fee income. There is no need to rely on centralized institutions such as exchanges, and there is no legal currency funds Pool and official operator;
High performance and low cost: With the increase of the number of network nodes, the processing capacity can reach millions of transactions per second, meeting the daily payment timeliness requirements while achieving extremely low
Deep and stable implementation: The Foundation and its cooperation team have profound experience and resources in the payment industry, which can quickly promote global acquirers to join the ecological sharing dividend and avoid cooperation with bank card organizations.
Merchants expand rapidly: Merchants can still settle with the acquirer according to the original process, without paying additional costs or bearing currency value risks for accessing LITEX;
< strong>Avoid loss of funds: The payment channel based on smart contracts has strict restrictions on the destination of funds, and the user balance is deposited in the channel, which cannot be stolen by a third party even if it is attacked.
First, without introducing LITEX, let's discuss what the consumption scenario of cryptocurrency is like:
Suppose Alice only holds Bitcoin and wants to buy a cup of coffee from Bob, the owner of the coffee shop. If Bob is just an ordinary businessman who doesn't know much about technology and doesn't follow trends, then the probability of him owning a Bitcoin wallet is almost zero, which means that Alice must first convert Bitcoin into legal currency before paying Bob. Alice can log in to a cryptocurrency exchange to sell her bitcoins, and in order to get fiat currency as soon as possible (Bob may have started grinding coffee beans), she needs to list at a relatively low price and pay a relatively low transaction fee . Due to the small transaction amount, even if Alice successfully sells the bitcoins, it may take several hours for the transaction to arrive, and the coffee is already cold at this time.
After the last failed transaction, Bob has a certain understanding of Bitcoin. He appreciates the concept of Bitcoin, but at the same time he does not want to bear the risk of currency fluctuations because of accepting Bitcoin payment, so he accesses a Bitcoin In this way, although Bitcoin payment is accepted, the fiat currency converted by the payment gateway will eventually arrive, which looks much more normal. In order to facilitate payment, Alice has also pre-charged to this payment gateway (main network transactions require higher fees and longer time), so this time the bitcoin payment experience is good, and Alice quickly got the just-made coffee. Bob logs in to the backend of the gateway and intends to withdraw the $5 transaction just now, but finds that the payment gateway has changed the withdrawal threshold to $100 due to the high transaction fee on the Bitcoin main network! In desperation, Bob can only withdraw cash after Alice has bought 20 cups of coffee, which will take at least 20 days—if Alice comes every day. On the 19th day, Bob found out that the payment gateway lost a large amount of Bitcoin and cash due to hacker attacks, declared bankruptcy (centralization risk), and his unwithdrawn $95 also disappeared. At this time, Alice also Complained to Bob that the bitcoins that he had not consumed were also transferred by hackers in this incident.
Now we introduce LITEX to experience the convenience and security brought by the decentralized payment network.
Bob suffered a loss, but he did not give up Bitcoin, so he connected to the new technical solution LITEX. The access process is no different from other payment gateways (such as Visa, etc.), and it goes very smoothly, so Bob notifies Alice that he can accept Bitcoin payments again. In order to avoid the centralization risk suffered last time, Alice also became a LITEX user and established her own payment channel. So she opened the LITEX client, scanned Bob's payment QR code, and directly entered the legal currency amount of coffee, $5, and clicked to pay—after 1 second, Bob's cash register prompted a payment of $5. Bob clicks to confirm the payment, and finds that $5 has been transferred directly to his account; Alice's mobile phone also prompts that the payment is complete at this time, and the bitcoin equivalent to $5 has been deducted from the channel balance, and the handling fee is 0. With the help of LITEX, Alice bought a cup of coffee with Bitcoin very conveniently without paying any handling fees; Bob received the fiat currency converted from Bitcoin in real time, and finally he can continue to accept Bitcoin payment with confidence. In fact, even if LITEX is attacked at this time and some nodes are lost, the established LTXN can still fulfill Alice's payment requirements; even if most nodes are destroyed and the payment fails, the existing assets of Alice and Bob will not will suffer losses.
1. Compound Decision Lightning Network Model
Lightning Network is a general term for distributed networks based on the BOLT protocol. The classic Lightning Network design can only realize point-to-point outside the chain of encrypted currency Transactions, once it comes to the matching of fiat currency transactions, there is nothing you can do. The compound decision-making lightning network abstracted by LTXN integrates a decision-making layer network and an execution layer network into the same distributed system, and can achieve deep linkage while sharing nodes, making the lightning network more intelligent, so as to realize exchange requests and Advanced routing functions such as payment request matching can also keep the network topology healthy and efficient through rule design and avoid centralized nodes.
2. Matching engine
The matching engine is a collection of distributed intelligent algorithms, which is the most complex core logic of LTXN. Most of the following descriptions are based on examples of the simplest business categories in the system. They do not involve specific data structures, nor discuss the core strategy set - how the "non-bank card payment" business logic is applied to complex business processing and system stability improvement, etc. detail.
There are many payment requests and exchange requests in the LTXN system at the same time. The payment requests generally have the characteristics of relatively small amount and high immediacy requirements. The exchange request depends on the situation: some users want to obtain lower exchange costs. , can withstand the exchange process with relatively low immediacy, and even set an upper limit, and end the exchange at any time during the exchange process according to demand; other users can choose to pay a higher exchange fee in order to obtain cryptocurrency immediately. Can be exchanged in a short period of time. In actual design, the time-efficiency/cost ratio of user needs may be anywhere between the above two situations, and we quantify it in a certain way as the reference data for the adaptive matching decision of the ingress node.
In addition to the matching of timeliness/cost, the matching of the amount of the two parties is also a very important part. A common situation is that the amount of the exchange request is greater than the payment request. Each node of LTXN needs to match a plurality of requests that meet the requirements in the entire network to form an optimal solution. Factors to be considered include but are not limited to currency, amount, channel time cost, channel transmission loss, etc. If the payment request is larger than the exchange request, the payment amount in this case is relatively large. In addition to the above factors, the timeliness and cost of the main chain channel should also be considered comprehensively. pay.
Finally, the matching strategy also needs to consider the cost of connectivity. If the payer and payer are located in two networks that are not connected to each other, the cost of establishing an inter-network channel also needs to be considered. These will be discussed in the routing section below.
3. Intelligent Routing
The establishment and closure of the lightning network channel requires on-chain transactions, which will result in relatively high time and money costs. There is no direct channel between parties, but transactions are conducted through intermediate nodes according to the HTLC contract. The intermediate node may be a single node, or it may be multiple nodes directly connected from end to end. In order to quickly find the shortest (or lowest cost) path, each node of LTXN has a set of autonomous negotiation algorithm and node information cache synchronization strategy, so as to find the path at the fastest speed and complete the transaction when the demand arises.
The withdrawal operation of the lightning network needs to close the payment channel, which makes the topology of the whole network constantly changing: on the one hand, old channels may be closed and new channels may be opened at any time, and the original legal channels may be due to If it is not closed in time, it is necessary to find a new channel immediately; on the other hand, due to the different requirements of each payment, the channel capacity (which can be understood as the diameter of the channel) between nodes will also be different. In addition to taking the channel capacity into consideration, the routing process may need to split and merge payments in real time. These business logics that go beyond the problem model of traditional routing algorithms require more detailed strategy implementation.
4. Light nodes
According to the BOLT protocol, the node of Lightning Network is designed as a complete Bitcoin network node, which means that users who join the network must maintain a volume A complete data backup of tens of GB is unrealistic in actual use. We design the LTXN node based on Simplified Payment Verification (SPV), and add some data records required by the business on this basis, so that the LTXN node does not need to maintain a complete node and does not need to store All user transactions in the entire network only need to store the relevant transactions of users who have established channels with the node. Once the channel is closed and the transaction is confirmed on the main chain of the blockchain, the balance of the nodes at both ends of the channel will be written back to the main chain. At this time, the user can choose to delete the previous transaction data to optimize the storage space. The optimized LTXN node will not take up too much storage space, and general smart phones can fully support it.
5. Others
In order to realize the design of LTXN and meet the needs of small instant payment, the LITEX laboratory is still digging deep into the topology design of the lightning network and completing it by improving the BOLT protocol More efficient routing scheme.
*The above content is organized by YouToCoin official. If reprinted, please indicate the source.