1

Getting this error when attempting a swap on Raydium within the first few seconds of a pool being created.

"Program log: Error: The amm account owner is not match with this program

"Program 675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8 failed: custom program error: 0x1b"

Looking at the source code for raydium-amm isn't really helpful

https://github.com/raydium-io/raydium-amm/blob/master/program/src/error.rs

If I wait 20s or so after the pool is created, there is no issue with the swap, so I know the keys I am using for the transaction are correct. For this use case swapping within the first few seconds are critical, so waiting is not a viable option.

Any help would be appreciated, thanks.

FB

1
  • How exactly do you send a transaction? Is the endpoint working well?
    – Seva
    Commented Feb 29 at 14:54

2 Answers 2

1

Most likely your client is using the Finalized confirmation, so the second transaction is simulated against the Finalized block, which does not contain the newly created pool. A block typically takes 12 seconds to get finalized, and is mostly used for sensitive transactions to be totally sure it won't be rolled back.

Since you need to access the new state immediately, try changing your commitment to Confirmed instead. That way you shouldn't need to wait more than a second or two.

0

It's because you send tx before the pool creation tx to be finalized. As this error "The amm account owner is not match with this program" shows clearly, The amm account is not registered Raydium yet. So you need to listen pool creation event with { commitment: "finalized" }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.