0xProject / 0x-monorepo

0x protocol monorepo - includes our smart contracts and many developer tools
Other
1.41k stars 466 forks source link

UniswapFeature #2703

Closed dorothy-zbornak closed 4 years ago

dorothy-zbornak commented 4 years ago

Description

:warning: DO NOT MERGE until feature is deployed and migrated

Based on @Recmo's lovely work #2688

Adds a feature called UniswapFeature with an MVP sellToUniswap() function with the following features (as discussed):

Simbot (gross) gas benchmarks: path fn gas
USDC->ETH uniswap 118816
USDC->ETH sellToUniswap() 116051
USDC->ETH sellToUniswap(sushi=true) 116319
ETH->USDC uniswap 130828
ETH->USDC sellToUniswap() 126046
ETH->USDC sellToUniswap(sushi=true) 126314
USDC->DAI uniswap 109628
USDC->DAI sellToUniswap() 108204
USDC->DAI sellToUniswap(sushi=true) NO_LIQUIDITY
USDC->ETH->DAI uniswap 163124
USDC->ETH->DAI sellToUniswap() 156715
USDC->ETH->DAI sellToUniswap(sushi=true) 169539 ???

includedSources

There is now an includedSources option to AS that will only use the sources passed in, so we don't have to enumerate a massive excludedSources filter to target a few sources.

Testing instructions

Types of changes

Checklist: