Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strict-receive pathfinder returns invalid paths #5143

Closed
mikhail-dvorkin opened this issue Dec 17, 2023 · 0 comments · Fixed by #5541
Closed

Strict-receive pathfinder returns invalid paths #5143

mikhail-dvorkin opened this issue Dec 17, 2023 · 0 comments · Fixed by #5541

Comments

@mikhail-dvorkin
Copy link

Consider finding a strict-receive path to swap AQUA to 1 XLM. Here's the link to Horizon:

https://horizon.stellar.org/paths/strict-receive?source_assets=AQUA%3AGBNZILSTVQZ4R7IKQDGHYGY2QXL5QOFJYQMXPKWRRM5PAV7Y4M67AQUA&destination_asset_type=native&destination_amount=1

For many weeks it shows a path through assets SGB and IBMWorldWire, proposing a price of < 150:

{
        "source_asset_type": "credit_alphanum4",
        "source_asset_code": "AQUA",
        "source_asset_issuer": "GBNZILSTVQZ4R7IKQDGHYGY2QXL5QOFJYQMXPKWRRM5PAV7Y4M67AQUA",
        "source_amount": "125.1023169",
        "destination_asset_type": "native",
        "destination_amount": "1.0000000",
        "path": [
          {
            "asset_type": "credit_alphanum4",
            "asset_code": "SGB",
            "asset_issuer": "GAME5YNKHIPRSMN2BI3HLS3OYD4NE6FQ2WKUUJPYYM6GU4MRDUBPHN6B"
          },
          {
            "asset_type": "credit_alphanum12",
            "asset_code": "IBMWorldWire",
            "asset_issuer": "GB6KHHHS52HXXFRG5V5QKF2D2DMYHW6GICHPH3FJGJS5MYIPVXDL74TY"
          }
        ]
}

However, when I try to use this path in a pathPaymentStrictReceive operation, I constantly receive
{"transaction":"tx_failed","operations":["op_too_few_offers"]}

The horizon's alleged path always shows a price < 150, and in my operation I set 175 as sendMax, so this is not a small fluctuation issue.

What version are you using?

"horizon_version": "2.27.0-208a73f6165f59c4eeacf672b6d24659fe54d256",
"core_version": "stellar-core 20.0.0 (6177299100b114aa108584053414371f38aebf53)"

To reproduce

  1. Find the best strict-receive path to swap AQUA:GBNZILSTVQZ4R7IKQDGHYGY2QXL5QOFJYQMXPKWRRM5PAV7Y4M67AQUA to 1 XLM.
  2. Take the path through SGB and IBMWorldWire, it proposes a price of < 150.
  3. Try to execute strict-receive transaction over that path with sendMax = 175.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants