Skip to content

Solana error code #-32002 - Transaction simulation failed #970

@Buidlor

Description

@Buidlor

InvalidInstructionData (#15999) on Solana same-chain swaps via DFlow router

Started happening consistently around March 10. Was rare before that.

Solana same-chain swaps (memecoin → SOL) are failing during simulation with AnchorError #15999 InvalidInstructionData on DF1ow4tspfHX9JwWJsAb9epbkA8hmpSEAtxXy1V27QBH, instruction SwapWithDestination. Only happens when the quote routes through DFlow.

Forcing includedOriginSwapSources: ["jupiter"] avoids the error but breaks routing for most pump.fun tokens (NO_SWAP_ROUTES_FOUND), so not a real fix.

Quote payload:

{
  "user": "2P2fjvEqamcYe8MNFgCxKuth4ECr4zEAQAAtXhxdjFMp",
  "recipient": "2P2fjvEqamcYe8MNFgCxKuth4ECr4zEAQAAtXhxdjFMp",
  "originChainId": 792703809,
  "destinationChainId": 792703809,
  "originCurrency": "EPuZ1X6pPzac3ELPsT59LStmgaSr4kBJvaAbL15Fpump",
  "destinationCurrency": "11111111111111111111111111111111",
  "tradeType": "EXACT_INPUT",
  "amount": "803771314",
  "slippageTolerance": "1500",
  "appFees": [{ "recipient": "0x2AE4cd5346D327Df52EC964c25400DC78400a2A5", "fee": "100" }]
}

Route returned: { "origin": { "router": "dflow" }, "destination": { "router": "dflow" } }

Error logs:

Program DF1ow4tspfHX9JwWJsAb9epbkA8hmpSEAtxXy1V27QBH invoke [1]
Program log: Instruction: SwapWithDestination
Program log: AnchorError occurred. Error Code: InvalidInstructionData. Error Number: 15999.
Program DF1ow4tspfHX9JwWJsAb9epbkA8hmpSEAtxXy1V27QBH consumed 21272 of 803000 compute units
Program DF1ow4tspfHX9JwWJsAb9epbkA8hmpSEAtxXy1V27QBH failed: custom program error: 0x3e7f

Request ID: 0xed582bd71d2885a143bf39f596103700c7b4f7cee75e6430bc443b7a0f5b7cba

The instruction fails almost instantly (21k of 803k CU), so it looks like the instruction data is malformed rather than a liquidity/routing issue.

Was there a recent change to the DFlow integration or on-chain program around March 10? And is there any way the quote API could detect this and fall back to another router automatically?

Full logs attached here:

simulation-failed.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions