-
Notifications
You must be signed in to change notification settings - Fork 70
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
HTTP API for quoting #255
Comments
Can you elaborate on how this would work? Not sure what you mean by quoting via STREAM. Don't exchange rate APIs suffice for that? |
This would use STREAM test packets with some fixed source amount to
determine how much arrives at a particular recipient. You would pass it a
payment pointer and either a source or destination amount and it would
estimate the other amount.
The exchange rates API is only for the nodes local rates, whereas the
quoting API is multi hop.
|
We could implement this as a payment that does not touch the store. I wonder if this would require a special type of packet, similarly to echo packets, for multihop, since it requires actually routing a payment through all necessary nodes. Also this could be a DoS vector from the bandwidth level, as I could flood the connector with test payments that cost me nothing. @kincaidoneil why thumbs down? |
Might be a useful endpoint, but I'm very skeptical of using probing for determining the exchange rate while the network is in its infancy: it's very easy for intermediaries to manipulate.
It's supported within the existing STREAM spec: if you send a packet with a random condition to a Stream receiver (and if they're still able to decrypt the data of the packet), they respond by rejecting the packet and including response data with the amount they received. The sender can use this to determine the exchange rate. The problem is the recipient could just lie and say they didn't receive much when they actually received a lot, or intermediaries could identify the packets as probing and take a larger spread Re: DoS vector: Also, since the packets are still normal Interledger packets, you might have to prepay for them (though after they get rejected you can get your money back) |
We should add another HTTP endpoint to get a quote for a given amount using STREAM.
The text was updated successfully, but these errors were encountered: