Quantcast
Channel: Recent Questions - Solana Stack Exchange
Viewing all articles
Browse latest Browse all 9525

How do pool keys for Pump.fun tokens that migrated to Raydium differ from standard AMM pool tokens?

$
0
0

I was observing some tokens that are being launched using onProgramAccountChange wss method and I noticed that pool state keys for pump.fun tokens that migrated to Raydium are different than normal tokens in AMM pool.

For example, I saw that baseMint and quoteMint are switched and I am wondering what else is different (baseVault, baseDecimals, etc) and how can these values be modified to correctly prepare and calculate computeAmountOut using Raydium SDK.

I tried switching all properties that have base and quote in the property name, but swap is failing. If I just switch baseMint and quoteMint, buying works, but selling does not.

I am talking about LIQUIDITY_STATE_LAYOUT_V4 in: https://github.com/raydium-io/raydium-sdk/blob/master/src/liquidity/layout.ts

Here is a comparison of pool keys of pump.fun token (on the left) and standard AMM pool token (on the right) - I just replaced baseMint and quoteMint of the pump fun token.Pool state keys comparison

Thanks for the help.


Viewing all articles
Browse latest Browse all 9525

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>