status-desktop icon indicating copy to clipboard operation
status-desktop copied to clipboard

Miscalculations or "no route found" errors during transactions testing on Mainnet

Open churik opened this issue 9 months ago • 1 comments

Bug Report

Description

This issue aims to describe the main issues with a router that have been found during the testing on Mainnet. I've conducted a series of tests on the Mainnet (desktop version), focusing on our router's performance and gas fee calculations, using the MetaMask (MM) wallet as a benchmark.

Key findings

Gas Fee Calculations Discrepancies

  • [ ] 1) Send (L1 -> L1), ETH: fees calculated are about 20% lower than those in MM Video: meta_mask_mainnet_eth_gas_difference.mp4

  • [ ] 2) Bridging (L1 -> L2), ETH: fees are approximately 20% lower than MM's Video: ETH_mainnet_arb_hop.mp4

  • [ ] 3) Send (L1 -> L1), ERC-20:, USDc in a particular case: fees are approximately 40% lower than MM's, so I haven't tried it to prevent stuck in "Pending"

Cases 1-3 might lead to 2 consequences:

  • the time displayed for approximate TX confirmation, does not correspond the reality (<5 mins in UI, in fact 15)

  • the TX might stuck in pending for days

  • [ ] 4) Send (L2 Optimism -> L2 Optimism), ERC-20: USDc in a particular case: fees are more than 100 times higher than the actual charges. Video: wrong_l2_erc20_fee.png That could potentially scare the user off. Mobile issue reference: https://github.com/status-im/status-mobile/issues/19817

Routing Issues:

  • [ ] 5) Send (L1+L2) -> L1, ETH - attempt to check the case of sending ETH from several network, no routes have been found. In general, I got an impression that if there is more than 1 route expected, the routing component shows "No route" instead. Video: no_routes.mp4 Mobile issue reference: https://github.com/status-im/status-mobile/issues/19846

  • [ ] 6) Send L2 Arbitrum -> L2 Optimism, ETH: no routes have been found. Video: no_routes_l2.mp4

  • [ ] 7) Bridge ERC20 L1-L2, USDc: no routes have been found, but HOP (which I believe the main and the only bridge for now) supports it Related issue: https://github.com/status-im/status-desktop/issues/14513 Video: hop_comparison.mp4

Additional Information

  • Status desktop version: nightly 30/04/24
  • Operating System: Mac OSx
  • Network: mainnet

churik avatar May 02 '24 14:05 churik

fees calculated are about X% lower than those in MM. We followed "the recommendation" for fees calculation, shall we just copy MM algorithm?

By increasing the fees it means we favor speed vs cost.

alaibe avatar May 02 '24 17:05 alaibe

About "Gas Fee Calculations Discrepancies"

  1. Send (L1 -> L1), ETH: fees calculated are about 20% lower than those in MM

Fixed in this PR https://github.com/status-im/status-go/pull/5377

  1. Bridging (L1 -> L2), ETH: fees are approximately 20% lower than MM's

Fixed in this PR https://github.com/status-im/status-go/pull/5377

  1. Send (L1 -> L1), ERC-20:, USDc in a particular case: fees are approximately 40% lower than MM's, so I haven't tried it to prevent stuck in "Pending"

Fixed in this PR https://github.com/status-im/status-go/pull/5377

  1. Send (L2 Optimism -> L2 Optimism), ERC-20: USDc in a particular case: fees are more than 100 times higher than the actual charges.

Yes they are (we display max fees), but the L1Fee is the value we're getting from the network, we don't adjust it, just display it, also it's an estimation, not exact value and also that's very very small amount, so better to set it to higher value and be a way less in reality than opposite.

Image

saledjenic avatar Jun 28 '24 12:06 saledjenic

About "Routing Issues"

I've tested all of them in the router v2 integration PR https://github.com/status-im/status-desktop/pull/15344

Here is a video presenting all 3 issues in the order (5, 6, 7) described in the description of this issue.

https://github.com/status-im/status-desktop/assets/86303051/cbb03198-c2cb-46a6-8178-4a797d816e6d

saledjenic avatar Jun 28 '24 14:06 saledjenic

@anastasiyaig you can test this in the router v2 integration PR https://github.com/status-im/status-desktop/pull/15344

saledjenic avatar Jun 28 '24 14:06 saledjenic