rockfish icon indicating copy to clipboard operation
rockfish copied to clipboard

Make pathFinder mode able to use n-length paths

Open Reidmcc opened this issue 6 years ago • 3 comments

Describe the solution you'd like

I want to have pathFinder check n-length paths, instead of hard-coded three-asset paths as it does now.

Right now it does this path structure:

XLM :arrow_right: USD :arrow_right: EUR :arrow_right: XLM

With this feature it could also do, for example:

XLM :arrow_right: USD :arrow_right: EUR :arrow_right: CNY :arrow_right: XLM

Describe alternatives you've considered This would be an adaptation of the n-path code that pathRequester already has; pathRequester itself was the alternative to pathFinder's current behavior but the rest of pathRequester didn't perform well.

Requirements

  • Change pathFinder's PaymentPath so it uses a list of pairs
  • Make MakePathPayment behave like makePathPaymentredux, but for rockfish's native structs instead of Horizon's json return
  • Update pathFinder's configuration to accommodate the changes

Reidmcc avatar Feb 07 '19 20:02 Reidmcc

When I worked on my own triangular arbitrage bots, I implemented recursive algorithm to build any N-length sequence.

But then... I realised, it doesn't have any sense. All you need is 2 and 3 length sequences, because >=3 is just derivatives of 3

ilyacherevkov avatar Jun 09 '19 08:06 ilyacherevkov

But since Lumen allows N-length payment transactions, this could make sense to insta-capture additional margin...

My bots on waves dex were exposed to a great risk in 4+ steps transactions, because most of the time I ended up stuck in some low-liqudity coin, this may not be the case with Lumen.

ilyacherevkov avatar Jun 09 '19 08:06 ilyacherevkov

@ilyacherevkov yeah, it's the instant path-payment method that makes >3 step paths worth considering; risk stays at zero regardless of path length.

Reidmcc avatar Jun 11 '19 14:06 Reidmcc