Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: manually include eth/wsteth with artificially high TVL #794

Closed
wants to merge 4 commits into from

Conversation

jsy1218
Copy link
Member

@jsy1218 jsy1218 commented Jul 29, 2024

Even though ETH/wstETH is not a high TVL pool, because of both assets close pegging, their concentrated liquidity is high within the narrow price range. We don't want to aggressively modify the pools discovery heuristics in SOR (e.g. https://app.graphite.dev/github/pr/Uniswap/smart-order-router/641/feat-mixed-Add-Cross-Liquidity-Pools-to-Mixed-Candidate-Pools?utm_source=gt-slack-notif#), so the next best thing to do is to artificually inflate the ETH/wstETH TVL during routing cron job.

I've tested locally, and now can see that 1 ETH -> DOG routes through wstETH: https://app.warp.dev/block/GnbbpKGa0e3jK2upANEQvm

Copy link
Member Author

jsy1218 commented Jul 29, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @jsy1218 and the rest of your teammates on Graphite Graphite

@jsy1218 jsy1218 marked this pull request as ready for review July 29, 2024 14:12
@graphite-app graphite-app bot requested review from xrsv, mikeki, a team, uni-guillaume and cgkol July 29, 2024 14:15
Copy link

graphite-app bot commented Jul 29, 2024

Graphite Automations

"Request reviewers once CI passes on routing-api repo" took an action on this PR • (07/29/24)

6 reviewers were added and 1 assignee was added to this PR based on 's automation.

pools = (pools as Array<V3SubgraphPool>).filter((pool: V3SubgraphPool) => {
const shouldFilterOut =
// filter out AMPL-token pools from v3 subgraph, since they are not supported on v3
pool.token0.id.toLowerCase() === '0xd46ba6d942050d489dbd938a2c909a5d5039a161' ||
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems this filtering already happens in line 245?

id: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
},
tvlETH: 706196.651729130972764273,
tvlUSD: 140465485, // same as WETH/USDC 0.05%
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we make this bigger or equal to the max pool?
thinking is that as tvl grows, those values might not be enough - what do you think?

Comment on lines +236 to +237
tvlETH: 706196.651729130972764273,
tvlUSD: 140465485, // same as WETH/USDC 0.05%
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could have the downside that we might drop out other pools. We will select this pool more often now.

tvlUSD: 140465485, // same as WETH/USDC 0.05%
} as V3SubgraphPool,
]
manuallyIncludedPools.forEach((pool) => pools.push(pool))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe only for mainnet?

@jsy1218 jsy1218 closed this Jul 30, 2024
@jsy1218
Copy link
Member Author

jsy1218 commented Jul 30, 2024

we close this PR in favor of Uniswap/smart-order-router#641

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants