HIP-4 [DG] Gateway connectors for Curve and Sushi on Ethereum and Uniswap V3 on Polygon (fixed thread and proposal)

Author: James 0xda6

Original Post Date: 29 Mar 2022

Snapshot Proposal Link

Edit: I’ve remade this discussion. There was a problem with the old one and I could not link the correct proposal.

Hello, I am James and I am the lead developer of gateway at CoinAlpha. I would like to add connectors to Gateaway for some of the largest DeFi exchanges (in my free time).

  • Title: HIP-4 [DG] Gateway connectors for Curve, Sushi and support the Polygon chain
  • Category: Gateway
  • Summary: Add gateway connectors for Curve, Sushi and Uniswap V3 (on polygon)
  • Linked HGP: HGP-8
  • Description: See text below.
  • Github Handle: james-hummingbot · GitHub
  • Ethereum Wallet: 0xda69fc3bE70623d487d095469c637D06392b07D0
  • Total HBOT requested: 1,000,000 HBOT
  • Estimated Dev Days: 40 development days spread over four months
  • HBOT Per Day: 25,000 HBOT

Description

Proposal

  • Add Curve on Ethereum to gateway.
  • Add Sushi on Ethereum to gateway.
  • Add the Polygon chain to gateway.
  • Add Uniswap V3 on Polygon to gateway.

Proposed Changes

Using Gateway-v2 Trading Interfaces as a reference, I propose to make the following changes to the gateway code base.

  • Add code to support Curve.
  • Add code to support Sushi.
  • Add code to support the Polygon code. There may be a set of network specific routes to support this.
  • Edit existing Uniswap v3 code to support Polygon.
  • Make any required changes to the Hummingbot client to support these changes to gateway.

Requirements for each change

  • Implement functionality
  • Provide unit tests
  • Manually run on the testnet and mainnet
  • Try each exchange with the Arbitrage strategy in Hummingbot
  • Request a PR

Challenges and Risks

It should be straightforward to integrate Curve and Sushi because they are AMMs, and there are already two AMMs supported in gateway. Also, both of these projects have official SDKs which should make it easier to integrate the Hummingbot code. It looks like there are Curve and Sushi contracts on Kovan. These are important for testing.

Polygon also has an SDK, but sometimes there are surprises when integrating a new blockchain that may require more work.

The Uniswap V3 SDK uses ethers.js. I am not sure of the level of compatibilty this has with Polygon. I will need to look into this further. This is a slight risk. If the SDK is not compatible with it, then work around will be required.

Code Delivery and Presentation

I will make at least Four PRs on the hummingbot repo:

  • Curve
  • Sushi
  • Polygon
  • Uniswap V3 on Polygon

Afterwards I will do a community call on Discord where I can answer any questions about the new code and gateway in general.

Conservative delivery estimate

I will begin working on these if the proposal is approved. I will dedicate my weekend time to working on this project. These are conservative estimates to avoid any surprise. If they are ready before the allotted time period, I will create the corresponding PR early.

  • Curve: 1 month
  • Sushi: 1 month
  • Polygon: 1.5 month
  • Uniswap V3 on Polygon: 1.5 month

Existing Resources

Last Post Date: 29 Mar 2022

Any news on Uniswap V3 on Polygon? Very hopefull to test it soon

We added Uniswap V3 support in the latest release 1.6.0 - Hummingbot Foundation but I don’t think its configured for Polygon yet. We should be able to add multi-chain support and/or documentation that shows users how to configure it for different networks soon.

Yes, I use it, but it has connector only for Etherium mainnet and test networks

Will it work with uniswapLP? Becouse when i see in proposal V3 on Polygon, I think about LP