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

Swap breaks with very small numbers with token -> ETH #688

Closed
rhlsthrm opened this issue Jan 7, 2020 · 0 comments · Fixed by #805
Closed

Swap breaks with very small numbers with token -> ETH #688

rhlsthrm opened this issue Jan 7, 2020 · 0 comments · Fixed by #805
Labels
Bug Something isn't working p1 Bugs/Tests/Blockers Bugs that break things but no loss of funds + Test improvements + PRIORITY blockers for customers.

Comments

@rhlsthrm
Copy link
Contributor

rhlsthrm commented Jan 7, 2020

Node is using float divisions to calculate rates:

const derivedRate =
      parseFloat(formatEther(responderDeposit)) / parseFloat(formatEther(initiatorDeposit));

This floors to 0 if numbers and swap rates are very small.

@rhlsthrm rhlsthrm added the Needs Triage Needs to be looked at and prioritized. label Jan 7, 2020
@LayneHaber LayneHaber added Bug Something isn't working p1 Bugs/Tests/Blockers Bugs that break things but no loss of funds + Test improvements + PRIORITY blockers for customers. and removed Needs Triage Needs to be looked at and prioritized. labels Jan 20, 2020
@LayneHaber LayneHaber mentioned this issue Jan 30, 2020
5 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Something isn't working p1 Bugs/Tests/Blockers Bugs that break things but no loss of funds + Test improvements + PRIORITY blockers for customers.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants