CoinAlpha / gateway-api

Apache License 2.0
47 stars 25 forks source link

Feat / add dynamic routes to uniswap #33

Closed vic-en closed 3 years ago

gyozajiro commented 3 years ago

I'm getting undefined 'maximumAmountIn' or 'maximumAmountOut' HTTP 500 error on the HB client. On the Gateway the related error call revert exception shows, and after the bot stop, the error continues to repeat. It appears the loop/operation did not cancel.

My bot config is:

strategy: amm_arb
connector_1: uniswap
market_1: BAT-DAI
connector_2: binance
market_2: BAT-USDT
order_amount: 10.0
min_profitability: 100.0
market_1_slippage_buffer: 0.05
market_2_slippage_buffer: 0.0
concurrent_orders_submission: false
gyozajiro commented 3 years ago

image

image

Error after the bot has stop but the Gateway error continues.

image

vic-en commented 3 years ago

uni-err @sdgoh This error is from the uniswap gateway code which is trying to fetch price for a pair that doesn't have liquidity. This is inevitable since we have limited route tokens and we're trying to use all to determine a good route. One thing we can do is catch the error and discard it silently because liquidity can be added in any minute, we wouldn't want to stop scanning that pair subsequently

gyozajiro commented 3 years ago

@vic-en I agree with silent capture. Could you merge the feat/daily_log_and_time_offset into this branch and capture this as debug? logger.debug()