Skip to content

Conversation

@amalnathsathyan
Copy link

For a successful arbitrage between two pools following the equation xy = k, factors such as slippage, reserves, and amountIn must be take into account. Arbitrary inputs will not yield the expected results when the reserves and fee parameters differ between the two pools. Here is how you can derive an optimalAmountIn for that. Same approach can be extended to any AMMs, not only classical xy=k ones.

@dhruvsol
Copy link
Owner

dhruvsol commented Aug 4, 2025

@amalnathsathyan can you update the notes in the readme + add yourself as contributor

@amalnathsathyan
Copy link
Author

Sure. I'll update.

@amalnathsathyan
Copy link
Author

amalnathsathyan commented Aug 5, 2025

@dhruvsol updated readme. Next, will work on the optimalAmountIn for DLMM pools, so that this can be applied on intra-pool arbitrage in meteora.

@amalnathsathyan
Copy link
Author

@dhruvsol you may close and merge this PR.

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