3

In Ripple, anyone can issue IOUs, which later can be passed on to other parties in the network through a web of trust. How can one find every account holding IOUs from a given issuer? Would it need to be done through crawling the trust network, or is there an easier way?

1 Answer 1

2

To find all the accounts that hold an asset, e.g. USD/gw1, you just need to use the account_lines API on the gw1 account and filter out the USD entries (or whatever currency code you are interested in).

Although you could recursively look up the account lines of each found account in turn, that doesn't tell you anything more about who "holds the IOUs from a given issuer" which was your question. It instead tells you how much each found account would currently be able to redeem via the issuer. For example, if account_lines on gw1 says UserA has 100 USD/gw1 and account_lines for UserA says they also have -50 USD/UserB, then UserB could redeem 50 USD via gw1 (not accounting for any quality or transfer rates that may be set).

2
  • Does this function return just the IOU holders that directly trust the given account, or does it also look for secondary IOU holders that trust the original IOU holders that have sent the IOUs further down?
    – ThePiachu
    Nov 8, 2013 at 23:39
  • @ThePiachu direct trust lines only (both incoming and outgoing). Those are the only ones relevant. "secondary IOU holders" makes no sense, the closest thing would be payment paths that [ripple_]path_find might return.
    – dchapes
    Nov 9, 2013 at 13:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.