web icon indicating copy to clipboard operation
web copied to clipboard

Unable to trade BUSD on BNB to ETH on ETH

Open MBMaria opened this issue 10 months ago • 5 comments

Overview

Getting something went wrong when trying to trade BUSD on bnb to ETH on eth

References and additional details

https://github.com/shapeshift/web/assets/100157997/1bb385f2-62e3-4ab0-bb6b-7cddfa09d774

image image image

Acceptance Criteria

Should be able to trade BUSD on bnb to ETH on eth

Need By Date

No response

Screenshots/Mockups

No response

Ownership

  • [X] If my bounty needs engineering or needs product I have added the respective labels on the right
  • [X] As the sponsor of this bounty I will review the changes in a preview environment (ops/product) or review the PR (engineering)

Estimated effort

No response

Sponsor / Stakeholder

No response

Bounty Hunters

  • Join our discord
  • Include an expected timeline for you to complete work in the work plan when you apply for this bounty!
  • Please refer to this link for some basic info
  • Please do not start work on this issue until you are approved in Gitcoin.

MBMaria avatar Apr 15 '24 08:04 MBMaria

https://discord.com/channels/554694662431178782/1229321437626630154/1229558738038427708

more context here, but it appears the issue is caused by degraded nownodes performance. i have switched back over to our own infra for the remaining supported chains (eth, bsc, btc, ltc) for the time being until issues are resolved upstream.

kaladinlight avatar Apr 15 '24 22:04 kaladinlight

Closed thanks to big Kev 🚀

0xApotheosis avatar Apr 16 '24 00:04 0xApotheosis

I have a user who is still experiencing an issue trying to trade busd to eth.... any ideas on why the issue would be persisting?. image

MBMaria avatar Apr 29 '24 01:04 MBMaria

reopening as user still experiencing issue. user found this article which believes it may be the reason why : https://forum.openzeppelin.com/t/can-not-call-the-function-approve-of-the-usdt-contract/2130

MBMaria avatar Apr 29 '24 23:04 MBMaria

@MBMaria I was able to swap just fine from BUSD to ETH:

https://github.com/shapeshift/web/assets/17035424/51afd9e2-7a9d-466a-80f6-ac5893e9e0ca

Is this something you're able to repro? For such hard to repro issues, most likely related to current issues with nodes or upstream services (Li.Fi) it would be helpful to have the failing network requests (in this case, most likely bnbsmartchain's send or estimate request or li.quest requests) for engineering to debug. Obviously not something we'd ideally want to ask users to do and better for ops to repro instead - especially here as they're a mobile app user and can't inspect network requests.

gomesalexandre avatar Apr 30 '24 10:04 gomesalexandre

@MBMaria bump

gomesalexandre avatar Jun 11 '24 11:06 gomesalexandre

@gomesalexandre i am still able to reproduce - i am on native but i can see you are on metamask ..? https://jam.dev/c/c030162a-5cba-4a19-b9be-6787cdc83e6f image

MBMaria avatar Jun 11 '24 22:06 MBMaria

This is a legit issue and can repro locally, hitting http 520 on bnbsmartchain /send endpoint:

curl -H 'Content-Type: application/json' \
      -d '{"hex": "0x02f90f91387d84b2d05e0084b2d05e00830cbdbc941231deb6f5749ef6ce6943a275a1d3e7486f4eae80b90f246e06716100000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000220000000000000000000000000000000000000000000000000000000000000050092c19adef1f949da7f532a8218af4e84ab5526e244b6e4c086a3ae0b605dc15c0000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002170ed0880ac9a755fd29b2688956bd959f933f80000000000000000000000003d504949ca5ff1143caca57d75ead1179ba1dd3a0000000000000000000000000000000000000000000000000014926e058b251c000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000973796d62696f7369730000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a73686170657368696674000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000033d91116e0370970444b0281ab117e161febfcdd00000000000000000000000033d91116e0370970444b0281ab117e161febfcdd000000000000000000000000e9e7cea3dedca5984780bafc599bd69add087d560000000000000000000000002170ed0880ac9a755fd29b2688956bd959f933f8000000000000000000000000000000000000000000000001126bc0da5ec9e9f800000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000001842646478b000000000000000000000000e9e7cea3dedca5984780bafc599bd69add087d56000000000000000000000000000000000000000000000001126bc0da5ec9e9f80000000000000000000000002170ed0880ac9a755fd29b2688956bd959f933f80000000000000000000000000000000000000000000000000014926e058b251c0000000000000000000000001231deb6f5749ef6ce6943a275a1d3e7486f4eae00000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000008702e9e7cea3dedca5984780bafc599bd69add087d5601ffff007efaef62fddcca950418312c6c91aef321375a000033d91116e0370970444b0281ab117e161febfcdd0009c40155d398326f99059ff775485246999027b319795501ffff01f9878a5dd55edc120fde01893ea713a4f032229c001231deb6f5749ef6ce6943a275a1d3e7486f4eae0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001200000000000000000000000002170ed0880ac9a755fd29b2688956bd959f933f80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cb28fbe3e9c0fea62e0e63ff3f232cecfe555ad400000000000000000000000000000000000000000000000000000000000001400000000000000000000000005aa5f7f84ed0e5db0a4a85c3947ea16b53352fd400000000000000000000000000000000000000000000000000000000000001a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000002170ed0880ac9a755fd29b2688956bd959f933f80000000000000000000000002170ed0880ac9a755fd29b2688956bd959f933f80000000000000000000000000000000000000000000000000000000000000844ce654c170000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000110d9316ec0000000000000000000000000000000000000000000000000000014926e058b251c0000000000000000000000002170ed0880ac9a755fd29b2688956bd959f933f80000000000000000000000003d504949ca5ff1143caca57d75ead1179ba1dd3a000000000000000000000000b8f275fbf7a959f4bce59999a2ef122a099e81a80000000000000000000000005523985926aa12ba58dc5ad00ddca99678d7227e0000000000000000000000003d504949ca5ff1143caca57d75ead1179ba1dd3a000000000000000000000000000000000000000000000000000000000000dbe00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000cb28fbe3e9c0fea62e0e63ff3f232cecfe555ad40000000000000000000000000000000000000000000000000000000000000260000000000000000000000000b8f275fbf7a959f4bce59999a2ef122a099e81a8000000000000000000000000000000000000000000000000000000000000058000000000000000000000000000000000000000000000000000000000000000640000000000000000000000003d504949ca5ff1143caca57d75ead1179ba1dd3a6c696669000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000424190072b7db5352bb91cc70dabd82f547ae0030000000000000000000000001ce4e75e2bd6bbbacde1e10d6813228138337e8600000000000000000000000000000000000000000000000000000000000002e41e859a050000000000000000000000000000000000000000000000000014926e058b251c00000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000002a00000000000000000000000002cbabd7329b84e2c0a317702410e7c73d0e0246d0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000c48f6bdeaa0000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000900000000000000000000000000000000000000000000000000138194d41c651c00000000000000000000000000000000000000000000000000136e085fda2bb6000000000000000000000000cb28fbe3e9c0fea62e0e63ff3f232cecfe555ad4000000000000000000000000000000000000000000000000000000006684905e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000bcc2637dfa64999f75abb53a7265b5b4932e40eb0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000424190072b7db5352bb91cc70dabd82f547ae0030000000000000000000000001ce4e75e2bd6bbbacde1e10d6813228138337e8600000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000264e66bb55000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000003328b944c400000000000000000000000000000000000000000000000000000137a7fbbd7827000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002cbabd7329b84e2c0a317702410e7c73d0e0246d0000000000000000000000005ad095de83693ba063941f2f2c5a0df02383b6510000000000000000000000001ce4e75e2bd6bbbacde1e10d6813228138337e8600000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000000240000000000000000000000003d504949ca5ff1143caca57d75ead1179ba1dd3a000000000000000000000000b8f275fbf7a959f4bce59999a2ef122a099e81a80000000000000000000000005523985926aa12ba58dc5ad00ddca99678d7227e0000000000000000000000003d504949ca5ff1143caca57d75ead1179ba1dd3a00000000000000000000000000000000000000000000000000000000000000016c6966690000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000447647691d000000000000000000000000000000000000000000000000001047f4278b42700000000000000000000000003d504949ca5ff1143caca57d75ead1179ba1dd3a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c001a008744272d47cf86592f2f636d1acc2046bfafeea7038ef5e70f33df6e4395db3a06f2648d15fc480971d4242b9d1eb434c84524940d5a3bf27caa9d4024f75fba2"}' \
      -X POST \
      https://dev-api.bnbsmartchain.shapeshift.com/api/v1/send

woodenfurniture avatar Jun 25 '24 23:06 woodenfurniture

@kaladinlight assigning to you, would it be possible to debug on node side using the example above?

woodenfurniture avatar Jun 25 '24 23:06 woodenfurniture

@woodenfurniture Finally got around to looking at this and first attempt to send actually succeeded, though the tx failed on chain (most likely due to non existent route or expiries). https://bscscan.com/tx/0xbb98a1fd3b8ee07352dfb61a6097fc83ba572d59025afdffe8ff721c7f855730

I noticed when looking at the unchained api yesterday that we are proxying send calls through to blockbook. I am going to take a look at updating this and removing any sort of retries that would result in client timeout to see if we can improve the error handling of sends as a first step.

kaladinlight avatar Jun 27 '24 15:06 kaladinlight

https://github.com/shapeshift/unchained/pull/1007 update to /send endpoint so we can get more useful error info as returned directly from the node for debugging.

kaladinlight avatar Jun 27 '24 20:06 kaladinlight

closing ticket for the moment as we should get more useable information from endpoints at this point and help in future debugging

0xean avatar Jul 01 '24 22:07 0xean