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

feat: Auto-Swap Service for STRK Transfers #24

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Jagadeeshftw
Copy link

closes #1

@Jagadeeshftw
Copy link
Author

Instead of directly listening for STRK contract events, I’ve added the /auto_swap endpoint. This endpoint receives the required details (from, to, value) via payload, processes the subscription information from the database, and performs the token swap using the EKUBO contract.

Is this approach in line with what you were expecting @Abeeujah?

@Jagadeeshftw Jagadeeshftw changed the title feat: Add initial implementation for Auto-Swap Service for STRK Transfers feat: Auto-Swap Service for STRK Transfers Dec 22, 2024
@Abeeujah
Copy link
Collaborator

Yeah, it's an endpoint that receives the payload, just as you mentioned, you were not supposed to listen to events, the issue description mentioned we have an indexer that listens to events... so, you're in line, keep going. 👍

@Jagadeeshftw
Copy link
Author

Hi @Abeeujah , I've almost completed it, but a few things are still pending:

  1. Update sqrt_ratio_limit based on token0 and token1.
  2. Fix an issue with passing calldata to the swap function.
  3. Complete testing.
    I'm hoping to have these resolved and will open the PR for review within the next couple of days.

@Jagadeeshftw
Copy link
Author

I've done with code changes, after testing I will open it for review.

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.

Implement Auto-Swap Service for STRK Transfers
2 participants