Skip to content
This repository has been archived by the owner on Oct 26, 2021. It is now read-only.

Sending Max amount of tokens fails due to rounding (For example LPT token) #468

Open
1 of 3 tasks
abstractpoint opened this issue Jan 28, 2019 · 0 comments
Open
1 of 3 tasks

Comments

@abstractpoint
Copy link
Contributor

What is this issue about? (select one)

  • Bug report
  • Feature request
  • Enhancement

Issue Description

I have tried to send LPT token to another address, so I clicked on Max and it game me a value of 97.5489046591681266 to be sent. I then got a transaction submitted without a problem, but later transaction failed with an error

Warning! Error encountered during contract execution [Reverted] 
ERC-20 Token Transfer Error (Unable to locate Corresponding Transfer Event Logs), Check with Sender.

I suspect it is either an amount that got rounded up, which my account didn't have or this particular token does not allow sending fractions of itself.

In either case, some kind of advisory note in the UI would help prevent this error.

Steps to reproduce

  1. Send a non round amount (with 16 decimal points) of LPT token to yourself or another address
  2. Note the error with LPT smart contract

Expected Behavior

Transaction should have succeeded, or UI shouldn't let me send the amount I entered.

### Actual Behavior

Transaction resulted in a revert.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant