interface icon indicating copy to clipboard operation
interface copied to clipboard

Rounding error causing transactions to fail when supplying coins

Open stephenjust opened this issue 2 years ago • 2 comments

Describe the bug When attempting to supply all of a wallet's USDC to AAVE's polygon network, the transaction fails. The UI supplies error text "Internal JSON-RPC error."

To Reproduce Steps to reproduce the behavior:

  1. Go to 'AAVE Polygon USDC market'
  2. Click on 'Supply'
  3. Select "Max"
  4. Send transaction
  5. Observe transaction failure.

Expected behavior The transaction should succeed with all coins from the wallet.

Screenshots N/A

Desktop (please complete the following information):

  • OS: [e.g. iOS] Windows
  • Browser [e.g. chrome, safari] Edge
  • Version [e.g. 22] 101

Additional context The transaction succeeded after I manually reduced the transaction size by 0.1 coins. My assumption is that there is a rounding mismatch happening somewhere.

stephenjust avatar May 15 '22 22:05 stephenjust

@stephenjust are you in polygon v3 or v2? That info will help debugging as the "max" works different between the versions.

sakulstra avatar May 16 '22 08:05 sakulstra

I'm using polygon V2.

stephenjust avatar May 16 '22 14:05 stephenjust

Closing this, seems like it's not an issue anymore.

grothem avatar Aug 11 '23 21:08 grothem