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

Invoice spec #519

Merged
merged 9 commits into from May 14, 2019
Merged

Invoice spec #519

merged 9 commits into from May 14, 2019

Conversation

sabineschaller
Copy link
Member

This specifies how to conduct invoice payments. It used to be part of the general SPSP spec but has been broken out into its own spec when creating the basic SPSP spec (#513) and the spec on pull payments (#514). It is a suggestion derived from the discussions on the ILP Forum.

0035-spsp-invoices/0035-spsp-invoices.md Outdated Show resolved Hide resolved
0035-spsp-invoices/0035-spsp-invoices.md Outdated Show resolved Hide resolved
0035-spsp-invoices/0035-spsp-invoices.md Outdated Show resolved Hide resolved
0035-spsp-invoices/0035-spsp-invoices.md Outdated Show resolved Hide resolved
Copy link
Member

@emschwartz emschwartz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a couple of comments. Overall, I don't have very strong opinions on the design because I don't think I'm really the main audience for this. I'd be curious to hear from merchant processors whether this meets their needs.

0035-spsp-invoices/0035-spsp-invoices.md Outdated Show resolved Hide resolved
0035-spsp-invoices/0035-spsp-invoices.md Outdated Show resolved Hide resolved
0035-spsp-invoices/0035-spsp-invoices.md Outdated Show resolved Hide resolved
0035-spsp-invoices/0035-spsp-invoices.md Outdated Show resolved Hide resolved
0035-spsp-invoices/0035-spsp-invoices.md Outdated Show resolved Hide resolved
0035-spsp-invoices/0035-spsp-invoices.md Outdated Show resolved Hide resolved
0035-spsp-invoices/0035-spsp-invoices.md Outdated Show resolved Hide resolved
@stale
Copy link

stale bot commented Apr 24, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this issue is important, please feel free to bring it up on the next Interledger Community Group Call or in the Gitter chat.

@stale stale bot added the wontfix label Apr 24, 2019
@stale stale bot closed this May 2, 2019
@sabineschaller sabineschaller reopened this May 7, 2019
@stale stale bot removed the wontfix label May 7, 2019
Copy link
Member

@emschwartz emschwartz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, looks good to me!

1. The SPSP Client will adjust their `sendMax` to reflect the amount they're willing to send.
* `sendMax` SHOULD be derived from the Invoice, i.e., `sendMax` SHOULD be equal to `push.invoice.amount - push.balance`, converted to the SPSP Client's operating asset, taking exchange rate fluctuations into account.
2. The SPSP Server will adjust their `receiveMax` to reflect the amount they're willing to receive.
* `receiveMax` SHOULD be derived from the Invoice, i.e., `sendMax` SHOULD be equal to `push.invoice.amount - push.balance`, converted to the SPSP Server's operating asset, taking exchange rate fluctuations into account.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be set slightly over the amount they want. Because of different exchange rates and asset scales, the rounding error may make it impossible to deliver the exact number the receiver is requesting.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would argue that receiveMax does not need to many adjustments because the receiver only needs to convert the price to her underlying currency and maybe add some value x to account for exchange rate risk. The sendMax, on the other side, should account for the exchange rate risk (invoice asset and sender's underlying asset) plus connector fees.

2. The SPSP Server will adjust their `receiveMax` to reflect the amount they're willing to receive.
* `receiveMax` SHOULD be derived from the Invoice, i.e., `sendMax` SHOULD be equal to `push.invoice.amount - push.balance`, converted to the SPSP Server's operating asset, taking exchange rate fluctuations into account.
3. The SPSP Client's and Server's [STREAM Modules](../0009-simple-payment-setup-protocol/0009-simple-payment-setup-protocol.md#Definitions) will move as much value as possible while staying inside these bounds.
4. If the SPSP Client reaches their `sendMax`, they end the stream and the connection. If the SPSP Server reaches their `receiveMax`, they will end the stream and the connection. Furthermore, when the SPSP Server has received enough value to fully pay the invoice, it ends the stream and the connection.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be worth mentioning that they should end the connection with a NoError code in the ConnectionClose frame

@sabineschaller sabineschaller merged commit e430a3d into interledger:master May 14, 2019
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

Successfully merging this pull request may close these issues.

None yet

4 participants