Liquidity Balance Arbitrage
Now, let's imagine, say, there is a price difference in the DAI/USDC pool between Uniswap and Curve. You can exchange 1 DAI for 1 USDC on Curve, but on Uniswap you only need 0.99 DAI to buy 1 USDC. Now you can try to perform the following arbitrage:
Borrow 100,000 DAI from Aave via a flash loan;
Exchange 100,000 DAI for USDC on Uniswap and receive 101,010 USDC;
Swap 101,010 USDC for 101,010 DAI on Curve;
Repay the initial 100,000 DAI + 0.09% Fees = 100,090 DAI;
Profit 101,010 DAI - 100,090 DAI = 920 DAI
Of course, in the whole arbitrage process, we must also consider the following factors:
Network Fees
The network fee here refers to the handling fee (such as the gas fee in Ethereum) to be paid when the transaction is written into the blockchain after the blockchain consensus. Multi-step arbitrage transactions can be expensive, so be sure to factor in handling fees when calculating profits.
Price Slippage
Be sure to calculate how much price slippage you will encounter when executing your order (hint: it depends on the size of the transaction and the liquidity of the liquidity pool).
Frontrunning
There is a good chance that others will find the same opportunity and will try to get ahead of you. On top of that, bots monitoring the mempool can spot your profit arbitrage opportunities and "steal" your profit opportunities by sending the same transaction with a higher gas fee.
Therefore, our automatic arbitrage system will predict whether the trade will be profitable before each trade, otherwise it will not be executed.
Last updated