EigenPhi

Posted on Mar 24, 2022Read on Mirror.xyz

How One Stablecoins Arbitrage Strategy Quietly Making US$113 Million Profit in 4 Months without Capital?

Photo by Towfiqu barbhuiya on Unsplash

UPDATE: We are working on re-calculating the profits and returns of this strategy, which is confirmed as arbitrage by the founder of Abracadabra.Money in their discord channel in the picture below. Stay tuned.

5 Takeaways

  • The MIM-UST arbitrage strategy has harvested over $113 million in the past four months.
  • Essentially an advanced form of the flash loan without capital investment, it gains 650x returns benefitting from paying only gas fees without the hefty tips for the miners like Sandwich arbitrage and no need for Smart Contract coding skills.
  • The strategy has been striking on the lowkey liquidity pools, thus under the radar of public eyes and particularly Sandwich attackers.
  • Using the flash loan tactic allows the strategy to avoid risk exposures by holding no positions during transactions. Involving two stablecoins lowers the uncertainty caused by stablecoin crashes.
  • Tools like EigenPhi provide insights into ever-increasing liquidity on flash loans supplying nearly infinite free leverage like this strategy, which requires particular attention.

“Hustle in silence and let your success make the noise.” — Unknown

The noise of MEV on #NFT, Sandwich, and Flashbots has been deafening for months. To utilize these strategies, one needs to know how to weave complex measures into the code of Smart Contract, i.e. jumping around different tokens and liquidity pools, which requires developing, updating and debugging codes to adapt to emerging and evolving protocols. Not to mention the soaring capital for the success of Sandwich, especially if stablecoin is involved.

However, one arbitrage strategy between merely two stablecoins, MIM & UST, has reaped over 113 million US dollars in profit since Nov 14th, 2021, without developing Smart Contract. During these four months until Mar 23rd, 2022, it has launched 1419 times under the radar resulting average profit of $80,096, costing $122.5 per transaction. The highest yield is $6,001,912, pure profit. In total, the MIM-UST strategy has 650x returns.

This article is the first in-depth report of it.

Prowling on a lending platform for the everyday crypto investor, the whole thing looks like someone sneaks into a McDonald’s franchise without being noticed, discovers the secret menu, tweaks the fryer and makes a meal of Kobe beef with the cost of a small french fries. In contrast, others have to wait in line to order some Sausage, Egg & Cheese biscuits.

Willis Lam , Close Up of McDonald’s Sausage Egg Biscuit (16520087076) , CC BY-SA 2.0

Being the only exclusive DeFi MEV & arbitrage Big Data platform, EigenPhi employs in-house algorithms to discover spectacular arbitrages from myriads of seemingly unglamorous transactions and disclose them to the public. Since detecting the strategy, our adept team has monitored the situation round-the-clock. According to our investigation, the free banquet music has been spread to ears belonging to a limited circle. But first, let’s dissect the transactions using the strategy and showcase it here for the attention of the concerned groups.

Four pillar stones buttress the strategy:

  • Only one tactic using two stablecoins is enough to yield exceptionally above-the-average profit.
  • Capitalizing on two stablecoins minimizes the risk of one single stablecoin crash.
  • No programming is needed to carry out the strategy, which is highly productive and lowers operational expenditure (OPEX).
  • No position during the execution means no risk exposure while taking advantage of the ample arbitrage opportunity derived from the decoupling of algorithmic stablecoins.

Now, we can dive into the details to expose the devils.

Pull It Off Like Some Magic

First of all, the strategy is essentially a flash loan practice, which means you can lend tokens, make a profit and pocket it, and repay the loan in one transaction instantaneously. The lender doesn’t lose anything if any problem occurs during the transaction because the whole process would be rolled back. (Visit here or here for a more detailed description.)

In general, one has to know how to code to set up a flash loan. Not this one. We take one transaction eigenphi.io revealed to see how it was conducted.

This one made over $101K profit while costing only less than $30.1 worth of gas fees and swap fees on the liquidity pool. We identify its arbitrage type as spatial. Typically, spatial arbitrage requires knowledge of specific tokens’ exchange rate spread between different liquidity pools, usually in Uniswap and Sushiswap. Transactions making use of the spread would benefit the trader. But here is a quite different monster.

Open the overview of the transaction details on Etherscan; you can find five participants joining together to make the magic, pun intended, happen.

allows users to open loans, borrow MIMs, leverage and repay. Abracadabra.money is a lending platform that uses interest-bearing tokens (ibTKNs) as collateral to borrow a USD pegged stablecoin (Magic Internet Money — MIM), that can be used as any other traditional stablecoin”.

The picture below illustrates the token exchanging process.

  1. The trader borrowed 243,098.235492 UST from the Degenbox and invoked the USTSwapper.
  2. The trader ordered the USTSwapper to exchange 243,098.235492 UST for 244,132.700775 MIM in the MIM-UST-f Curve Pool using the exchange rate here.
  3. The trader instructed the 244,132.700775 MIM to be sent back to the Degenbox to repay the borrowed asset.
  4. The trader told the Degenbox to swap the 244,132.700775 MIM for UST and pay the loan that happened in step 1. Based on its own public exchange rate, Degenbox swapped out 344,119.620672 UST, held 243,098.235492 UST for the loan, and left 101,021.385180 UST for reciprocation. Trader withdrew 101,021.385180 UST without hesitation. The transaction is over.

On EigenPhi, we simplified the confusing process by only displaying meaningful knowledge of the transaction in the token flow chart below. You can tell there are two liquidity pools engaged in it. Degenbox is in the first line indicating the trader sent it 244,132.700775 MIM and received 344,119.620672 UST. The second line is the MIM-UST-f Curve Pool showing the trader receiving 244,132.700775 MIM for sending 243,098.235492 UST. The last line signalled the trader gained 101,021.385180 UST as net profit.

Nevertheless, what spell did the trader use to enable all this to happen on a vigorously promoted DeFi lending platform without getting noticed?

We have to go deeper into the code level to discover** how the trader tweaked the fryer with the help of the secret menu**.

Flash the Code Inside Out For the Golden Ticket

**NERD ALERT: **If you are into the precise tech details, please read on. Otherwise, we advise you to skip the steps below, except realizing that the trader masters a deep knowledge of the Cauldron V2 protocol to use several internal approaches, like putting Legos together, to manage a flash loan without writing and deploying a Smart Contract.

  1. Using the cook() method of the Cauldron V2 Protocol, the trader assembled a group of executable instructions as the method’s parameters that fit into one single transaction, which is the prerequisite of flash loan. Meanwhile, the cook() method can be executed without being put on the blockchain. The parameters of the cook() method can take a
  2. The trader invoked ACTION_UPDATE_EXCHANGE_RATE method, which would evoke the contract’s internal accrue() method to get the lendable asset.
  3. The trader called Cauldron V2’s internal method _removeCollateral() to swap for UST.
  4. The trader invoked USTSwapper to exchange UST for MIM.
  5. The trader used Cauldron V2’s internal _repay() method to save the MIM back to the Degenbox to harvest the arbitrage position.
  6. Calling the _removeCollateral() method again, the trader released the collateral.
  7. The trader invoked the withdraw() method and pulled out the UST position. End of the Spell.

Under further exploration, EigenPhi found the code of Degenbox is a fork of SushiSwap’s vault: BentoBox, which is the cornerstone of Kashi, a lending and margin trading platform.

To summarize, here are the two devices needed to succeed using the strategy.

  1. Proficient in the cook() method of Cauldron V2 protocol, relieving the painstakingly coding, debugging, and deploying.
  2. Constantly aware of the exchange rate spread, determining the best timing.

Of course, a few bucks worthy of $ETH would help for the gas fees — minor pains, maximum gains, in this scenario.

OK then, it’s time to examine how many have joined the private party.

The Banquet Table’s Guest List

From Nov 14th, 2021, to Mar 23rd, 2022, 1086 addresses of the traders implemented the strategy 1419 times, demonstrated in the chart below. Blue bars are the transaction count of the day.

To read the trend easier, the chart below processes the profit amount with the logarithm.

The profit and transaction count peaked on Jan 27th and Jan 28th, which is the time of 0xSifu’s exposure, the CFO of “Frog Nation,” a loose conglomerate of projects that include Popsicle Finance, Wonderland and Abracadabra. The revelation hit hard on MIM, causing the speculation of its decoupling with the US dollar. On 27th, the low of MIM was $0.9735 and $0.9776 on the 28th. However, MIM’s volatility generated staggering arbitrage scopes.

During the two days, 555 transactions garnered over $50 million profit out of the $113.7 million of 1419 transactions, illustrating a perfect MEV storm when token rates spread apart.

The table below shows the top 10 most profitable arbitrage of the whole time using the MIM-UST strategy. We share the data with trader and transaction addresses here, including all the 1419 transactions in the sheet. So please feel free to #DYOR. We are thrilled to see what you will spot and make it known. Just remember to ping our Twitter.

Conclusion: Coins of Stable Take You Over the Rainbow

People regard Stablecoin as the anchor of blockchains. Stable means lower volatility, which implies lower return. However, the 650x returns of MIM-UST arbitrage strategy between stablecoins overwhelms the usual perception, resulting from its intrinsic nature: flash loan. Over the last two years, the flash loan has become the monetary multiplier of DeFi and introduced unbridled nearly free leverage with liquidity. The data of EigenPhi tells us that 100% of arbitrages on DEX is either a flash loan or flash swap. Therefore, scenarios alike need particular general attention.

Producing shrewd knowledge and wisdom based on DeFi’s big data, EigenPhi publishes insights into flash-like arbitrage to build a healthier DeFi ecosystem.

For now, the flash loan has sent stablecoin into the wild wild west. With the proper knowledge of newly minted protocols, tools like EigenPhi, and mindsets and imaginations with no limitation, arbitrage on #Stablecoin is not a bridge too far. Instead, it can send you somewhere over the rainbow, way up high.

"The Wizard of Oz (1939)” (CC BY-SA 2.0) by twm1340


Follow us via these to dig more hidden wisdom of DeFi: