EigenPhi report: How to earn $113 million in 4 months through stablecoin arbitrage?
Original Author: EigenPhi
Original compilation: TechFlow intern
Original Author: EigenPhi
Original compilation: TechFlow intern
first level title
five key points
1. The MIM-UST arbitrage strategy has netted over $113 million over the past four months.
2. Essentially, it is an advanced form of quick loan that does not require capital investment. It only pays Gas fees to obtain 650 times the return, without the need to provide high miner fees like sandwich arbitrage, and does not require smart contract coding skills.
3. The strategy has been operating on low-profile liquidity pools and thus has attracted the attention of the public, especially sandwich attackers.
4. Using a flash loan strategy allows the strategy to avoid exposure by not holding a position during the trade. Involving two stablecoins reduces the uncertainty associated with a stablecoin crash.
5. Tools like EigenPhi that provide insight into the ever-increasing liquidity on flash loans, offering virtually unlimited free leverage, like this strategy, require special attention."Get busy in silence and let your success make a splash." — AnonymousMEV has been deafeningly loud on NFTs, Sandwiches and Flashbots for months, and in order to take advantage of these strategies one needs to know how to weave complex measures into the code of smart contracts i.e. bypassing different tokens and liquidity pools , which requires developing, updating, and debugging code to accommodate emerging and evolving protocols. Not to mention the skyrocketing capital required for a successful sandwich attack, especially if stablecoins are involved.
However, since November 14, 2021,
An arbitrage strategy between just two stablecoins, MIM and UST, has earned over $113 million in profits without developing smart contracts.

In the four months to March 23, 2022, it launched 1,419 times under the radar, with an average profit of $80,096 and a cost per transaction of $122.5. The highest yield is $6,001,912, net profit. Overall, the return on the MIM-UST strategy was 650 times.
This article is the first in-depth report on it.
Hanging around on a lending platform, to the everyday cryptocurrency investor, the whole thing looks like someone sneaked into a McDonald's franchise undetected, discovered the secret menu, tweaked the fryer, used a small bag of Chips cost a meal of wagyu beef. Others, by contrast, had to wait in line to order some sausage, egg and cheese biscuits.
As the only DeFi MEV and arbitrage big data platform, EigenPhi uses internal algorithms to discover amazing arbitrage from countless seemingly ordinary transactions and disclose it to the public. Our savvy team has been monitoring the situation 24/7 since the strategy was discovered. But first, let's dissect a trade using this strategy and present it here for the attention of interested groups.
Four pillars underpin the strategy:
1. Just one strategy using two stablecoins is enough to generate unusually above-average profits.
2. Utilizing two stablecoins minimizes the risk of a single stablecoin crashing.
3. No programming is required to execute the strategy, it is highly productive and reduces operating expenses (OPEX).
4. No open positions during execution means no risk exposure, while taking advantage of ample arbitrage opportunities brought about by the decoupling of algorithmic stablecoins.
Now, we can dive into the details to reveal.
crack the magic
First, the strategy is essentially a flash loan practice, which means you can lend tokens, earn a profit and pocket it, and pay back the loan instantly in one transaction. If anything goes wrong during the transaction, the lender has nothing to lose as the entire process will be rolled back.

Generally, one must know how to write a quick loan. Not this one, and we find out how it works with a deal disclosed by Eigenphi.io.
This profit is over $101,000 while spending less than $30.1 in gas fees and swaps in the liquidity pool. We determine its arbitrage type as space arbitrage. Usually, space arbitrage requires understanding the exchange rate difference of a specific token between different liquidity pools, generally in Uniswap and Sushiswap. Trading that takes advantage of the spread will benefit the trader. But here's something completely different.
Open the transaction details overview on Etherscan; you can find five participants working together to make magic happen.
1. The contract starts with 0x59e: MIM CauldronV2 Lending Protocol, deployed by the Abracadabra.money team. it:
“Allows users to open loans, borrow MIM, leverage and repay. Abracadabra.money is a lending platform that uses interest-bearing tokens (ibTKN) as collateral to borrow USD-pegged stablecoins (Magic Internet Money — MIM), The platform can be used as any other traditional stablecoin".
2. The address starts with 0xd96 and appears as Abracadabra.money's Degenbox, which is deployed by Abracadabra.money and allows the creation of policies for internally held assets. Degenbox is a vault for lending, specifically UST here. The Cauldron mentioned above is built on top of Degenbox.
3. The address starting with 0xff4 is the USTSwapper deployed by Abracadabra.money.

4. The address starting with 0x55a is a liquidity pool based on Curve Plain Pool, which is used for MIM-UST exchange on Curve.fi. The outside party sets the exchange rate here.
5. The address starting with 0xb98 is the trader who started the transaction.
The diagram below illustrates the token swap process.
1. The trader borrows 243,098.235492 UST from Degenbox and calls USTSwapper.
2. The trader orders 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 instructs to send 244,132.700775 MIM back to Degenbox to repay the borrowed assets.
4. The trader tells Degenbox to exchange 244,132.700775 MIM for UST and pay the loan incurred in step 1. According to its own published exchange rate, Degenbox swapped out 344,119.620672 UST, held 243,098.235492 UST for loans, and left 101,021.385180 UST for returns. Traders pulled back 101,021.385180 UST without hesitation. The deal is over.
On EigenPhi, we simplify the confusing process by only showing meaningful transactional knowledge in the token flow diagram below. You can tell that there are two liquidity pools involved. Degenbox is on the first line, indicating that the trader sent 244,132.700775 MIM and received 344,119.620672 UST. The second line is the pool of MIM-UST-f curves, showing that traders received 244,132.700775 MIM to send 243,098.235492 UST. The last line shows that the trader received 101,021.385180 UST as a net profit.
However, what incantation did traders use to make this happen on a heavily promoted DeFi lending platform without being noticed?
We had to dig down to the code level to discover how the trader adjusted the fryer with the help of a secret menu.
Refresh the code inside out to get a golden ticket
Reminder: If you know the precise technical details, read on. Otherwise, we recommend you skip the following steps, other than to realize that this trader has a deep knowledge of the Cauldron V2 protocol, using several internal methods, like putting Lego bricks together, without writing and deploying smart contracts manage a flash loan.
1. Traders use the cook() method of the Cauldron V2 protocol to assemble a set of executable instructions into method parameters suitable for a single transaction, which is a prerequisite for flash loans. At the same time, the cook() method can be executed without going to the chain. The parameters of the Cook() method can take
2. The trader calls the ACTION_UPDATE_EXCHANGE_RATE method, which will call the contract's internal accrue() method to obtain the loanable asset.
3. The trader calls the internal method _removeCollateral() of Cauldron V2 to exchange for UST.
4. The trader calls USTSwapper to exchange UST for MIM.
5. The trader uses the internal _repay() method of Cauldron V2 to save the MIM back to Degenbox to harvest the arbitrage position.6. Call the _removeCollateral() method again, and the trader releases the collateral.。
7. The trader calls the withdraw() method and withdraws from the UST position. Finish.
In further exploration, EigenPhi found that
Degenbox's code is a fork of SushiSwap's vault: BentoBox, the cornerstone of lending and margin trading platform Kashi
To summarize, here are the two pieces of equipment you need to use this strategy successfully.
1. Proficient in the cook() method of the Cauldron V2 protocol, eliminating tedious coding, debugging, and deployment.
2. Keep abreast of exchange rate spreads to determine the best time.
Of course, only a few dollars worth of ETH was used to pay for the gas fee - in this case, a small cost with a maximum benefit.

Alright, time to check how many people joined the private party.

banquet table guest list
From November 14, 2021 to March 23, 2022, 1086 trader addresses executed the strategy 1419 times, as shown in the figure below. The blue bar is the number of transactions for the day.
For easier reading, the graph below treats the profit amounts logarithmically.

Profits and transaction numbers peaked on Jan. 27 and Jan. 28, which is when 0xSifu came to light as CFO of “Frog Nation,” a loose portfolio of projects that includes Popsicle Finance, Wonderland, and Abracadabra . The news dealt a heavy blow to MIM, fueling speculation that it would de-peg from the dollar. The MIM low was $0.9735 on the 27th and $0.9776 on the 28th. At this time, the volatility of MIM has created an amazing range of arbitrage.
Over the two days, 555 trades made over $50 million in profits out of $113.7 million in 1419 trades, illustrating the perfect MEV storm when token rates unravel.
The table below shows the 10 most profitable arbitrages over time using the MIM-UST strategy. We share data here with traders and transaction addresses, including all 1419 transactions in the table. So feel free to DYOR.Conclusion: Stablecoins Take You Over the RainbowPeople think of stablecoins as the anchors of the blockchain. Stability means lower volatility, which means lower returns. However, the 650x return of the MIM-UST arbitrage strategy between stablecoins overwhelms common perception due to its intrinsic nature: flash loans.
Over the past two years, flash loans have become DeFi’s money multiplier and introduced unlimited, near-free leverage with liquidity. EigenPhi data tell us that,
Therefore, scenarios like this require special attention.


