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

Display bity.com annual cashout limit to user #171

Closed
TimDaub opened this issue Jul 1, 2019 · 5 comments
Closed

Display bity.com annual cashout limit to user #171

TimDaub opened this issue Jul 1, 2019 · 5 comments
Assignees
Labels
bounty enhancement New feature or request size-M 550 DAI

Comments

@TimDaub
Copy link
Collaborator

TimDaub commented Jul 1, 2019

Scope

https://exchange.api.bity.com/v2/orders lists all created orders on bity.com. Using timestamp_executed, we can check whether an order was fulfilled by the wallet. Potentially, we could also use the sum of all orders' output.amount to determine how much a user has cashed out with a specific IBAN.

A problem that arises however, is that output.amount in an order is apparently dynamically computed on the bity.com backend and hence it changes with changes in Ethereum price.
That in turn means that we can't be exactly confident in our calculations about the annual cashout amount of 5000 CHF.

A bunch of ideas for resolution:

  • Talk to bity.com support and ask them to fix this
  • Store the exchange rate at the time of order creation and use that value to determine the current amount

Deliverables

  • Make sure the user is informed properly about their spending limit with bity.com
  • Ideally fix the problem on bity.com side

Notes

Someone from the LeapDAO team that is in contact with bity.com preferably works on this issue.

Gains for the project

  • Improved transparency for the user on how much money they're able to cash out

Roles

bounty gardener: @TimDaub / 10%
bounty worker: name / 75%
bounty reviewer: name / 15%

@MaxStalker
Copy link
Member

I have contacted bity.com and outlined the issue we have. Waiting for their reply in my email :)

@TimDaub TimDaub added size-M 550 DAI and removed size-XXS labels Jul 16, 2019
@MaxStalker
Copy link
Member

Got response from Bity today:
bity_response
If someone would want to copy - here's the excerpt:

maxstarka: That amount of CHF - is it calculated using ETH(for example) price at the time when order was placed?

flor: When timestamp_executed is in the response, then the amounts are the amount we received from the user (input) and the amount we sent to the user (output).

maxstarka: So it's not recalculated, when I send this request, correct? :)

flor: If the order has been executed, yes. If the order has not been executed and that the price is not guaranteed anymore then it will show the current price.

maxstarka: When the order will finally execute - it will use actual price and not the one that was offered, when order was placed, right?

flor: Once the order has been executed, in all cases it shows the amounts used to execute the order.

maxstarka: ah, understood. thank you for clarification 🙇‍♂️

flor: When we receive the payment before the timestamp_price_guaranteed. The we execute the order with the amounts that were shown (the guaranteed price).
If the order is paid later then we execute at market price so the amount will differ according to the market comparing to what was shown when the order was placed.

maxstarka: Right! :)

flor So, when the input is crypto, if you make the transaction almost immediately after having placed the order, then the guaranteed price should be used unless something like replace-by-fee is used or if the crypto-network is overloaded or if the transaction is somehowe rejected or unlikely to execute (can happens if the transaction fees are too low).

@MaxStalker
Copy link
Member

@TimDaub so the amount is recalculated only if the order is not yet executed.

@MaxStalker
Copy link
Member

Some more:
flor:
So, when the input is crypto, if you make the transaction almost immediately after having placed the order, then the guaranteed price should be used unless something like replace-by-fee is used or if the crypto-network is overloaded or if the transaction is somehowe rejected or unlikely to execute (can happens if the transaction fees are too low).

maxstarka: So we can assume, that in "general case" what we see in amount - that's what user will get (provided that order wasn't canceled ofc), right?

flor: When the input is in crypto, in most cases you should get the amount that zas initially shown once timestamp_price_guaranteed is present, provided that you pay the correct amount promptly. Typical cases were you would not get the guaranteed amount are listed in my previous message.

@johannbarbie
Copy link
Member

bounty timed out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bounty enhancement New feature or request size-M 550 DAI
Projects
None yet
Development

No branches or pull requests

3 participants