Hacker News new | ask | show | jobs
by andrewstellar 4337 days ago
We recommend you only trust one gateway per currency for that exact reason. You can only paid in currency issued from accounts you trust. Lets say your friend holds Euro credits from a gateway in London, and you live in San Francisco and therefore only hold USD credits from a gateway there. All she has to do to send you USD is specify "Send him X USD". She doesn't have to care about your issuer. It's taken care of by the protocol.

Check out https://www.stellar.org/api/#api-payment. By setting Amount.issuer to be the recipient's address, the protocol will find a path from the sender's gateway to the recipient's gateway.

Speaking more broadly, I anticipate many gateways will also become exchanges, to make their credits more valuable, aka more "liquid". For instance, in the last example, what was required to make this work was a "market maker", someone in the middle buying London EUR and selling San Francisco USD. If no direct exchange existed (highly unlikely in this example), there may be a EUR -> XYZ Currency -> USD. To avoid this external dependency (and also offer a cheaper exchange rate), it would be in the London and SF gateway's best interest to trust (https://www.stellar.org/api/#api-trustset) each other. Then, the exchange from her EUR credits to your USD credits would happen directly.