Skip to content

💱 Any (marketable) pathfinding documentation? #1545

@JFWooten4

Description

@JFWooten4

This is just a touch out of scope for my #723 timeframes. Briefly, pathfinding without route specification has a lot of under-the-hood mechanics. The present page only explains path-payment route options.

What problem does your feature solve?

Document the sheep-wheat exchange pathfinding logic. Users can confidently transact with more info on order matchmaking. I find it particularly important to explain how this works for market orders taking liquidity.

Namely, market orders are the most common for individuals uninformed about spreads or slippage. For an easy remittance payment, they offer the simplest instant transfer conversion. Regulators care a lot about fair execution, and I don’t like the growing alternative of private implementations which tend towards off-chain calculations.

What would you like to see?

To start, a page explaining the routing of offers which consummate in ClaimAtom responses. This could explain, e.g., the CAP-38 solo-pool path execution before worse offers. We could differentiate the DEX via further information about this in the dev docs.

Generally, the network's liquidity allows for a deep reliance on conversion, especially for native assets. But the present documentation doesn't get this point across. Perhaps we could move pathfinding logic into a standalone Encyclopedia > SDEX page referencing paths.

See also #944 in re consolidating liquidity documentation. There's already so much on transaction ordering fairness, as showcased in Straight Facts earlier this year. It'd be great to have equivalent detailed public information for order hopping.

What alternatives are there?

I'm mostly concerned with how validators treat unspecified trade routing, since users share the common goal of best execution. This doesn’t stand out in one sentence and subsection example on independent hops at Txs (specialized) > Path Payments. To reiterate the prescient words of a meaningful early developer:

Pathfinding is key for devs making wallets that support remittance payments. It's worth doing it right, since that's a central goal of Stellar.
Tom Quisel

Some clients currently offload this to a custom implementation.1 This is a lot of extra work to squeeze the most out of execution. Systems like these could serve as documentation inspiration.

Namely, I know Silence and Orbit work on contract-based best execution. We could have a page more geared towards community pathfinding solutions, explaining their open-source code. This would be a stark contrast from the protocol-level Horizon implementation now documented.

Footnotes

  1. Looking at community members like @johansten who’ve been helping me further understand the nuances here 💜 and built their own Horizon comparison servers. 🧠

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions