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

[Swapper] Improve approval check inside fetch_quote #376

Closed
0xh3rman opened this issue Jan 17, 2025 · 2 comments
Closed

[Swapper] Improve approval check inside fetch_quote #376

0xh3rman opened this issue Jan 17, 2025 · 2 comments
Labels

Comments

@0xh3rman
Copy link
Collaborator

Currently erco20 approval check is done at the end of fetch_quote method, things can be improved like:

  1. Call it in parallel to reduce quote time
  2. Move it up from provider level to swapper level
  3. Move it to fetch quote data
@0xh3rman 0xh3rman added the swap label Jan 17, 2025
@gemcoder21
Copy link
Contributor

I would recommend adding caching to approval case, once token has an approval for the amount (or max amount) there is no reason to check for in this session (it would be very rare case that a user would revoke approval in current session)

@0xh3rman
Copy link
Collaborator Author

Will be merged into #385

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

No branches or pull requests

2 participants