Flash Arbitrage: How Can DeFi Create More Efficient Financial Markets

Flash arbitrage” is a unique innovation in the field of DeFi, which makes full use of smart contracts of Blockchain to build an arbitrage model that is free from the risk of impact. It also cooperates with the low-cost funds provided by “flash loan”, reduces the risk of funds and improves the ratio of utilizing funds to the maximum extent, thus making arbitrage play an extreme role as a mechanism for discovering market price, which can be called a new generation of alchemy in the field of DeFi.

1.What is Arbitrage

Arbitrage, also known as spread trading, generally refers to the act of benefitting from the trade made by using difference and changes in prices between two financial products. Simply speaking, a trade involving at least two financial products can be defined as arbitrage. On the contrary, if one person buys a stock and sells it at a certain price after a period of time, although there is a difference in price, it can only be called speculation, but not arbitrage.

Arbitrage, in general, can be divided into a narrow sense and a broad sense. The narrow sense of arbitrage refers to “risk-free arbitrage”, while the broad sense of arbitrage is in line with the definition above. However, there is a risk of exposure, or to put it simply, it is impossible to “gain without loss”. This article discusses from the perspective of risk-free arbitrage.

Risk-free arbitrage is to make use of the characteristics of price regression or convergence, to ensure that the spread earnings are greater than zero, so that profits can be gained by using the spread earnings to cover fees, interest and other costs. In any case, there will be no loss of capital. There are two representative models of risk-free arbitrage:

calendar spread arbitrage

There are many ways of calendar spread arbitrage, among which the most typical one is index arbitrage. Due to the fact that futures price will converge with the spot price on the delivery day, selling the contract at a high price and buying the contract at a low price will ensure the risk-free profit. This is the source of the concept of risk-free arbitrage.

Image for post
calendar spread arbitrage

cross market arbitrage

This term is used to refer to selling (or buying) the same variety of contracts in one exchange, while at the same time buying (or selling) a particular variety of contracts in another one, in order to profit from hedging in both exchanges when seeing a certain opportunity. If the object for buying and selling is spot goods, it would be what people familiar with in digital currency term as “moving bricks”.

By the way, “moving bricks” is a unique phenomenon in digital currency, because in traditional finance, whether it is stock market, commodity exchange or the futures market, there is no digital currency exchange with continuous trading 24/7, and the trading variety is exactly the same. This mainly relies on the characteristics of blockchain capacity, which should be the industry consensus.

2. Flash Arbitrage

Anyone with some knowledge of DeFi should know the concept of flash loan, but the term “flash arbitrage” has not yet to be heard. The two are closely related. But we will analyze it later. Firstly, here is a brief definition of flash arbitrage:

Flash arbitrage refers to an arbitrage model that uses smart contracts to complete all arbitrage transactions within a single trade, and calculates the profit and loss afterwards. If there are losses caused by price changes or insufficient transactions, the transaction can roll back, thus paying only the necessary technical costs (such as the GAS fee for block chain transactions), without suffering other losses.

Image for post

What’s the meaning of flash arbitrage? This begins with the problems of traditional arbitrage. Even for the risk-free arbitrage, it is only theoretically that there are no capital (principal) risks, but trading risks still exist, such as the market is not deep enough to lead two products to clinch a deal with consistent amount, or the transaction price deviates too much from the expected price, both resulting in a large profit reduction or loss, or an exposure to risk or other issues. The root cause of these problems is that arbitrageurs can only initiate trades, but cannot control the results. This phenomenon still exists in the centralized digital currency market, which is independent from whether the underlying assets are in the blockchain, because the transactions themselves are still carried out in the centralized system.

Now, DeFi changes all that.

In the world of DeFi, all kinds of financial markets, such as trading, borrowing and derivatives, exist in the form of smart contracts, thus creating the mode of “building blocks”: the use of smart contracts exists in the form of transactions, so that no matter how many smart contracts are invoked and how many operations are done in a blockchain transaction, either all succeed or fail/roll back. This is crucial for building a portfolio of financial products. If the internal logic of a financial product is likely to succeed in half, and the other half fails, nobody will dare to buy or manipulate the product.

Under this model, the logic of arbitrage can be designed as an independent financial product, and the most typical one is the “cross-market arbitrage” model described above, as shown in the following figure:

Image for post
Image of Flash Arbitrage Smart Contract

This is the simplest code of a flash arbitrage mode in arbitrage. The logic is very simple, that is, the ETH/USD trading price of two markets is identified. If there are price difference that can meet arbitrage requirements, then the code would run a buy-and-sell operation, thus making profit.

There are two important points in the process:

1.This code must be an intelligent contract on the chain, if not, it is impossible to achieve the purpose, though what it invokes is all intelligent contracts;

2.Since the code itself is a smart contract, you can judge the result and roll it back if no profit is gained after the transaction. In this case, the buying and selling in the two markets are canceled as if nothing happened.

Simply speaking, “flash arbitrage” is to completely encapsulate the arbitrage logic into a smart contract and decide whether or not to carry out the arbitrage transaction by judging the result, so that the arbitrageur does not have to consider every complex factor in the traditional arbitrage market. Thus, on the premise of risk-free, the probability of successful arbitrage and the corresponding benefits are greatly increased.

Flash Arbitrage and Flash Loan

As mentioned above, there is a close relationship between flash arbitrage and flash loan. The logic of the two is very similar, which uses the nature of smart contract to corporate the operations of borrowing and repaying money into one transaction, either succeed or fail. In other words, if a smart contract tells you cannot pay back, you cannot borrow in the first place and the borrowing operation is rolled back.

Flash loan does raise a question: what is the use of borrowing money? Traditional borrowing is used either for production or for consumption, and is repaid with future cash flows over time. If the loan and repayment occurred in a flash, what is the use of this money? Flash arbitrage gives the answer: use the flash loan to flash arbitrage, and if the arbitrage doesn’t make money, it would be rolled back if not by itself, then by the smart contract.

From this point of view, flash arbitrage and flash loan has the relationship of “flash arbitrage in flash loan, flash loan in flash arbitrage”. From the perspective of flash arbitrage, flash loan is a source of funds (because flash arbitrage can operate with its own funds as well, and the effect is consistent or even better). From the perspective of flash loan, flash arbitrage is a demand of lenders. In addition to that, there can be other demands. For example, many hacking incidents this year have been done through flash loans, because hackers usually do not have large amounts of their own funds to carry out such attacks.

3. DeFi will be a more efficient market than the traditional financial sector

Flash arbitrage brings two important improvements in two aspects: the first is the capital risk and utilization, and the second is the effectiveness of price discovery.

Reducing the risk of capital and increasing the utilization rate

Flash arbitrage greatly reduces the risk of capital, bringing an obvious benefit, that is, arbitrageurs now dare to pursue smaller arbitrage space and gain revenue, without fear of the losses caused by trades that did not happen as expected. As a result, the amount of money involved in arbitrage trading in the market will increase substantially, which is essentially increasing the utilization rate of market participants.

Effectively promoting the return of market prices

Because arbitrageurs now can arbitrage when smaller spreads occur, without waiting for them to expand to a certain extent, so they can level out the price differences between different markets and different products more quickly, and allow the market prices to precisely return. A rapidly price returning market is a more efficient market, so it can be said that DeFi will build a more efficient market than the traditional financial sector.

About us:

Unizon is a development team, dedicated to blockchain and open financial technology, and specializing in DeFi protocol development, technical advisory services, and model design for Tokenomics.

Contact us:



+ posts

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact us

Fill in the form below or give us a call and we'll contact you. We endeavour to answer all enquiries within 24 hours on business days.