Author: James 0xda6
Original Post Date: 29 Mar 2022
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
- 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.
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.
- Implement functionality
- Provide unit tests
- Manually run on the testnet and mainnet
- Try each exchange with the Arbitrage strategy in Hummingbot
- Request a PR
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.
I will make at least Four PRs on the hummingbot repo:
- 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.
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