Skip to content
This repository has been archived by the owner on Jan 22, 2020. It is now read-only.

Estimate path payment rate two-way #359

Open
pacoccino opened this issue Apr 12, 2017 · 5 comments
Open

Estimate path payment rate two-way #359

pacoccino opened this issue Apr 12, 2017 · 5 comments

Comments

@pacoccino
Copy link

Currently the Find Path method in horizon let us find a path from a source account to a destination account and destination asset.

Though it only allow us to set a destination amount, that allow us to know the sendMax amount to send.
This only permits to estimate an exchange rate on one way.

It would be very nice to have an endpoint, where we can set a source asset, source amount and destination asset and end up with an estimation of the amount of destination asset that will be received.

Maybe it would be a new endpoint because find path does not need to set the source asset.

@pacoccino pacoccino changed the title Estimate path payment price on both sides Estimate path payment rate two-way Apr 12, 2017
@s-a-y
Copy link

s-a-y commented Aug 23, 2017

Any plans to work on that? Would be really useful

@nullstyle
Copy link
Contributor

There aren't any plans to work on this in the near term @s-a-y, but I will make sure it gets added onto the list of things to work on when I get around to doing another pass on pathfinding.

@s-a-y
Copy link

s-a-y commented Sep 5, 2017

I could probably try to take a look at it with my team (we are not up to speed with golang) if you confirm there are no technical barriers for implementing this feature @nullstyle

@nullstyle
Copy link
Contributor

There shouldn't be anything you can't work with @s-a-y, but I figure it will be a pain in the butt to implement... If you're not familiar with go, you'll probably run into a lot of pain. The pathfinding is meant to be pluggable and this will be the first big expansion of the interface so there will be some design questions to answer in addition to implementation.

The relevant interfaces are here: https://github.com/stellar/horizon/blob/master/src/github.com/stellar/horizon/paths/main.go

You'll want to expand that interface to incorporate this change to a two-way system.

@istrau2
Copy link

istrau2 commented Sep 14, 2017

Just wanted to +1 this. I've had to use some really nasty hacks to get around this in lupoex.

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

No branches or pull requests

4 participants