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

chore: bump sor to 4.7.0 - feat: SOR level implementation to support 1) expanding mixed quoter v1 to L2s 2) support migrate mixed quoter v1 to mixed quoter v2 across chains #868

Merged
merged 6 commits into from
Oct 15, 2024

Conversation

jsy1218
Copy link
Member

@jsy1218 jsy1218 commented Oct 11, 2024

this PR compliments Uniswap/smart-order-router#746, and will be able to achieve:

  1. routing-api to shadow sample mixed routing against mixed quoter v1 across L2s. There's no accuracy to compare, just make sure routing-api shadow mixed routing success rate is high - existing metrics in routing-api ON_CHAIN_QUOTE_PROVIDER_${this.EXACT_IN_METRIC}TRAFFIC_TARGET_FAILED_CHAIN_ID${this.chainId}

On L2, only Base has the MixedRouteQuoterV1 deployed (see context). I thought its due to the lack of FOT and exact out support. But its actually due to SOR only enables mixed routing on L1 https://github.com/Uniswap/smart-order-router/blob/66927c4e4f7e75138df48afab1c33a6c6d8d8f15/src/routers/alpha-router/alpha-router.ts#L2081.

Therefore in this PR, I will only enable shadow sampling against Base mixed routing on L2, but keep 100% mixed routing traffic on L1.

I also enhanced existing unit test coverages.

tests all passed on my local https://app.warp.dev/block/afa5Lrn5JUeIIscuDGm14B

Tested on my personal AWS account:

  • L1 mainnet - I can see only V3 and Mixed, all hitting target quoter address. Because V3 is migrated from revert quoter to view-only quoter on L1, and MixedRouteQuoterV1 is live on L1. V4 is not deployed to L1.
Screenshot 2024-10-14 at 3 25 42 PM
  • Optimism - I can see only V3 hitting targer quoter address. V4 and MixedRouteQuoterV1 is not deployed to Optimism.
Screenshot 2024-10-14 at 3 31 37 PM
  • Arb - I can see only V3 hitting targer quoter address. V4 and MixedRouteQuoterV1 is not deployed to Arb.
Screenshot 2024-10-14 at 3 33 32 PM
  • Polygon - I can see only V3 hitting targer quoter address. V4 and MixedRouteQuoterV1 is not deployed to Polygon.
Screenshot 2024-10-14 at 3 34 31 PM
  • Celo - I can see only V3 hitting targer quoter address. V4 and MixedRouteQuoterV1 is not deployed to Celo.
Screenshot 2024-10-14 at 3 35 14 PM
  • BNB - I can see only V3 hitting targer quoter address. V4 and MixedRouteQuoterV1 is not deployed to BNB.
Screenshot 2024-10-14 at 3 36 11 PM
  • AVAX - I can see only V3 hitting targer quoter address. V4 and MixedRouteQuoterV1 is not deployed to AVAX.
Screenshot 2024-10-14 at 3 37 28 PM
  • BASE - I can see only V3 hitting targer quoter address. V4 not deployed to BASE. MixedRouteQuoterV1 deployed, but sampling rate too low.
Screenshot 2024-10-14 at 3 38 21 PM

Copy link

socket-security bot commented Oct 11, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@uniswap/[email protected] Transitive: environment, eval, filesystem, network, shell +100 114 MB

🚮 Removed packages: npm/@uniswap/[email protected]

View full report↗︎

@jsy1218 jsy1218 marked this pull request as ready for review October 11, 2024 04:49
package.json Outdated Show resolved Hide resolved
Copy link
Contributor

@xrsv xrsv left a comment

Choose a reason for hiding this comment

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

looks good - left a couple of comments

@jsy1218 jsy1218 force-pushed the siyujiang/mixed-quoter-expanding-to-more-chains branch from aa9cc73 to 14953fd Compare October 15, 2024 20:23
@graphite-app graphite-app bot requested a review from xrsv October 15, 2024 20:25
@graphite-app graphite-app bot requested review from a team and cgkol October 15, 2024 20:25
Copy link

graphite-app bot commented Oct 15, 2024

Graphite Automations

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

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

@jsy1218 jsy1218 merged commit 87ca978 into main Oct 15, 2024
8 checks passed
@jsy1218 jsy1218 deleted the siyujiang/mixed-quoter-expanding-to-more-chains branch October 15, 2024 20:57
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.

2 participants