Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exchange: do not allow to exchange amounts larger than balance #64

Open
troggy opened this issue Apr 24, 2019 · 0 comments
Open

Exchange: do not allow to exchange amounts larger than balance #64

troggy opened this issue Apr 24, 2019 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@troggy
Copy link
Member

troggy commented Apr 24, 2019

When exchanging, it is possible to enter amounts larger than your balance. UI allows to submit then which leads to failed transactions, no explanation given on UI.

Affects:

  • ETH → DAI
  • DAI → ETH
  • DAI → sunDai
  • sunDai → DAI

However, the check works for transfers (e.g. DAI → DAI). Let's implement the same check for aforementioned exchanges

@troggy troggy added the bug Something isn't working label Apr 24, 2019
@TimDaub TimDaub added this to the pDAI-wallet on Mainnet milestone May 13, 2019
MaxStalker pushed a commit to MaxStalker/burner-wallet that referenced this issue Aug 16, 2019
* Select random outputs to scale on multiple users

Problem: many users might handshake at the same time, selecting the same
output for their transaction. This will create double spends, failed
transactions, and unhappy users.

Solution: given that all outputs have enough tokens to spend, select and
use a random one for the transaction. This requires also to make
multiple outputs available to the contract address before the start of
the game.

* fix everything

* update contracts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants