Skip to content

Commit

Permalink
Merge pull request #197 from bancorprotocol/196-tokens-with-shutdown-…
Browse files Browse the repository at this point in the history
…pools-should-be-flashloaned-from-balancer

196 tokens with shutdown pools should be flashloaned from balancer
  • Loading branch information
mikewcasale authored Nov 13, 2023
2 parents b3b4a48 + 7535b22 commit b2ab1e9
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 60 deletions.
13 changes: 0 additions & 13 deletions fastlane_bot/data/blockchain_data/ethereum/static_pool_data.csv
Original file line number Diff line number Diff line change
@@ -1,30 +1,17 @@
cid,last_updated,last_updated_block,descr,pair_name,exchange_name,fee,fee_float,address,anchor,tkn0_address,tkn1_address,tkn0_key,tkn1_key,tkn0_decimals,tkn1_decimals,exchange_id,tkn0_symbol,tkn1_symbol,timestamp,tkn0_balance,tkn1_balance,liquidity,sqrt_price_q96,tick,tick_spacing,exchange,pool_type,tkn0_weight,tkn1_weight,tkn2_key,tkn2_address,tkn2_decimals,tkn2_symbol,tkn2_balance,tkn2_weight,tkn3_key,tkn3_address,tkn3_decimals,tkn3_symbol,tkn3_balance,tkn3_weight,tkn4_key,tkn4_address,tkn4_decimals,tkn4_symbol,tkn4_balance,tkn4_weight,tkn5_key,tkn5_address,tkn5_decimals,tkn5_symbol,tkn5_balance,tkn5_weight,tkn6_key,tkn6_address,tkn6_decimals,tkn6_symbol,tkn6_balance,tkn6_weight,tkn7_key,tkn7_address,tkn7_decimals,tkn7_symbol,tkn7_balance,tkn7_weight
,,0,bancor_v3 BNT-FF1C/AAVE-DaE9 0.000,BNT-FF1C/AAVE-DaE9,bancor_v3,0,0,0x0D8775F648430679A709E98d2b0Cb6250d2887EF,,0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C,0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9,BNT-FF1C,AAVE-DaE9,18,18,2,BNT,AAVE,,,,,,,0
,,0,bancor_v3 BNT-FF1C/ANKR-EDD4 0.000,BNT-FF1C/ANKR-EDD4,bancor_v3,0,0,0x939B462ee3311f8926c047D2B576C389092b1649,,0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C,0x8290333ceF9e6D528dD5618Fb97a76f268f3EDD4,BNT-FF1C,ANKR-EDD4,18,18,2,BNT,ANKR,,,,,,,0
,,0,bancor_v3 BNT-FF1C/BAT-87EF 0.000,BNT-FF1C/BAT-87EF,bancor_v3,0,0,0x3506424F91fD33084466F402d5D97f05F8e3b4AF,,0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C,0x0D8775F648430679A709E98d2b0Cb6250d2887EF,BNT-FF1C,BAT-87EF,18,18,2,BNT,BAT,,,,,,,0
,,0,bancor_v3 BNT-FF1C/CHZ-b4AF 0.000,BNT-FF1C/CHZ-b4AF,bancor_v3,0,0,0xF629cBd94d3791C9250152BD8dfBDF380E2a3B9c,,0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C,0x3506424F91fD33084466F402d5D97f05F8e3b4AF,BNT-FF1C,CHZ-b4AF,18,18,2,BNT,CHZ,,,,,,,0
,,0,bancor_v3 BNT-FF1C/CROWN-E0fa 0.000,BNT-FF1C/CROWN-E0fa,bancor_v3,0,0,0xb2cABf797bc907B049e4cCB5b84d13be3a8CFC21,,0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C,0x444d6088B0F625f8C20192623B3C43001135E0fa,BNT-FF1C,CROWN-E0fa,18,18,2,BNT,CROWN,,,,,,,0
,,0,bancor_v3 BNT-FF1C/ENJ-3B9c 0.000,BNT-FF1C/ENJ-3B9c,bancor_v3,0,0,0xa1faa113cbE53436Df28FF0aEe54275c13B40975,,0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C,0xF629cBd94d3791C9250152BD8dfBDF380E2a3B9c,BNT-FF1C,ENJ-3B9c,18,18,2,BNT,ENJ,,,,,,,0
,,0,bancor_v3 BNT-FF1C/ETH-EEeE 0.000,BNT-FF1C/ETH-EEeE,bancor_v3,0,0,0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9,,0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C,0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE,BNT-FF1C,ETH-EEeE,18,18,2,BNT,ETH,,,,,,,0
,,0,bancor_v3 BNT-FF1C/ICHI-A881 0.000,BNT-FF1C/ICHI-A881,bancor_v3,0,0,0x6c6EE5e31d828De241282B9606C8e98Ea48526E2,,0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C,0x903bEF1736CDdf2A537176cf3C64579C3867A881,BNT-FF1C,ICHI-A881,18,9,2,BNT,ICHI,,,,,,,0
,,0,bancor_v3 BNT-FF1C/LINK-86CA 0.000,BNT-FF1C/LINK-86CA,bancor_v3,0,0,0xc944E90C64B2c07662A292be6244BDf05Cda44a7,,0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C,0x514910771AF9Ca656af840dff83E8264EcF986CA,BNT-FF1C,LINK-86CA,18,18,2,BNT,LINK,,,,,,,0
,,0,bancor_v3 BNT-FF1C/MANA-C942 0.000,BNT-FF1C/MANA-C942,bancor_v3,0,0,0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0,,0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C,0x0F5D2fB29fb7d3CFeE444a200298f468908cC942,BNT-FF1C,MANA-C942,18,18,2,BNT,MANA,,,,,,,0
,,0,bancor_v3 BNT-FF1C/MATIC-eBB0 0.000,BNT-FF1C/MATIC-eBB0,bancor_v3,0,0,0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2,,0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C,0x7D1AfA7B718fb893dB30A3aBc0Cfc608AaCfeBB0,BNT-FF1C,MATIC-eBB0,18,18,2,BNT,MATIC,,,,,,,0
,,0,bancor_v3 BNT-FF1C/MKR-79A2 0.000,BNT-FF1C/MKR-79A2,bancor_v3,0,0,0x967da4048cD07aB37855c090aAF366e4ce1b9F48,,0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C,0x9f8F72aA9304c8B593d555F12eF6589cC3A579A2,BNT-FF1C,MKR-79A2,18,18,2,BNT,MKR,,,,,,,0
,,0,bancor_v3 BNT-FF1C/MONA-412A 0.000,BNT-FF1C/MONA-412A,bancor_v3,0,0,0x6710c63432A2De02954fc0f851db07146a6c0312,,0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C,0x275f5Ad03be0Fa221B4C6649B8AeE09a42D9412A,BNT-FF1C,MONA-412A,18,18,2,BNT,MONA,,,,,,,0
,,0,bancor_v3 BNT-FF1C/QNT-4675 0.000,BNT-FF1C/QNT-4675,bancor_v3,0,0,0xD33526068D116cE69F19A9ee46F0bd304F21A51f,,0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C,0x4a220E6096B25EADb88358cb44068A3248254675,BNT-FF1C,QNT-4675,18,18,2,BNT,QNT,,,,,,,0
,,0,bancor_v3 BNT-FF1C/REQ-938a 0.000,BNT-FF1C/REQ-938a,bancor_v3,0,0,0x04Fa0d235C4abf4BcF4787aF4CF447DE572eF828,,0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C,0x8f8221aFbB33998d8584A2B05749bA73c37a938a,BNT-FF1C,REQ-938a,18,18,2,BNT,REQ,,,,,,,0
,,0,bancor_v3 BNT-FF1C/RLC-7375 0.000,BNT-FF1C/RLC-7375,bancor_v3,0,0,0x8f8221aFbB33998d8584A2B05749bA73c37a938a,,0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C,0x607F4C5BB672230e8672085532f7e901544a7375,BNT-FF1C,RLC-7375,18,9,2,BNT,RLC,,,,,,,0
,,0,bancor_v3 BNT-FF1C/RPL-A51f 0.000,BNT-FF1C/RPL-A51f,bancor_v3,0,0,0xC011a73ee8576Fb46F5E1c5751cA3B9Fe0af2a6F,,0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C,0xD33526068D116cE69F19A9ee46F0bd304F21A51f,BNT-FF1C,RPL-A51f,18,18,2,BNT,RPL,,,,,,,0
,,0,bancor_v3 BNT-FF1C/UNI-F984 0.000,BNT-FF1C/UNI-F984,bancor_v3,0,0,0xD13c7342e1ef687C5ad21b27c2b65D772cAb5C8c,,0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C,0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984,BNT-FF1C,UNI-F984,18,18,2,BNT,UNI,,,,,,,0
,,0,bancor_v3 BNT-FF1C/UOS-5C8c 0.000,BNT-FF1C/UOS-5C8c,bancor_v3,0,0,0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48,,0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C,0xD13c7342e1ef687C5ad21b27c2b65D772cAb5C8c,BNT-FF1C,UOS-5C8c,18,4,2,BNT,UOS,,,,,,,0
,,0,bancor_v3 BNT-FF1C/USDC-eB48 0.000,BNT-FF1C/USDC-eB48,bancor_v3,0,0,0xdAC17F958D2ee523a2206206994597C13D831ec7,,0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C,0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48,BNT-FF1C,USDC-eB48,18,6,2,BNT,USDC,,,,,,,0
,,0,bancor_v3 BNT-FF1C/USDT-1ec7 0.000,BNT-FF1C/USDT-1ec7,bancor_v3,0,0,0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599,,0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C,0xdAC17F958D2ee523a2206206994597C13D831ec7,BNT-FF1C,USDT-1ec7,18,6,2,BNT,USDT,,,,,,,0
,,0,bancor_v3 BNT-FF1C/vBNT-7f94 0.000,BNT-FF1C/vBNT-7f94,bancor_v3,0,0,0xA36FDBBAE3c9d55a1d67EE5821d53B50B63A1aB9,,0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C,0x48Fb253446873234F2fEBbF9BdeAA72d9d387f94,BNT-FF1C,vBNT-7f94,18,18,2,BNT,vBNT,,,,,,,0
,,0,bancor_v3 BNT-FF1C/WBTC-C599 0.000,BNT-FF1C/WBTC-C599,bancor_v3,0,0,0x0bc529c00C6401aEF6D220BE8C6Ea1667F6Ad93e,,0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C,0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599,BNT-FF1C,WBTC-C599,18,8,2,BNT,WBTC,,,,,,,0
,,0,bancor_v3 BNT-FF1C/wNXM-2bDE 0.000,BNT-FF1C/wNXM-2bDE,bancor_v3,0,0,0xFca59Cd816aB1eaD66534D82bc21E7515cE441CF,,0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C,0x0d438F3b5175Bebc262bF23753C1E53d03432bDE,BNT-FF1C,wNXM-2bDE,18,18,2,BNT,wNXM,,,,,,,0
,,0,bancor_v3 BNT-FF1C/WOO-5D4B 0.000,BNT-FF1C/WOO-5D4B,bancor_v3,0,0,0x0d438F3b5175Bebc262bF23753C1E53d03432bDE,,0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C,0x4691937a7508860F876c9c0a2a617E7d9E945D4B,BNT-FF1C,WOO-5D4B,18,18,2,BNT,WOO,,,,,,,0
,,0,bancor_v3 BNT-FF1C/wstETH-2Ca0 0.000,BNT-FF1C/wstETH-2Ca0,bancor_v3,0,0,0x4691937a7508860F876c9c0a2a617E7d9E945D4B,,0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C,0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0,BNT-FF1C,wstETH-2Ca0,18,18,2,BNT,wstETH,,,,,,,0
,,0,bancor_v3 BNT-FF1C/ZCN-3B78 0.000,BNT-FF1C/ZCN-3B78,bancor_v3,0,0,0x1559FA1b8F28238FD5D76D9f434ad86FD20D1559,,0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C,0xb9EF770B6A5e12E45983C5D80545258aA38F3B78,BNT-FF1C,ZCN-3B78,18,10,2,BNT,ZCN,,,,,,,0
,,0,uniswap_v2 PEPECOLA-A141/WETH-6Cc2 0.003, PEPECOLA-A141/WETH-6Cc2,uniswap_v2,3000,0.003,0x3BfbFA4a35258D29F77d791a6D48B321f17CECE1,,0x55fB228730ED971269EBF284C7500d5fF572A141,0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2, PEPECOLA-A141,WETH-6Cc2,9,18,, PEPECOLA,WETH,,,,,,,60,uniswap_v2
,,0,uniswap_v2 :ZKT:-3966/WETH-6Cc2 0.003,:ZKT:-3966/WETH-6Cc2,uniswap_v2,3000,0.003,0x8AeB846614f63342fdf2dB8865c930B5257F21f0,,0x76fcA1adb104770B38581B64d55e67fA5A0f3966,0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2,:ZKT:-3966,WETH-6Cc2,9,18,3,:ZKT:,WETH,,,,,,,60,uniswap_v2
Expand Down
2 changes: 1 addition & 1 deletion fastlane_bot/helpers/routehandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ def _get_flashloan_platform_id(self, tkn: str) -> int:
return 7

# Using Bancor V3 to flashloan BNT, ETH, WBTC, LINK, USDC, USDT
if tkn in [self.ConfigObj.BNT_ADDRESS, self.ConfigObj.ETH_ADDRESS, self.ConfigObj.WBTC_ADDRESS, self.ConfigObj.LINK_ADDRESS, self.ConfigObj.USDC_ADDRESS, self.ConfigObj.USDT_ADDRESS, self.ConfigObj.BNT_KEY, self.ConfigObj.ETH_KEY, self.ConfigObj.WBTC_KEY, self.ConfigObj.USDC_KEY, self.ConfigObj.LINK_KEY, self.ConfigObj.USDT_KEY]:
if tkn in [self.ConfigObj.BNT_ADDRESS, self.ConfigObj.ETH_ADDRESS, self.ConfigObj.WBTC_ADDRESS, self.ConfigObj.LINK_ADDRESS, self.ConfigObj.BNT_KEY, self.ConfigObj.ETH_KEY, self.ConfigObj.WBTC_KEY, self.ConfigObj.LINK_KEY]:
return 2
else:
return 7
Expand Down
85 changes: 42 additions & 43 deletions resources/NBTest/NBTest_051_BalancerFlashloans.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
"C:\\Users\\Kveen\\AppData\\Local\\Temp\\ipykernel_32040\\3597301263.py:29: MatplotlibDeprecationWarning: The seaborn styles shipped by Matplotlib are deprecated since 3.6, as they no longer correspond to the styles shipped by seaborn. However, they will remain available as 'seaborn-v0_8-<style>'. Alternatively, directly use the seaborn API instead.\n",
"C:\\Users\\Kveen\\AppData\\Local\\Temp\\ipykernel_41036\\3597301263.py:29: MatplotlibDeprecationWarning: The seaborn styles shipped by Matplotlib are deprecated since 3.6, as they no longer correspond to the styles shipped by seaborn. However, they will remain available as 'seaborn-v0_8-<style>'. Alternatively, directly use the seaborn API instead.\n",
" plt.style.use('seaborn-dark')\n"
]
}
Expand Down Expand Up @@ -84,45 +84,45 @@
"name": "stderr",
"output_type": "stream",
"text": [
"2023-10-31 09:38:23,013 [fastlane:INFO] - \n",
"2023-10-31 09:38:23,014 [fastlane:INFO] - **********************************************\n",
"2023-10-31 09:38:23,014 [fastlane:INFO] - The logging path is set to: logs/20231031-093823\\bot.log\n",
"2023-10-31 09:38:23,014 [fastlane:INFO] - **********************************************\n",
"2023-10-31 09:38:23,015 [fastlane:INFO] - \n",
"2023-10-31 09:38:24,872 [fastlane:INFO] - Retrieved 201 carbon pairs from contract\n",
"2023-10-31 09:38:26,411 [fastlane:INFO] - Time taken to add initial pools: 0.09418487548828125\n",
"2023-10-31 09:38:26,415 [fastlane:INFO] - Initializing the bot...\n",
"2023-10-31 09:38:26,599 [fastlane:INFO] - Removed 3242 unmapped uniswap_v2/sushi pools. 1897 uniswap_v2/sushi pools remaining\n",
"2023-10-31 09:38:26,609 [fastlane:INFO] - Unmapped uniswap_v2/sushi pools:\n",
"2023-10-31 09:38:26,787 [fastlane:INFO] - uniswap_v2: 3242\n",
"2023-10-31 09:38:26,788 [fastlane:INFO] - sushiswap_v2: 0\n",
"2023-10-31 09:38:26,790 [fastlane:INFO] - uniswap_v3: 636\n",
"2023-10-31 09:38:26,792 [fastlane:INFO] - sushiswap_v2: 78\n",
"2023-10-31 09:38:26,793 [fastlane:INFO] - uniswap_v2: 0\n",
"2023-10-31 09:38:26,794 [fastlane:INFO] - bancor_v2: 0\n",
"2023-10-31 09:38:26,794 [fastlane:INFO] - bancor_v3: 34\n",
"2023-10-31 09:38:26,795 [fastlane:INFO] - bancor_pol: 0\n",
"2023-10-31 09:38:26,795 [fastlane:INFO] - carbon_v1: 144\n",
"2023-10-31 09:38:26,796 [fastlane:INFO] - pancakeswap_v2: 0\n",
"2023-10-31 09:38:26,797 [fastlane:INFO] - pancakeswap_v3: 0\n",
"2023-10-31 09:38:26,797 [fastlane:INFO] - balancer: 0\n",
"2023-10-31 09:38:26,822 [fastlane:INFO] - uniswap_v3_zero_liquidity_pools: 858\n",
"2023-10-31 09:38:26,824 [fastlane:INFO] - sushiswap_v2_zero_liquidity_pools: 34\n",
"2023-10-31 09:38:26,824 [fastlane:INFO] - uniswap_v2_zero_liquidity_pools: 0\n",
"2023-10-31 09:38:26,824 [fastlane:INFO] - bancor_v2_zero_liquidity_pools: 0\n",
"2023-10-31 09:38:26,825 [fastlane:INFO] - bancor_v3_zero_liquidity_pools: 37\n",
"2023-10-31 09:38:26,825 [fastlane:INFO] - bancor_pol_zero_liquidity_pools: 0\n",
"2023-10-31 09:38:26,826 [fastlane:INFO] - carbon_v1_zero_liquidity_pools: 76\n",
"2023-10-31 09:38:26,827 [fastlane:INFO] - pancakeswap_v2_zero_liquidity_pools: 0\n",
"2023-10-31 09:38:26,827 [fastlane:INFO] - pancakeswap_v3_zero_liquidity_pools: 0\n",
"2023-10-31 09:38:26,828 [fastlane:INFO] - balancer_zero_liquidity_pools: 0\n",
"2023-10-31 09:38:26,829 [fastlane:INFO] - Removed 0 unsupported exchanges. 892 pools remaining\n",
"2023-10-31 09:38:26,829 [fastlane:INFO] - Pools remaining per exchange:\n",
"2023-10-31 09:38:26,830 [fastlane:INFO] - sushiswap_v2: 78\n",
"2023-10-31 09:38:26,831 [fastlane:INFO] - uniswap_v2: 0\n",
"2023-10-31 09:38:26,831 [fastlane:INFO] - uniswap_v3: 636\n",
"2023-10-31 09:38:26,831 [fastlane:INFO] - bancor_v3: 34\n",
"2023-10-31 09:38:26,832 [fastlane:INFO] - carbon_v1: 144\n"
"2023-11-13 11:40:29,179 [fastlane:INFO] - \n",
"2023-11-13 11:40:29,180 [fastlane:INFO] - **********************************************\n",
"2023-11-13 11:40:29,181 [fastlane:INFO] - The logging path is set to: logs/20231113-114029\\bot.log\n",
"2023-11-13 11:40:29,182 [fastlane:INFO] - **********************************************\n",
"2023-11-13 11:40:29,182 [fastlane:INFO] - \n",
"2023-11-13 11:40:31,390 [fastlane:INFO] - Retrieved 204 carbon pairs from contract\n",
"2023-11-13 11:40:32,999 [fastlane:INFO] - Time taken to add initial pools: 0.09105610847473145\n",
"2023-11-13 11:40:33,002 [fastlane:INFO] - Initializing the bot...\n",
"2023-11-13 11:40:33,217 [fastlane:INFO] - Removed 3242 unmapped uniswap_v2/sushi pools. 1897 uniswap_v2/sushi pools remaining\n",
"2023-11-13 11:40:33,218 [fastlane:INFO] - Unmapped uniswap_v2/sushi pools:\n",
"2023-11-13 11:40:33,373 [fastlane:INFO] - uniswap_v2: 3242\n",
"2023-11-13 11:40:33,374 [fastlane:INFO] - sushiswap_v2: 0\n",
"2023-11-13 11:40:33,376 [fastlane:INFO] - uniswap_v3: 636\n",
"2023-11-13 11:40:33,377 [fastlane:INFO] - sushiswap_v2: 78\n",
"2023-11-13 11:40:33,377 [fastlane:INFO] - uniswap_v2: 0\n",
"2023-11-13 11:40:33,377 [fastlane:INFO] - bancor_v2: 0\n",
"2023-11-13 11:40:33,378 [fastlane:INFO] - bancor_v3: 34\n",
"2023-11-13 11:40:33,379 [fastlane:INFO] - bancor_pol: 0\n",
"2023-11-13 11:40:33,380 [fastlane:INFO] - carbon_v1: 144\n",
"2023-11-13 11:40:33,380 [fastlane:INFO] - pancakeswap_v2: 0\n",
"2023-11-13 11:40:33,382 [fastlane:INFO] - pancakeswap_v3: 0\n",
"2023-11-13 11:40:33,382 [fastlane:INFO] - balancer: 0\n",
"2023-11-13 11:40:33,405 [fastlane:INFO] - uniswap_v3_zero_liquidity_pools: 858\n",
"2023-11-13 11:40:33,405 [fastlane:INFO] - sushiswap_v2_zero_liquidity_pools: 34\n",
"2023-11-13 11:40:33,405 [fastlane:INFO] - uniswap_v2_zero_liquidity_pools: 0\n",
"2023-11-13 11:40:33,406 [fastlane:INFO] - bancor_v2_zero_liquidity_pools: 0\n",
"2023-11-13 11:40:33,406 [fastlane:INFO] - bancor_v3_zero_liquidity_pools: 37\n",
"2023-11-13 11:40:33,406 [fastlane:INFO] - bancor_pol_zero_liquidity_pools: 0\n",
"2023-11-13 11:40:33,407 [fastlane:INFO] - carbon_v1_zero_liquidity_pools: 76\n",
"2023-11-13 11:40:33,407 [fastlane:INFO] - pancakeswap_v2_zero_liquidity_pools: 0\n",
"2023-11-13 11:40:33,408 [fastlane:INFO] - pancakeswap_v3_zero_liquidity_pools: 0\n",
"2023-11-13 11:40:33,408 [fastlane:INFO] - balancer_zero_liquidity_pools: 0\n",
"2023-11-13 11:40:33,409 [fastlane:INFO] - Removed 0 unsupported exchanges. 892 pools remaining\n",
"2023-11-13 11:40:33,409 [fastlane:INFO] - Pools remaining per exchange:\n",
"2023-11-13 11:40:33,410 [fastlane:INFO] - bancor_v3: 34\n",
"2023-11-13 11:40:33,410 [fastlane:INFO] - uniswap_v2: 0\n",
"2023-11-13 11:40:33,411 [fastlane:INFO] - carbon_v1: 144\n",
"2023-11-13 11:40:33,411 [fastlane:INFO] - uniswap_v3: 636\n",
"2023-11-13 11:40:33,412 [fastlane:INFO] - sushiswap_v2: 78\n"
]
}
],
Expand Down Expand Up @@ -446,14 +446,13 @@
"\n",
"\n",
"flash_struct3 = route_handler.generate_flashloan_struct(instructions3)\n",
"\n",
"assert len(flashloan_tokens2.keys()) == 2\n",
"assert flashloan_tokens2['USDC-eB48'][\"flash_amt\"] == 5000\n",
"assert flashloan_tokens2['USDT'][\"flash_amt\"] == 2000\n",
"assert len(flash_struct3) == 4, f\"[Advanced Routing NBTest044] wrong number of flash tokens length, expected 4, got {len(flash_struct3)}\"\n",
"assert len(flash_struct3) == 3, f\"[Advanced Routing NBTest044] wrong number of flash tokens length, expected 3, got {len(flash_struct3)}\"\n",
"assert flash_struct3[0]['platformId'] == 2, f\"[Balancer Flashloan Support [NBTest049]] wrong platformId, expected 2, got {flash_struct3[0]['platformId']}\"\n",
"assert flash_struct3[1]['platformId'] == 2, f\"[Balancer Flashloan Support [NBTest049]] wrong platformId, expected 2, got {flash_struct3[1]['platformId']}\"\n",
"assert flash_struct3[3]['platformId'] == 7, f\"[Balancer Flashloan Support [NBTest049]] wrong platformId, expected 7, got {flash_struct3[2]['platformId']}\"\n",
"assert flash_struct3[2]['platformId'] == 7, f\"[Balancer Flashloan Support [NBTest049]] wrong platformId, expected 7, got {flash_struct3[2]['platformId']}\"\n",
"\n",
"for flashloan in flash_struct3:\n",
" assert len(flashloan['sourceTokens']) == len(flashloan['sourceAmounts']), f\"[Balancer Flashloan Support [NBTest049]] number of source tokens does not match source amounts, tkns: {len(flashloan['sourceTokens'])} amts: {len(flashloan['sourceAmounts'])}\""
Expand Down
5 changes: 2 additions & 3 deletions resources/NBTest/NBTest_051_BalancerFlashloans.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,14 +355,13 @@ def init_bot(mgr: Manager) -> CarbonBot:


flash_struct3 = route_handler.generate_flashloan_struct(instructions3)

assert len(flashloan_tokens2.keys()) == 2
assert flashloan_tokens2['USDC-eB48']["flash_amt"] == 5000
assert flashloan_tokens2['USDT']["flash_amt"] == 2000
assert len(flash_struct3) == 4, f"[Advanced Routing NBTest044] wrong number of flash tokens length, expected 4, got {len(flash_struct3)}"
assert len(flash_struct3) == 3, f"[Advanced Routing NBTest044] wrong number of flash tokens length, expected 3, got {len(flash_struct3)}"
assert flash_struct3[0]['platformId'] == 2, f"[Balancer Flashloan Support [NBTest049]] wrong platformId, expected 2, got {flash_struct3[0]['platformId']}"
assert flash_struct3[1]['platformId'] == 2, f"[Balancer Flashloan Support [NBTest049]] wrong platformId, expected 2, got {flash_struct3[1]['platformId']}"
assert flash_struct3[3]['platformId'] == 7, f"[Balancer Flashloan Support [NBTest049]] wrong platformId, expected 7, got {flash_struct3[2]['platformId']}"
assert flash_struct3[2]['platformId'] == 7, f"[Balancer Flashloan Support [NBTest049]] wrong platformId, expected 7, got {flash_struct3[2]['platformId']}"

for flashloan in flash_struct3:
assert len(flashloan['sourceTokens']) == len(flashloan['sourceAmounts']), f"[Balancer Flashloan Support [NBTest049]] number of source tokens does not match source amounts, tkns: {len(flashloan['sourceTokens'])} amts: {len(flashloan['sourceAmounts'])}"
Expand Down

0 comments on commit b2ab1e9

Please sign in to comment.