We are trying to execute a magic eden buy now instruction, by sending it to the chain inside of a transaction. There are 3 instructions. For clarity we posted a picture of a fund flow from a working transaction we try to recreate. The first 2 instructions work fine. They transfer sol from our account to an 'random' intermediate wallet address. From Sender(us) to the receiving account (red one) below in the picture. The second instructions is creating a token account for our wallet. fund flow

But in the third instruction there is a transfer from the 'random' intermediate wallet address (red one) to other addresses. We are wondering how this transfer can succeed, since we do not have the private key from that wallet address? Could it be that this intermediate 'random' wallet address is owned by magic eden and that the signature ME returns from their buy_now endpoint can allow this random wallet address to transfer sol? The error we get is posted already multiple times here on stack, but no answers yet:

 "Program M2mx93ekt1fmXSVkTrUL9xVFHkmME8HTUi5Cyc5aF7K failed: custom program error: 0x7d3"
  • I am also facing the same issue, even after passing all the required params, I am getting the same error: Program log: AnchorError caused by account: seller_trade_state. Error Code: AccountNotInitialized. Error Number: 3012. Error Message: The program expected this account to be already initialized. Hopefully someone figured out a solution for this one. Jun 5, 2023 at 16:25

2 Answers 2


The extra fee might relate to sellerReferral/buyerReferral. It's normal.


i'm also working on this problem right now. my guess is that it has something to do with Program Derived Addresses (PDAs) on Solana - still researching this. how do you create "random" intermediate addresses in transaction 1 and 2? is it purely random?

  • As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Sep 28, 2022 at 10:36

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.