: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):
:white_check_mark: (uniswap) multi-hop.
:white_check_mark: WETH un/wrapping.
:white_check_mark: :sushi:swap
:x: accurate buys
:x: affiliate fees
:x: mtxs
:x: events
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:
[ ] Prefix PR title with [WIP] if necessary.
[ ] Add tests to cover changes as needed.
[ ] Update documentation as needed.
[ ] Add new entries to the relevant CHANGELOG.jsons.
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 MVPsellToUniswap()
function with the following features (as discussed):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 massiveexcludedSources
filter to target a few sources.Testing instructions
Types of changes
Checklist:
[WIP]
if necessary.