What is a block of credit? Speaking from Lightning Loan

Author: NEST lovers – nine chapters Heaven

The anonymous nature of the blockchain makes the concept of "credit" superfluous. All loans and leverage on the chain need to be fully mortgaged. Even if someone else finds another way, hoping to establish a weak credit through some "identity" asset, but that It is also essentially a disguised mortgage (note the word asset, you know it is also a mortgage). In the world of the blockchain, it is impossible to have credit if performance cannot be guaranteed, and generally the only way to guarantee performance is collateral. Looking at various decentralized lending and looking at various stablecoin schemes on the chain is in line with this logic. .

However, the recent bZx arbitrage event provided a credit solution: through the lightning loan interface, to ensure the success of the asset call in the contract = the call returns more assets, the contract call fails = the asset has not changed, and in this transaction Here, you can arbitrarily support the assets in the contract, as long as you repay within the transaction. This process does not place any restrictions on the use of assets, and has great freedom, similar to real-world liquidity financing ( (Different from exclusive use). It can be said that this structure realizes the credit of a transaction. Since the transaction is completed in a block, we can call this credit "a block of credit" (see Note 1 for the process of the lightning loan) ). Some people may think that it is just "the credit of a block". There is no advantage in time, and its value will be small. Indeed, if we consider the numerous credit assets in our real world, this "credit of a block" is not attractive, but there is a situation that becomes very important. This situation is arbitrage!

Different from the traditional commodity economy, in the financial world, once the risk-free arbitrage opportunity appears, its demand will no longer be an oblique downward curve, but a straight line perpendicular to the horizontal axis (arbitrage yield), that is, demand is gigantic! Any participant, as long as he has the funds or financing ability, will try his best to participate in this opportunity. This is the ideal situation. In the real world, when arbitrage opportunities really appear, there is often an important constraint: "borrowing restrictions", that is, the person who finds the opportunity has no funds and cannot finance to complete the arbitrage, which leads to this opportunity. It can only be used by a small number of people, even for a long time. This inefficiency of resource allocation is intolerable by most financial scientists, so the criticism of borrowing restrictions has never stopped. In the real world, there are difficulties in judging whether an arbitrage opportunity is really risk-free and whether the borrowed liquidity can be returned in a timely manner. Therefore, borrowing restrictions and local “market invalidity” have never completely disappeared.

However, the existence of inter-contract calls on the blockchain and the existence of Lightning Loan may make the borrowing restrictions in the traditional financial world and the resulting "market inefficiency" completely disappear! This is because on the chain, through this lightning loan design, the two problems mentioned above are solved at the same time: 1. Whether the arbitrage opportunity really exists; 2. Whether it can repay in time. Let ’s take an example. For example, if there is contract A, an arbitrage opportunity is exposed. At this time, any fund pool O in the blockchain world that supports Lightning Loan, and a participant s who finds the opportunity, s does the following arbitrage for the opportunity Contract B: Call asset X in O and interact with contract A. If the arbitrage is successful, return the asset X in O. If the arbitrage fails, the asset returned to O is lower than X, then contract B is cancelled. According to such a contract process, the authenticity of the arbitrage opportunity is verified by the ability to effectively return the borrowed assets, thereby satisfying conditions 1 and 2. It is noted that O and s can be any fund pool and individual, which means that the entire process is free from obstacles and selectivity, which fully reflects the homogeneity of participants and financial needs, and perfectly solves the problem of inefficient resource allocation.

Of course, the perfect implementation of Lightning Loan also has certain basic conditions to guarantee: a large number of asset pools that support the Lightning Loan interface and allow mutual calls between contracts. If these two conditions are met, a perfect decentralized financial system will be constructed, and its efficiency will far exceed traditional finance. This is not only because of code execution, but because it perfectly solves the arbitrage risks and arbitrage. Credit issues. But it is worth mentioning that if the contract call creates a new arbitrage opportunity, this is not what we expected to promote market effectiveness. This is a brand-new financial attack. Condition 1 to be reached will carry out a deeper analysis and a distinction needs to be made, because if the transaction characteristics of the contract are used and external reorganization is performed to form a new transaction, it is not a real arbitrage that is not valid for the market, but a damage to the market. Market effectiveness. For the contract and the call of the contract, we will analyze it in depth, see the following article for details. In any case, because Lightning Loan creates a new type of credit, it helps to overcome the "borrowing constraints". It is an important discovery in the field of blockchain and provides a lot of help for subsequent development.

What kind of change will the credit of a block bring to the world? let us wait and see!

Note 1 : Lightning loan makes use of the transactional characteristics of a transaction (ACID: atomicity, isolation, consistency, durability), and performs a callback design on the loan model, as follows:

1) In addition to specifying the loan amount, the loan function entrance also needs to specify a receiving contract address

2) The receiving contract must meet the requirements given in the loan specifications

3) The loan interface calls the specified callback function of the receiving contract and transfers the money, while recording the balance status before the transfer

4) When receiving the contract, when receiving the loan transfer, the callback function is called. You can use the received assets to execute custom contract logic, or you can call other contract functions.

5) After the execution of the receiving contract function, return to the callback point of the return function. At this time, you can get the balance status of the third part before the transfer. At this time, check to see if the payment has been received. If not, enter Abnormal status, the entire transaction is cancelled.

As mentioned above, through the callback design and utilizing the transactional characteristics of the transaction, a supervised "credit loan process" is completed