$ 360,000 arbitrage! 3 Step Secret hacker DeFi lightning whole process of credit


Author | Gary Lai

Translator | CryptoShadow Zebian | Carol

Produced | block chain base camp (ID: blockchain_camp)

Recently an incident occurred: a "hacker" zero-sum funds use lightning loans, earned $ 360,000 in a transaction in (defined by hackers remains controversial, the event is not yet defined as "hackers" behavior, because the "hacker" did not do anything violate local law).

Taking into account DeFi knowledge network intrusion involved in the process, so Benpian will explain in detail each knowledge point for the novice to understand the process. In this article, I will walk you through the "invasion" of the operation, the entire process is completed in an Ethernet Square block. We will explain in detail each step, these three steps can help you process the "hacker" in the operation of some of the senior term have a better understanding.

The hacker, which we call "Joe".

The first step: Use Lightning loans for funding

First, Joe from public trading platform dYdX by lightning loans borrowed 10,000 WETHs (US $ 3 million), which was his initial capital.

Lightning Credit: Typically, to borrow money in DeFi must be borne CDP (mortgage bond), this means borrowing worth $ 80 BTC, you will need to deposit $ 100 worth of Ethernet Square as collateral. If you do not have to repay $ 80 BTC borrowed, it would lose all collateral. 

In contrast, the Lightning credit (a new DeFi lending practices) without collateral. As long as you pay off the amount borrowed in the same transaction, you can use smart lightning mortgage contract to borrow a lot of money (hence the name "flashed loan"). By lightning loans, Joe begins to cost close to 0 (apart from a few dollars in transaction fees), and immediately received a $ 3 million in cash.

WETH: Tibetan Volume Ethernet currency (Wrapped-Ether). In addition ERC20 token types, it also supports true Ethernet currency exchange 1 to 1, which means you can trade directly with other ERC20 token (including WBTC), after this point will be very important. If you are confused, just be treated as a regular Ethernet Square and continue reading.

Step Two: Using borrowed money to open short positions to realize profits

Next, Joe borrowed half of the volume of each possession ETH Ethernet currency (5,000WETHs) respectively transfer to Fulcrum platform and Compound platform.

On Fulcrum (established by bZx trading platform), Joe opened 112WBTC (ERC-20 type of roll possession BTC bitcoin) of an empty one, meaning that if WBTC prices, Joe will profit.

Next, in order to ensure WBTC prices, Joe will then Compound platform (a decentralized lending platform), previously used by WETH as collateral (called "margin collateral"), again borrowed 112 WBTC, by virtue of which 112 WBTC, he went Uniswap (a decentralized exchange) to open the WBTC price Uniswap platform fell on an empty one, so that WBTC price Fulcrum platform synchronized fall (because currency price Fulcrum platform to follow Uniswap), so that the earlier Fulcrum out in the empty single profit.

Empty one: the financial markets of one transaction, so that the underlying positions when prices fall, you can profit from it. When you short 112 WBTC, 112 WBTC you borrow from others and sold today (a total of $ 1,120,000) at a price of $ 10,000 per unit price WBTC. But you need to repay the loan 112 WBTC later. Assume that after you do so, WBTC price since sold a lot in a very short time fell to $ 9,000, then finally just spent $ 112 * 9,000 = $ 1,008,000 to repay the loan. So winning spread is $ 1,120,000- $ 1,008,000 = $ 112,000, which is the manipulation of the market by profits from loans to mortgages. You can multiply profits by Fulcrum leverage the platform; For simplicity, this article will not go into details.

Principle is that when WBTC prices fall, Joe make money; when WBTC prices, Joe lose money - but in this case, Joe will use a lot of borrowed money to make the price of Fulcrum's collapse, he opened with it comes empty one on the Fulcrum will get a lot of profit.

Uniswap: a decentralized exchange. Fulcrum platform using only feed price Uniswap a platform to determine its WBTC price, which means that the sale of air from Fulcrum profit, just do WBTC Uniswap exchange price collapse. Uniswap platform prices decline = Fulcrum platform prices decline.

WBTC: a support ERC-20 types of tokens to exchange one real bit of currency. And WETH similar, you can WBTC seen as a much smaller total market capitalization of BTC, which makes it easier to manipulate the price (which is perhaps the reason WBTC Joe chose to sell rather than the real BTC).

Compound: a decentralized lending platform, allowing you to use different digital currency lending.

Fulcrum: bZx based trading platform that can be leveraged transaction (long / short position).

 

Step three: profit and repay the loan

In the previous second step, an empty one realize large profits, Joe repay a loan, and took away all the remaining profits - a staggering $ 360,000.

Recall, Joe first borrow from credit dYdX of lightning was $ 3.0 million as his initial capital. Next, he used half of the capital in the Fulcrum opened the empty one WBTC. On the other side, he opened with an empty one so WBTC prices in Uniswap, to ensure his empty single profit. Eventually, a new profit, he paid off the initial loan, and obtained profits.

Although the morality of such acts, there are still controversial, but at least you can enjoy the ease of use of accessible DeFi products - with the advent of lightning loans, the financial markets and the emergence of new possibilities. 

Disclaimer: If you read this and understand and events that have occurred, some details may need to be amended and further investigation; therefore, if you go through the entire transaction interested, you can read Etherscan Ethernet Square block browser on this incident recording.

Transaction Record:

https://etherscan.io/tx/0xb5c8bd9430b6cc87a0e2fe110ece6bf527fa4f170a4bc8cd032f768fc5219838

This article is for everyone to understand the event itself, does not represent any suggestions and pointing. Welcome to discuss with us in the comments section!

Original: https://hackernoon.com/how-one-hacker-made-dollar360k-in-a-day-via-a-flash-loan-and-market-manipulation-13l53b7r

This article CSDN translation, please indicate the source of the source.

【End】

In Chinese enterprises meet the full moon and "telecommuting" positive occasion, February 29 , CSDN jointly the majority of "telecommuting" tool service companies jointly organized [ to fight the epidemic, technology companies in Action ] [Series telecommuting ] thematic lines summit activities: Chinese "telecommuting" exams .
Sweep under the Fanger Wei code or click to read the original free registration Live + + exchange and extraction prizes Daniel

I would like to know in advance the summit details, plus his assistant micro letter csdnai , reply telecommuting , into the broadcast group

Recommended Reading 

micro League founder of Sun Taoyong respond delete library staff; byte beating push "headline search for" independent App; C ++ 20 specification complete | Geeks headlines

epidemic virus all "denied"? Data model to interpret the effect of suppressing the propagation difference!

Chinese Noah, North proposes the GhostNet, using a linear transformation to generate a characteristic graph accuracy over MobileNet v3 | CVPR 2020

real version of "delete library on foot '? Deliberate destruction of programmers online production environment!

new knowledge! Article tells you how to run remote debugging Node.js applications in the Docker container

telecommuting is a burst of "transitional style" or will "continue to burn"?

You look at every point, I seriously as a favorite

发布了1763 篇原创文章 · 获赞 4万+ · 访问量 1595万+

Guess you like

Origin blog.csdn.net/csdnnews/article/details/104568274