The loan agreement bZx was manipulated to make "Lightning Loans" popular, and to understand the secrets of Lightning Loans that must be repaid in 13 seconds

Written by LeftOfCenter

Source: Chain News

Someone who is smart and sly has just earned $ 350,000 in "Delivery" through manipulation of the DeFi loan agreement bZx, which caused a stir in the DeFi world and made the new species " Flash Loan " a hot topic.

To put it simply, a manipulator borrowed 10,000 ETH from the decentralized digital currency derivative trading platform dYdX through "Flash Loan", and used 5,000 ETH to loan 112 wBTC at Compound, and 5000 ETH to bZx Opened a short order for wBTC, and then used wBTC borrowed by Compound to smash the disk at Uniswap, resulting in bZx short positions, and then returned the originally borrowed 10,000 ETH. In the process, it obtained a value of $ 350,000 ETH gain.

And all of this is done in one block time, which is a matter of ten seconds.

This is the charm of "lightning loan"-this new species born in the DeFi world does not require any collateral, as long as the borrowing and repayment are completed in one block time. This will open the minds of smart developers to develop new DeFi applications. The bZx contract was manipulated, and Lightning Loan began to attract more DeFi developers.

As a matter of fact, the only “Lightning Loan” DeFi agreement that can be checked is the loan agreement Aave . Lianwen once reported in mid-January on a new DeFi product called "Lightning Loan".

The following is the previous related reports of Lianwen for readers to understand the product:

The secret of a lightning loan that must be repaid in 13 seconds: a quick read of the unsecured DeFi loan agreement Aave

Compared with traditional finance, DeFi has many advantages, but also has structural defects. DeFi requires excess pledge, which means that the utilization rate of funds is very low.

"Low mortgage rate" will be the future of DeFi, and the lightning loan model to be introduced today can realize the loan of funds from decentralized agreements without collateral assets. How is it achieved? Let's look at the main character of the series in 5 minutes to read today, Aave's lightning loan function.

On January 9th, the open source lending agreement Aave announced the launch of the Ethereum mainnet, and also launched a series of new features, including the Flash Loan function, the issuance of an interest-bearing token aTokens, and stable and floating interest rates. Seamless switching between them, permanent loans with no maturity, Aave oracles powered by Chainlink, and more.

Among them, the most creative and most worth mentioning is this Lightning Loan function , which is also the protagonist of the 5-minute reading series today .

Lightning loan, as the name suggests, is fast loan, how fast is this?

The official explanation is that the transaction of loan issuance and repayment must be completed in the same block on Ethereum . According to the current block production speed of Ethereum, which is 13 seconds, that is, the repayment is completed within 13 seconds after the loan. . As long as the above conditions are met, the borrower can borrow without having to mortgage the assets, thereby greatly improving the utilization rate of funds. Otherwise, all operations will be undone and returned to their original form.

The technical implementation principle of Lightning Loan is actually very simple. There is a Lightning Loan function in the smart contract deployed by Aave. When this function is called, the user can borrow from the Aave protocol, but this function only needs to meet a condition. That is, you must complete the repayment and add a certain fee in the same Ethereum block, or the transaction will be restored.

Of course, in addition to the above borrowing, there are many use cases for this logic.

According to the official introduction, the function of Lightning Loan is to ensure that users do not need to mortgage to realize repayment, that is, if the funds in the conditions are not returned, the transaction will be restored, that is, all operations previously performed are undone, thereby ensuring the security of the agreement and funds. The operation between borrowing and repayment is called "circuit", and the operability of this section is very large.

For example, you can open a transaction in the Uniswap loan pool, and then close another transaction with the same liquidity in Kyber , which means that the user borrows liquidity from the Aave protocol in a transaction, and the conditions under which the transaction is executed It is the same liquidity that is returned to the agreement before the transaction ends.

Or, when you find a CDP contract with a lower interest rate than what you currently have , you can do this: Use the Aave protocol to lend Dai in the lower interest rate CDP contract (no need to mortgage Ethereum), and borrow Out Dai closes the current CDP with a higher interest rate, retrieves ETH, sends it to other loan agreements to take out Dai, and repays it on Lightning Loan, which is basically similar to a loan restructuring / refinancing.

At present, the first non-mortgage arbitrage transaction based on Aave Flash Loan has been completed . In this loan transaction performed by ArbitrageDAO, ArbitrageDAO has carried out multiple operations on Dai and Sai, and finally realized arbitrage 9 DAI, minus The spent gas costs 0.02 ETH (about 3.66 DAI) and eventually earns 5.45 DAI.

ArbitrageDAO is created based on MolochDAO using the convening tool DAOHaus. It has been connected to StakeDAO and can obtain liquidity from Stake Capital. It is worth mentioning that JULIEN Bouteloup, the founder and CEO of Stake Capital, is also a stakeholder of ArbitrageDAO and Stake DAO.

In November 2019, Stake Capital, a staking service provider, announced the official launch of Stake DAO, sharing a portion of the revenue generated by the fee generation token SCT with DAO, and distributing it to stakeholders according to a certain mechanism based on the income cycle. Users can put SCT in DAO and get regular staking rewards. SCT tokens can also be used for governance voting, used to make major decisions, including the type of staking service on the shelves, modification of the income duration cycle, and SCT expenditure rate (which will be reduced after each cycle to reward early investors). At the same time, each mortgage asset will generate a Liquid Token (LToken) at a 1: 1 ratio, which can be traded in the secondary market as a derivative, thereby unlocking the potential of the derivative.

According to founder and CEO Stani Kulechov, Lightning Loans is geared toward developers building financial products.

For example, in a previous ETHIndia hacking campaign, two developers from India implemented an application that handles multiple CDPs in a simple way, which is different from InstaDApp which requires 5 to 8 transactions. This method only A transaction needs to be executed. Using this application, CDP needs to be closed and a loan renewed from Compound at the same time, which will cost about 300,000 to 500,000 pounds.

This money is not a small cost for developers, especially young developers. With Lightning Loan, these developers can get loans quickly without the cost of collateral.

This is the goal that the Aave protocol originally built for the Lightning Loan product, directly serving the financial product developer community, allowing more developers to use the Lightning Loan to create refinancing tools or arbitrage tools to build finance without capital Products, thereby lowering the barrier to development.

But in the end, the ultimate beneficiary is the end user . These financial applications developed by developers are ultimately aimed at end users. Lightning loan hopes to provide developers with a tool to help them build DeFi applications that are easier for end users.

For example, developers can build a CDP clearing application based on Lightning Loan . When the Maker system requires additional collateral deposit, this app will use Lightning Loan to automatically withdraw and repay loans in other lending agreements before liquidation occurs, thereby avoiding paying up to 13% of the settlement fee, even if 1% of Developers can also reduce losses by 12%.

According to Stani Kulechov, the Aave protocol is not only improving functionality but also providing new options.

We don't want to do things similar to others, but we want more people to join DeFi. For this, we need to build more DeFi use cases, and Lightning Loan can expand more DeFi use cases and make DeFi product types more Diversification, because it greatly reduces the need for funds and at the same time reduces transaction costs. These are the core goals that Aave wants to achieve.

Stani Kulechov and team background

The founder of Aave, Stani Kulechov, is not from an economics background, but from a legal background. He has always been interested in finance. He is 29 years old and has taught himself to develop as early as a teenager. ETHLend, a decentralized lending market, was developed based on Ethereum. Like MakerDao, this team also has a Nordic background. Aave was launched in Finland and has now moved its headquarters to London and currently has 18 team members. Aave has a childlike “ghost” logo, and Aave means “ghost” in Finnish. The meaning behind it is that Aave focuses on creating a transparent and open infrastructure for decentralized finance.

We will continue to update Blocking; if you have any questions or suggestions, please contact us!


Was this article helpful?

93 out of 132 found this helpful

Discover more


French financial market regulator approves first ICO application after updating rules

In the US, the hype surrounding ICOs may have subsided, but France seems to have renewed interest. On December 17, th...


The disaster behind the coin market "Xiaoyangchun" and the living water

The coin market "Xiaoyangchun" came fast, and it was crazy to play. Zhang Xiaojian, the "old leeks&quo...


Analysis | Entities need to obtain BaFin license. Does the new law pave the way for Germany to become a "cryptocurrency paradise"?

A new German law requires that every entity (such as a Bitcoin exchange or Bitcoin custodian) who holds the private k...


Quickly review the SEC's "only" seven allegations against Coinbase, is hitting your own child light?

Following Binance, on the evening of June 6th (Beijing time), the US Securities and Exchange Commission filed a lawsu...


Five members of the Libra Association join. Why does this startup compete with Facebook?

Author: Joyce Source: Blockchain Outpost "The biggest difference with Celo compared to Facebook is the decentral...


Twitter Featured: The UK's largest travel company accepts bitcoin payments; SBI will be removed from BCH

01 Britain's largest travel company accepts bitcoin payments Forbes analyst Joseph Young tweeted: Merchants use ...