- Title: HIP-4 [DG] Gateway connectors for Curve and Sushi on Ethereum and Uniswap V3 on Polygon
- Category: Gateway
- Summary: Add gateway connectors for Curve and Sushi on Ethereum and Uniswap V3 on Polygon, add support for the Polygon blockchain
- Linked HGP: HGP-8
- Description: See text below.
- Github Handle: https://github.com/james-hummingbot
- 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