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.
Thanks for the help.