Skip to content

uniswap and uniswapLP

The Uniswap connector in Gateway is responsible for all on-chain operations (e.g. fetching prices and creating swap transactions).

It interfaces with the GatewayEVMAMM class in the Hummingbot client, which is responsible for interfacing with EVM-based AMMs.

In addition, the uniswapLP connector interfaces with the GatewayEVMAMMLP class in the Hummingbot client, which is responsible for interfacing with liquidity provision-related functions in EVM-based AMMs.

πŸ“ Connector folder

πŸ“ Config template

ℹ️ Exchange Info

Uniswap Website | CoinMarketCap | CoinGecko

πŸ•ΈοΈ Supported Chains and Networks

Ethereum

Polygon

πŸ‘· Developer

  • The uniswap connector was added by CoinAlpha in v1.4.0
  • The uniswapLP connector was added by CoinAlpha in v1.6.0

πŸ”‘ Setup

Swapping tokens

  1. Follow the instructions on Setting up Gateway to install the Gateway Docker container
  2. Run gateway connect uniswap and follow the prompts to add your wallet private key. Like all API and private keys in Hummingbot, this key is encrypted with your Hummingbot password.
  3. Afterwards, run create to create an AMM Arbitrage strategy between Uniswap and a different exchange.
  4. Run start to start the strategy!

Adding and removing concentrated liquidity ranges

  1. Follow the instructions on Setting up Gateway to install the Gateway Docker container
  2. Run gateway connect uniswapLP and follow the prompts to add your wallet private key. Like all API and private keys in Hummingbot, this key is encrypted with your Hummingbot password.
  3. Afterwards, run create to create a Uniswap-V3 LP strategy to create and dynamically adjust a Uniswap-V3 LP position factoring in market price and volatility.
  4. Run start to start the strategy!

No auto-wrapping

Gateway does not auto-wrap tokens by default, so users need to wrap native tokens into ERC-20 tokens before using them with Gateway. As of the v1.4.0 release, there is no error message that lets you know if the token can't be used when it's not wrapped and instead will just display "Markets are not ready" but we are working on adding more informative messages within the next few releases.

πŸ“˜ Additional Resources

See Ethereum for more information about the default configuration settings and how to change them.