Uniswap / interface

🦄 Open source interfaces for the Uniswap protocol
https://app.uniswap.org
GNU General Public License v3.0
4.99k stars 5.04k forks source link

Swapping Matic is actually requesting swap for wrapped Matic #3811

Open jbentke opened 2 years ago

jbentke commented 2 years ago

Bug Description Connected through Metamask. Polygon Network is connected. When I select MATIC it shows the correct balance for MATIC native token. Doing a swap to USDC however sends a swap for WMATIC to USDC which can also bee seen when looking in the router. It can further be seen in the transaction data. When already approved for WMATIC its working but in my case it was not so the transaction obviously failed. Native Matic has address '0x0000000000000000000000000000000000001010' but '0d500b1d8e8ef31e21c99d1db9a6444d3adf127' is used which is the contract for wrapped MATIC (which can be selected seperatly and does work correctly).

Steps to Reproduce

  1. Select Polygon network
  2. Connect Metamask
  3. Select MATIC as first token
  4. Select USDC as token to swap to
  5. Press Swap

Expected Behavior It should initiate a swap with native MATIC token

Additional Context Here is the transaction data where you can see that it wants to swap from '0d500b1d8e8ef31e21c99d1db9a6444d3adf127' which is WMATIC and not nativ MATIC (copied from Metamask)

0x5ae401dc000000000000000000000000000000000000000000000000000000006275164300000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000e404e45aaf0000000000000000000000000d500b1d8e8ef31e21c99d1db9a6444d3adf12700000000000000000000000002791bca1f2de4661ed88a30c99a7a9449aa8417400000000000000000000000000000000000000000000000000000000000001f40000000000000000000000006d0e2bca9096de4356a308064b511f4ec6459b250000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000fbed4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
willhennessy commented 2 years ago

@JFrankfurt can you take a look? High priority if reproducible

patnir commented 2 years ago

Has this been resolved yet? I'm seeing the same issue on my end

patnir commented 2 years ago

Here is the proof: https://polygonscan.com/tx/0x4822979be10260a5d4b208b322b69a4873ed46b4ab81f9b0ad1cb87c7bd53909

Not sure why it took the wrapped matic + native matic + matic gas fees

ethanrushh commented 1 year ago

Same issue here