feat/Interact directly with the pool in Uniswap connector #136
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before submitting this PR, please make sure:
A description of the changes proposed in the pull request:
Adds the ability to use Quoter rather than Smart Order Router to the Uniswap connector as an option.
To achieve this
uniswap.yml
config file is extended with the following:useRouter
(bool, default=true) - if True, estimation and execution functions use the Router; if false, use quote and trade functions of SDK.feeTier
(string, default='MEDIUM') - Matches one of the Uniswap fee tier strings. If useRouter is False, then the user has to specify feeTier to find the right pool.uniswapV3QuoterV2ContractAddress
(string) - a variable added to each network incontractAddresses
section. Stores the address of Uniswap Quoter V2. It can be found here https://docs.uniswap.org/contracts/v3/reference/deployments.Tests performed by the developer:
test-helpers/curl/curl.sh
. E.g.:/amm/trade
) works with the Quoter.Tips for QA testing:
feeTier
variable inuniswap.yml
config file to get the same price.