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

Requesting money with exchange rate can lead to overpayment #26

Open
sharafian opened this issue Mar 1, 2018 · 1 comment
Open

Requesting money with exchange rate can lead to overpayment #26

sharafian opened this issue Mar 1, 2018 · 1 comment

Comments

@sharafian
Copy link
Collaborator

When I call setMinAndMaxBalance(10000) on the receiving side, and pass a minimum balance of -Infinity to the sending side, 100081 ends up making it to the receiver. The sender is using USD, and the receiver is using JPY. The source amount sent is 937 at an exchange rate of 106.81.

It appears as though the receiving amount is impossible to hit exactly with these parameters, and if the receiver were to send the 81 micro-yen back, it would be too small to get one micro-dollar. Although I didn't notice anywhere where the receiver attempted to send the excess back.

What should be done in this case?

@sharafian sharafian changed the title Requesting money with exchange rate leads to overpayment Requesting money with exchange rate can lead to overpayment Mar 1, 2018
@emschwartz
Copy link
Owner

That's tough. I agree that it's strange if you end up with more than you asked for, but it also seems strange to make the default behavior to send that amount back to the connectors. Right now I'd lean towards leaving it the way it is for this case.

It's even harder if we imagine an example where the exchange rate is more like 100000 and the minimum amount of the source units were orders of magnitude bigger than what the receiver is asking for.

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

No branches or pull requests

2 participants