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 feature add/remove liquidity for Raydium #46

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

toannhu96
Copy link

@toannhu96 toannhu96 commented Dec 23, 2024

Description

This PR adds support for add/remove liquidity for both AMM (v4/v5) and CLMM in Raydium.

Changes in This PR

  • Added raydium_add_liquidity_amm
  • Added raydium_remove_liquidity_amm
  • Added raydium_open_position_clmm
  • Added raydium_close_position_clmm

Transaction executed by agent

Example transaction: https://solscan.io/tx/3mPJvjWexNVkF5tTFfAnLURLNHNn7NcYjdz46vWKDPScAMCuByyj7UPS6gEgzenMMgMTtsJRhkRGKDFXaUyVH5qW

Prompt Used

I want to open position clmm for Raydium pool id 8sLbNZoA1cfnvMJLPfp98ZLAnFSYCFApfJKMbiXNLwxj with amount 0.02, range from 180.1 to 250.1

Additional Notes

Checklist

  • I have tested these changes locally
  • I have updated the documentation
  • I have added a transaction link
  • I have added the prompt used to test it

@toannhu96
Copy link
Author

Code already tested

The promp I used: I want to open position clmm for Raydium pool id 8sLbNZoA1cfnvMJLPfp98ZLAnFSYCFApfJKMbiXNLwxj with amount 0.02, range from 180.1 to 250.1

Tx: https://solscan.io/tx/3mPJvjWexNVkF5tTFfAnLURLNHNn7NcYjdz46vWKDPScAMCuByyj7UPS6gEgzenMMgMTtsJRhkRGKDFXaUyVH5qW

@toannhu96
Copy link
Author

TODO: support single asset deposit

@toannhu96
Copy link
Author

cc @@thearyanag. Could you take a look of this PR?

@thearyanag
Copy link
Member

hey @toannhu96 - getting to the backlogs, pardon the wait

can you attach the SS for each action that you have added?

@toannhu96
Copy link
Author

hey @toannhu96 - getting to the backlogs, pardon the wait

can you attach the SS for each action that you have added?

https://solscan.io/tx/3mPJvjWexNVkF5tTFfAnLURLNHNn7NcYjdz46vWKDPScAMCuByyj7UPS6gEgzenMMgMTtsJRhkRGKDFXaUyVH5qW

Hey here is the transaction to test this feature. I just updated the PR description for this also

@thearyanag
Copy link
Member

@toannhu96 , can you also pls move it under the new raydium folder and make actions for these as well, following the https://docs.solanaagentkit.xyz/v0/guides/add_your_own_tool guide

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