Original title: liquidator: how to make fat profits at DeFi
Blue fox notes
In DeFi, people pay more attention to the assets, interest rate, mortgage rate, etc., of the loan. One of the important roles to keep the loan agreement running is liquidators. Of course, their returns are also significant, with the DeFi domain providing liquidators with close to $500 million in profits to date. This profit margin is also shrinking with the increase of entrants and the introduction of auction mechanisms, but the overall space has the opportunity to continue to rise as the DeFi market grows. TomSchmidt, translated by SIEN of the blue fox notes community.
In the DeFi domain, the liquidator is an understudied role. They work behind the scenes like miners and validators, keeping the system running, and are rewarded handsomely for doing so. Unlike miners and verifiers, however, liquidators do not actually require any upfront capital investment, creating an ecosystem of professionals that operate entirely anonymously anywhere in the world, keeping markets solvent and thus paid.
What is liquidation?
Over the past two years, ethereum has issued a number of decentralized lending agreements, including MakerDAO, Compound and dYdX, and others that allow anyone to borrow or lend cryptographic assets without trust. While these agreements differ in terms of how they enter the market, the assets they offer and the terms of the loans, the underlying lending structure is the same. The borrower deposits the collateral in a smart contract, and in return can borrow other assets provided by the lender for less than the collateral. This secured loan is one of the most primitive financial instruments, dating back to medieval Venetian banking, in stark contrast to the unsecured, credit-based loans that consumers are more familiar with.
When the value of the collateral exceeds the value of the loan, mortgage-backed loans work well, allowing borrowers to access liquidity without having to sell their usually illiquid assets. When the value of the collateral falls, however, rational borrowers have an incentive to avoid repayments, potentially leaving lenders stranded.
After all, who wants to pay 100DAI back for $99 worth of ETH? For more traditional forms of secured loans, such as car ownership loans or mortgages, this is not a problem because the value of these assets is often less volatile than that of cryptocurrencies. But when we borrow with ETH as collateral, the value can plummet in seconds.

If you don't liquidate, the mortgage might be risky
To mitigate risk, loan agreements typically require at least 115% of collateral (blue fox notes: typically more than 150%, not much in the 115% range), leaving plenty of cushion before the collateral falls below the value of the loan. If the value of the collateral falls below that level, the borrower can simply deposit more collateral or sell it to repay the lender and keep the system solvent. But that raises another set of questions.
Trading on ethereum is not free, and if borrowers are liquidated, they don't incur any extra fees, so no one has an incentive to keep the system solvent. In the process of clearing undercollateralized loans there may be costs and risks, and in order to reward individuals for clearing and discourage borrowers from leaving themselves undercollateralized, the loan agreement charges an additional fee for the clearing, which is given to the liquidator.
That way, anyone can repay a borrower's debt and make a handsome profit -- by selling the collateral to the liquidator at a discount, which keeps the system solvent.

The liquidator rescued the lender and kept the market solvent
The life of the liquidator
Although the mechanisms and terms of liquidation vary from agreement to agreement, they basically require the same components:
* robots that monitor pending ethereum transactions and find loans eligible for clearing
* decentralised exchanges that can be used to sell clearing collateral immediately and guarantee the liquidator a certain profit
* smart contracts that allow the clearing and sale of collateral to be automatically executed in a single transaction
Some protocols provide their own off-the-shelf tools to facilitate this, while others rely on the emerging ecosystem of homemade software for clearing robots. It is easy to understand these players and their role in the DeFi ecosystem through the successful liquidation of some of the most popular lending agreements.
Compound
Compound provides one of the most straightforward lending experiences in DeFi, and its clearing process follows the same simplicity. Let's take a closer look at its liquidation. Its liquidation involves two participants, our liquidator (0x64a) is called Alice, and our borrower (0xb5b) is called Bob.
Bob borrows USDC using ETH as collateral on Compound. This is a common method of leveraging without permission, using borrowed USDC to buy more ETH. Unfortunately for Bob, the ETH price fell sharply during the loan period, leaving his borrower's collateral value undercollateralized (133%). Because different assets have different qualities, price stability, and liquidity, a Compound mortgage rate is assigned to each asset (the current REP mortgage rate rises to 200%).
Alice notices that Bob's mortgage rate is lower than required, presumably by monitoring the status of the contract or using the Compound facility liquidateborrowpermission function, and invoking LiquidateBorrow on the Compound USDC market contract, triggering the liquidation process.
1.Compound first pays Bob any unpaid interest on Bob's collateral (which, after all, forces Bob to pledge more than the required mortgage rate).
2.Compound USES the price from the predictor to verify that Bob is in default.
3.Compound transfers the required amount of assets on loan (USDC) from Alice to the cUSDC market contract. In this way, Alice gets Bob's ETH collateral at a fixed discount to the market price (currently 5%). The ETH collateral is returned in the form of cETH, allowing the liquidator to retain it to earn the interest paid by the lender on the ETH, or to redeem the ETH in Compound. In this case, Alice earns about $7 in free ETH for her efforts.
Although certain liquidators hold cETH, other liquidators use smart contracts to atomically redeem and sell their ctokens, locking in a 5% profit on the trade. (blue fox note: atomicity means that the transaction either succeeds or fails completely.)
At first glance, one might suspect that the clearing was done manually, especially given that the Compound has not released any open source clearing bots and the slight popularity of clearing tracking dashboards. However, when we look at the daily time distribution of liquidator activity, we can clearly see that it is active 24/7, so it is probably a robot.
Some fat undercollateralised loans are waiting for liquidators
More sophisticated robots, such as this one, perform operations such as quickly borrowing assets from Compound to clear other accounts. We see this in specific liquidations, where the address redeems its USDC loan and then USES it to liquidate USDC loans for other accounts, easily earning a 5% return on the transaction.
Maker
Maker's liquidation process is less straightforward because it is done in two steps: first bite, then bust. This is similar to the liquidation of a car: first it is called in, then it is auctioned off to repay the lender. In Maker's system, collection is triggered by a request for bite, and then liquidation is triggered by a request for bust on its smart contract set.
Let's look at a liquidation of CDP17361 through two transactions, the first and second involving three participants: the consignee (0xc2e), which we call Ralph; The borrower (0x9c3), we call Brittany, and the liquidator (0x5a2), we call Larry.
Brittany borrowed 8.5 DAI using her 0.1eth collateral, which was well within Maker's 150% mortgage rate, when the ETH was $170. (blue fox note: 170*0.1/8.5=200% mortgage rate) unfortunately, the ETH price fell to $125 on December 27, leaving CDP undercollateralized (blue fox note: 125*0.1/8.5=147%), which allows Ralph to make a bite request on the CDP to reclaim the ownership of the CDP from SaiTub (SaiTub holds all active CDP contracts) to SaiTap (SaiTap contract execution retrieves the liquidation of the CDP).
At this point, the system is still undercollateralized. In the Maker system, there is more DAI outstanding than ETH to support the value of the required ratio DAI. Fortunately, liquidator Larry discovered the CDP and paid 8.5dai, thus obtaining the 0.067 ETH in the CDP pool, which is approximately 0.07ETH. This removes DAI from the market, raises mortgage rates and keeps the system solvent. Because of his efforts, Larry bought ETH for $121 /ETH, a good discount to the market rate, and immediately sold ETH on Uniswap in exchange for DAI to lock in a profit of 0.002ETH.
Note that although Ralph spent gas money on biting the risky CDP and initiating liquidation, he didn't actually make any money from it. Larry was rewarded for his efforts: the 3% discount ETH. While there are a large number of robots that bite and bust CDP for yield, only half of these bites will benefit from clearing by the same robot.

Translators are not included
So are there plenty of good Samaritan robots running bite CDP programs for free? Although a few seem to be doing so, most of the lesser bust-bites seem to be robots because they cannot find the right price to redeem the discounted ETH at liquidation time.
In one such example, the deal 0x8b2 bite for a CDP, gets the ETH/DAI quote from Maker, compares it to the best price they can get on the DEX (such as Oasis), and then decides it's best not to take the risk and leave the CDP in SaiTAP. Another reason may be the lack of default tools provided by Maker.
Although Maker provides a bite-keeper of the CDP and an arbitrage gatekeeper for ETH clearing profits on decentralized exchanges, some additional work is needed to combine them into a continuous robot. With the transition to MCD (blue fox note: MCD refers to multi-collateral DAI), the system has moved to collateral auctions, where Maker's auction guard robots can potentially participate in the purchase of clearing collateral at a profit.
Some of the more advanced strategies we see used by the largest robots include:
* split CDP's entire ETH redemption by exiting CDP and the entire DAI by actively developing and taking on more debt to maximize returns
* by using gas at below-market rates, gas tokens can be used to outbid other robots at gas auctions
* split ETH across multiple DEX for sale to minimize slippage and maximize DAI's return.
dYdX
The liquidation process of dYdX is similar to the Compound liquidation process, but the difference is that dYdX does not disclose the token interface to the loan agreement through its cToken, as the Compound does. Instead, dYdX creates a series of trading accounts for each address in its main Solo Margin contract and tracks the credits and liabilities of each account in each market it supports (ETH, DAI, USDC, etc.).
Without bite like Maker or an explicit functional signature for LiquidateBorrow like Compound, dYdX has a single operation function that can accept different "operation types," where the operation type numbered 6 can clear the borrower's account. Liquidators can buy collateral from borrowers at a 5% discount, earning the same Compound return.
The dYdX contract itself also supports atomic trading, allowing users to raise, clear and withdraw funds in one step. However, users may face the risk of insufficient mortgage in the process of liquidation, and have the risk of liquidation. Fortunately, dYdX has taken this into account and provided its own agency contract, which allows users to liquidate borrowers while keeping their accounts within safe mortgage rates.
This has proved popular, with more than 90 per cent of the clearing going through the agent. It is perhaps not surprising, then, that the dYdX clearing robot also USES this agent by default. DYdX is also different from other protocols in that it has a built-in quick-loan facility that allows liquidators to atomically borrow the required assets in a single transaction, clear and repay the loan without using an external agency contract, making it possible to make real, free profits on dYdX.
Combined with its accessible off-the-shelf clearing robots, this could explain why dYdX clearing has become so competitive over the past few months. Although some dYdX clearances look similar to other protocols, they are difficult to understand by looking at them through conventional chain analysis tools because there is no actual token transfer or transaction. It is only when we look directly at the function call that we can see what is going on behind the scenes.
Again, we have the receiver Laura (0x679) and the borrower Brad (0xa0d), but unlike the other examples, Brad deposits DAI and borrows ETH, presumably to short ETH. When Brad fell below the required mortgage rate, Larua suddenly transferred 53.45ETH at 7573.97, the effective price was $141.7 /ETH, or about 4% above the prevailing market price, resulting in a profit of $289.05.
How much did the liquidator make?
Beyond the technical details, what's more interesting is what happens when these designs are put into practice, especially for pseudonymous profit-seeking participants. Many individuals or funds are attracted to the idea of running clearing bots as a way to generate Alpha and support these networks, but as we've seen time and time again, there's no free lunch in cryptography, and clearing is no exception.
* profits can be made
Admittedly, the basis of the "universal mining" concept in DeFi has advantages. Individuals make a lot of money by clearing loans in DeFi. Although earnings vary depending on clearing fees, assets, and market volatility, the agreement as a whole generated net profits of nearly $100 million for liquidators in some months.
Over the life of these agreements, it can be seen that they provide liquidators with profits of close to $500 million. In some cases, some liquidators have netted more than $100,000 in a single liquidation.

Liquidator's profit on a monthly basis for different agreements
* competition is intensifying rapidly
The same attributes make it very attractive to be a liquidator - low barriers to entry, high margins, available tools, but it also reversely attracts competition, squeezing profits for existing liquidators. The effect can be seen in several ways:
First, quite simply, the number of addresses attempting to clear these agreements has increased dramatically since the agreements were published, with monthly live liquidators rising from 25 in January 2018 to 142 in November 2019. Although there is some duplication of Numbers, as liquidators share or rotate the addresses, the overall trend is clear.

Monthly living liquidator of different agreements
We can see this competition when we look at the percentage of liquidators' profits over time. We can see that the old liquidators are being squeezed as the new upstarts start to compete with the old liquidators and win clearing bonuses.

The percentage of profits from the liquidator's address on dYdX. The old liquidators are slowly being squeezed.
Just looking at gas price auctions between liquidators (to make these fat profits) also shows that this is different from a very similar auction between DEX arbitrage machines. There is only one winner for each clearing, which means that each liquidator not only loses the clearing bonus after the trade is scoffed out by the winner, but also wastes some ETH in failed clearing requests. (note by blue fox: it will cost gas to initiate the contract request)
If the red wall of failed trades cleared by dYdX is not convincing enough, we can look at the percentage of successful dYdX clearing requests that are trending down significantly over time, indicating that competition in the field is intensifying.

DYdX's declining success rate in clearing requests suggests increased competition
* borrowers are getting smarter, too
Liquidators are not only competing with other liquidators, borrowers themselves are using new tools to prevent them from being liquidated. DeFi Saver monitors user loans and, when they become risky, "unlocks" the risk by selling the borrowed assets in a single transaction, borrowing more collateral and refinancing the loan. This is different from Maker's own CDP keeper.
Although saving the CDP when the network is blocked by DeFi Saver is problematic, we can see that it starts up correctly and begins untying the CDP when the ETH price falls, saving the CDP owner a 3% clearing penalty.

When the ETH price falls, the DeFi Saver activates and saves the CDP
What is the future of liquidation?
In the spirit of 2020, what can we predict for the future of clearing?
* squeeze profits and move to dynamic systems
First, let's step back and re-examine why we need liquidation penalties. There are penalties to incentivise the borrower to remain solvent and to incentivise the liquidator to step in and stabilise the system when the borrower approaches default. As we have seen so far, fines are very effective in both areas. Now the question is, what is the optimal liquidation penalty? A fixed, static amount may not be optimal, depending on the duration of the loan, the asset, and the borrower.
We have seen the ecosystem move in this direction, with Maker moving from fixed-price sales of collateral in SCD to Dai's full collateral auctions in MCD. Under this setup, the clearing penalty would be less explicit, in the form of "minimum bid increments" to ensure a certain gap between the real market price and the price paid at auction.
Given that MCD has developed a competitive clearing ecosystem, we may see minimum bid increments fall over time, effectively reducing clearing penalties and allowing the market to determine the price of collateral to be paid. Although not a lending agreement, we can think of a Set agreement rebalancing auction similarly, where they sell a certain amount of one asset for an unknown amount of another, and then let the market determine the exchange rate for the auction. The New Year is expected to see more loan agreements switched to auctions or variable fee systems, meaning lower fees for borrowers and lower profits for liquidators.
* unsecured loans
So far we've been talking about mortgages, where you can have a collateral surplus to liquidate, but mortgages are only the first step in building a decentralized financial ecosystem. We expect to see a credit-based, unsecured ecosystem emerge at DeFi that will allow more people to start using these protocols and build more use cases. In this case, liquidation will be minimal or insignificant, putting the liquidation market at risk if this form of borrowing starts to eat into the market for mortgages. (blue fox notes: unsecured loans need to be built into the cryptographic credit system, which is still very immature, unsecured loans will not be so fast. In addition, even if unsecured loans start to enter the market, there is room for mortgages, and the market as a whole is far from mature and even less than the dividend period.)
conclusion
The liquidators' story follows the pattern of many others in the cryptographic world: unlicensed access to financial instruments allows an anonymous global ecosystem of innovators to design new products and strategies for which they are rewarded with millions of dollars. These unsung heroes helped expand DeFi's lending market to a market close to $750 million in guarantees, while building the confidence of lenders that is critical to the millions of DeFi users.
With the arrival of options and synthetic assets in the DeFi markets in the New Year, expect to see a lot of liquidator-like operators working behind the scenes to keep the deal running and to reap the rewards.
------
Risk warning: all articles of blue fox notes cannot be used as investment advice or recommendation. Investment has risks. Investment should take into account individual risk tolerance.
Join the blue fox notes knowledge planet: https://t.zsxq.com/iaQNnIq
Welcome to join the blue fox note group WeChat: pacinoli
Source:weixin.qq.com
Welcome to join the official BlockBeats community:
Telegram Subscription Group: https://t.me/theblockbeats
Telegram Discussion Group: https://t.me/BlockBeats_App
Official Twitter Account: https://twitter.com/BlockBeatsAsia