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

Add UniswapV3 liquidity to driver #388

Merged
merged 17 commits into from
Aug 5, 2022
Merged

Add UniswapV3 liquidity to driver #388

merged 17 commits into from
Aug 5, 2022

Conversation

sunce86
Copy link
Contributor

@sunce86 sunce86 commented Jul 26, 2022

This PR integrates UniswapV3 liquidity pool fetcher with the driver and sends the native liquidity to solvers.

I've marked the code that is already reviewed and copy-pasted from https://github.com/cowprotocol/cow-native-liquidity.

@codecov-commenter
Copy link

codecov-commenter commented Jul 27, 2022

Codecov Report

Merging #388 (93205e2) into main (bc85274) will decrease coverage by 0.30%.
The diff coverage is 50.30%.

❗ Current head 93205e2 differs from pull request most recent head 46983c5. Consider uploading reports for the commit 46983c5 to get more accurate results

@@            Coverage Diff             @@
##             main     #388      +/-   ##
==========================================
- Coverage   64.19%   63.89%   -0.31%     
==========================================
  Files         223      227       +4     
  Lines       42221    43184     +963     
==========================================
+ Hits        27105    27593     +488     
- Misses      15116    15591     +475     

@@ -4,9 +4,11 @@ use anyhow::{bail, Result};
use lazy_static::lazy_static;
use reqwest::{Client, IntoUrl, Url};
use serde::{de::DeserializeOwned, Deserialize, Serialize};
use serde_json::{Map, Value};
use serde_json::{json, Map, Value};
Copy link
Contributor Author

@sunce86 sunce86 Aug 1, 2022

Choose a reason for hiding this comment

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

Changes from this file are already reviewed here: cowprotocol/cow-native-liquidity@d2c1a6c

@@ -0,0 +1,449 @@
//! Module containing The Graph API client used for retrieving Uniswap V3
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -0,0 +1,390 @@
use super::graph_api::{PoolData, Token, UniV3SubgraphClient};
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sunce86 sunce86 marked this pull request as ready for review August 1, 2022 18:11
@sunce86 sunce86 requested a review from a team as a code owner August 1, 2022 18:11
crates/solver/src/interactions/uniswap_v3.rs Show resolved Hide resolved
crates/solver/src/main.rs Outdated Show resolved Hide resolved
crates/solver/src/solver/http_solver.rs Show resolved Hide resolved
crates/solver/src/liquidity/uniswap_v3.rs Outdated Show resolved Hide resolved
crates/contracts/build.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@nlordell nlordell 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 to me. My only comment is I think we should be able to send UniV3 liquidity to Quasimodo for price estimates as well.

crates/solver/src/liquidity/uniswap_v3.rs Outdated Show resolved Hide resolved
@sunce86 sunce86 merged commit c4f5c75 into main Aug 5, 2022
@sunce86 sunce86 deleted the use-uniswapv3-liquidity branch August 5, 2022 12:00
@github-actions github-actions bot locked and limited conversation to collaborators Aug 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants