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
Invoice spec #519
Conversation
There was a problem hiding this 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.
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. |
There was a problem hiding this 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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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
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.