## **OpenMEVRouter tests** Router: https://github.com/manifoldfinance/OpenMevRouter/blob/main/contracts/OpenMevRouter.sol Proposition: https://forum.sushi.com/t/proposal-sushiguard-router-contract/9931 This router is proposed to be used instead of current Sushiswap router Difference: 1) If swapping with Sushiswap pools violates the minimum output amount limit, OpenMEVRouter tries to use Uniswap pools instead 2) After swap it makes on-chain abritrage between Sushiswap and Uniswap pools. Arbitrage is made using self liquidity of the router contract or using Aave flash loans. Arbitrage earnings belong to the router contract (current inplementation) ### **Economics tests** Typical values, depend on block. For calculating transactions cost, gas price is set to 50Gwei, Eth is set to 3000$ ETH->USDT swap **with flashloans** simulation: | Input | Sushi gas | UniV2 gas | OpenMEV gas | Arbitrage | | ----- | --------- | --------- | --- | --- | | 0.01ETH |157304(24$)|156675(24$)|201103(30$)| No | | 0.1ETH |157304(24$)|156675(24$)|201103(30$)| No | | 1ETH |157304(24$)|156675(24$)|201103(30$)| No | | 10ETH |157304(24$)|156675(24$)|201103(30$)| No | | 30ETH |157304(24$)|156675(24$)|201103(30$)| No | | 50ETH |157304(24$)|156675(24$)|624854(94$)| +46USDT | | 100ETH |140441(21$)|139274(21$)|572919(86$)| +1922USDT | ETH->USDT swap **without flashloans** simulation: | Input | Sushi gas | UniV2 gas | OpenMEV gas | Arbitrage | | ----- | --------- | --------- | --- | --- | | 0.01ETH |157304(24$)|156675(24$)|184385(28$)| No | | 0.1ETH |157304(24$)|156675(24$)|184385(28$)| No | | 1ETH |157304(24$)|156675(24$)|184385(28$)| No | | 10ETH |157304(24$)|156675(24$)|313962(47$)| +14USDT | | 30ETH |157304(24$)|156675(24$)|297084(45$)| +172USDT | | 50ETH |157304(24$)|156675(24$)|297059(45$)| +476USDT | | 100ETH |140441(21$)|139274(21$)|297084(45$)| +1884USDT | USDT->WETH->USDC swap **with flashloan** simulation: | Input | Sushi gas | UniV2 gas | OpenMEV gas | Arbitrage | | ----- | --------- | --------- | --- | --- | | 1000USDT |210967(32$)|209138(31$)|293227(44$)| No | | 10000USDT |210967(32$)|209150(31$)|293240(44$)| No | | 100000USDT |210967(32$)|209150(31$)|293240(44$)| No | | 200000USDT ||TRANSACTION FAILED|||||||||| | 500000USDT |210967(32$)|209150(31$)|1064167(160$)|+0.69WETH, +192USDC | | 1000000USDT |193868(29$)|192033(29$)|975691(146$)|+7WETH, +5799USDC | USDT->WETH->USDC swap **without flashloan** simulation: | Input | Sushi gas | UniV2 gas | OpenMEV gas | Arbitrage | | ----- | --------- | --------- | --- | --- | | 1000USDT |210967(32$)|209138(31$)|293210(44$)| No | | 10000USDT |210967(32$)|209150(31$)|293222(44$)| No | | 100000USDT |210967(32$)|209150(31$)|293222(44$)| No | | 200000USDT |210979(32$)|209150(31$)|424130(64$)|+0.0081WETH| | 500000USDT |193868(29$)|192033(29$)|815295(122$)|+2.2WETH, +882USDC | | 1000000USDT |193868(29$)|192033(29$)|779459(117$)|+8.6WETH, +7274USDC | ### **Stability test** ETH->USDT swap with flashloans and input between 20ETH and 70 ETH has about **25% chance to fail** USDT->WETH->USDC swap with flashloans and input between 100K and 400K ETH has about **45% chance to fail** The problem is somewhere in flash loans. Transactions are reverted in Aave contract ### **Conclusions** 1) Arbitrage is used only for big transactions (about 150K$ or more). That is right, judging by how expensive it is 2) Even if arbirage is not used - OpenMev transactions are more expensive than current Sushiswap transactions about 20-30% 3) Transactions without flashloans (router should have enough his own liquidity) are cheaper than transactions with flashloans, even if there were no arbitrage 4) Arbitrage profit is higher without flashloans. But it needs router to have appropriate liquidity aboard (necessary tokens and quantity) ### **Proposition** 1) If we decide to use OpenMEVRouter, **we should not throw away our current router**. We should use it for all not very big swaps. OpenMEVRouter should be used only for big transactions (about 150K$ or more). We have such transactions, but not very much (*TODO: how much?*). 2) If there are many enough 150K$+ transactions, than it is the reason to **add some liquidity to router aboard**. At least the most popular - WETH, USDC, USDT. It would increase arbitrage income 3) If we decide to use OpenMEVRouter, it should be better tested to **remove transaction fails**