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?


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).

  • 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 '13 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 '13 at 13:22

Your Answer

