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

HTTP API for quoting #255

Open
emschwartz opened this issue Aug 30, 2019 · 4 comments
Open

HTTP API for quoting #255

emschwartz opened this issue Aug 30, 2019 · 4 comments
Labels

Comments

@emschwartz
Copy link
Member

We should add another HTTP endpoint to get a quote for a given amount using STREAM.

@gakonst
Copy link
Member

gakonst commented Aug 30, 2019

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?

@emschwartz
Copy link
Member Author

emschwartz commented Aug 30, 2019 via email

@gakonst
Copy link
Member

gakonst commented Sep 1, 2019

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?

@kincaidoneil
Copy link
Member

kincaidoneil commented Sep 1, 2019

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.

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.

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)

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

No branches or pull requests

3 participants