Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error when not enough liquidity #9

Open
tsarbuig opened this issue Dec 17, 2021 · 2 comments
Open

error when not enough liquidity #9

tsarbuig opened this issue Dec 17, 2021 · 2 comments

Comments

@tsarbuig
Copy link

tsarbuig commented Dec 17, 2021

on ETH Rinkeby

[
  {

    "ENABLED": "true",

    "SYMBOL": "UNI",
    "ADDRESS": "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984", 
    "BUYAMOUNTINBASE": "0.0005",
    "BUYPRICEINBASE":  "10",
    "SELLPRICEINBASE": "0.5",
    "STOPLOSSPRICEINBASE": "0",

    "SLIPPAGE": "49",

    "MAXTOKENS": "20",
    "MOONBAG": "0",

    "RUGDOC_CHECK": "false",
    "BUYAFTER_XXX_SECONDS": "0",    
    "MAX_FAILED_TRANSACTIONS_IN_A_ROW": "2",    
    
    "LIQUIDITYCHECK": "false",
    "LIQUIDITYAMOUNT": "1.5",
    "LIQUIDITYINNATIVETOKEN": "true",
    "USECUSTOMBASEPAIR": "true",
    "BASESYMBOL": "WETH",
    "BASEADDRESS": "0xc778417e063141139fce010982780140aa0cd5ab",

    "SELLAMOUNTINTOKENS": "0.0005",
    "HASFEES": "false",
    "GAS": "6",
    "BOOSTPERCENT": "30",
    "GASLIMIT": "1000000",
    "GASPRIORITY_FOR_ETH_ONLY": "2.5"

  }
]

ERROR: 2021-12-17 09:58:05,710 execution reverted: UniswapV2Library: INSUFFICIENT_LIQUIDITY
Traceback (most recent call last):
  File "/Users/ceciliavaury/Downloads/LimitSwap-last/LimitSwapyak.py", line 2369, in run
    quote = check_price(inToken, outToken, token['SYMBOL'], token['BASESYMBOL'],
  File "/Users/ceciliavaury/Downloads/LimitSwap-last/LimitSwapyak.py", line 1288, in check_price
    price_check = routerContract.functions.getAmountsOut(1 * DECIMALS, [inToken, weth, outToken]).call()[-1]
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/web3/contract.py", line 959, in call
    return call_contract_function(
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/web3/contract.py", line 1503, in call_contract_function
    return_data = web3.eth.call(
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/web3/module.py", line 57, in caller
    result = w3.manager.request_blocking(method_str,
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/web3/manager.py", line 187, in request_blocking
    return self.formatted_response(response,
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/web3/manager.py", line 167, in formatted_response
    apply_error_formatters(error_formatters, response)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/web3/manager.py", line 67, in apply_error_formatters
    formatted_resp = pipe(response, error_formatters)
  File "cytoolz/functoolz.pyx", line 667, in cytoolz.functoolz.pipe
  File "cytoolz/functoolz.pyx", line 642, in cytoolz.functoolz.c_pipe
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/web3/_utils/method_formatters.py", line 569, in raise_solidity_error_on_revert

@yaqub0r
Copy link
Owner

yaqub0r commented Dec 18, 2021

I'm not sure how you got this error. Please check it again on the latest version.

@tsarbuig2
Copy link

use this settings.json :

"USECUSTOMNODE": "true",
"CUSTOMNODE": "https://rinkeby-light.eth.linkpool.io",
"EXCHANGE": "uniswap",
"EXCHANGEVERSION": "2",

and the tokens.json above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants