This is the first installment in a series of blogs examining exchange markets and how they are a good use case for using a graph database.

Bartering may seem like an ancient practice, but we all grew up exchanging non-monetary goods in a marketplace. For me, it was baseball cards, but for many it was records or clothes. We all intuitively know how to transact in markets when we want or need something, and the supply is limited.

An exchange is a market in which non-monetary goods are traded.  When you trade in exchange markets, the matching is typically very rare and the value of the goods is generally very subjective. For example, my “Wade Boggs” rookie card may not be valuable to me but may be very valuable to my cousin’s friend.  Networking connections and attracting people who want to transact is key to what keeps exchanges alive.  Finding matches to ensure transactions are happening is what attracts users to an exchange.

Kidney exchanges are markets where supply is limited and demand is high, but there is an additional level of constriction, because participants who want to transact must match for the kidney to be exchanged.  At the same time, the goods in this case cannot be exchanged for money, because it is illegal to buy and sell kidneys for transplantation (1).

A transplantable kidney can come from both a willing kidney donor and from a willing kidney patient-donor pair. A kidney patient-donor pair is one where a patient in need of a kidney has a willing donor partner that he or she is incompatible with.  In this case (see image below), this patient-donor pair exchanges kidneys with another patient-donor pair in which Donor 1 is compatible with Recipient 2 and Donor 2 with Recipient 1.  This is called a two-way exchange. The first successful U.S. two-way exchange occurred in Rhode Island in 2000.


Figure 1: Two Way Exchange (3)


In exchanges that don’t involve money, “scarce resources must be allocated by some kind of matching process” (1). In most cases, the allocation of resources involves complex algorithms being run on data and processed through a matchmaking algorithm.  For kidney exchanges, the algorithm involves identifying compatible matches, but it also identifies networks of pairs of compatible donors.  A donor might be willing to spare his or her kidney, but it may not be a valid match. “Blood types have to be compatible, and a patient’s immune system must not immediately reject the new kidney” (1). Currently there are over 100,000 people on the waiting list and most have willing donors that are incompatible with them (4).

At the time of the first two-way exchange, Alvin Roth was a professor at the University of Pittsburgh, which had a medical center with a prominent organ-transplant program. He developed an optimization algorithm for a kidney exchange that allowed people to easily find out if they were a compatible match and find potential recipients or vice versa (2). A kidney exchange was a natural solution, because there were so many willing patient-donor pairs that could not find a compatible match.

The problem with large cycles of patient-donor pairs is that the exchange could not happen simultaneously.  Non-simultaneous exchanges were not preferred due to the risk that one of the donors may back out after his or her partner had received a compatible kidney.  A breakthrough occurred when risky, non-simultaneous, multistate exchanges were engaged and found to be effective, leading to the creation of a Kidney Exchange Network in 2007.

In 2008, surgeons at Johns Hopkins Hospital performed kidney transplants for six different recipients for the first ever six-way exchange, activated by an altruistic donor.  The same six-way exchange occurred this year at the California Pacific Medical Center in San Francisco in what is being hailed as the largest operation of its kind on the west coast. For more information about the organ donation or exchanges, visit the United Network for Organ Sharing.

Successful marketplaces involve “bringing together many participants who want to transact” (1).  For the kidney exchange to draw people into the market, they had to build databases of patients and donors.  A natural type of database to store exchange market data one that stores relationships for easy retrieval and allows users to perform real-time graph analytics to find donor chains that extend many degrees deep. Now that kidney exchanges are occurring at a larger scale, the potential for the Kidney Exchange Network data set to grow extremely large is inevitable.  Therefore, the database has to also handle data at large scales and still return results in near real time.


Figure 2: Distributed Navigation (Real Time Graph Analytics)


Exchange markets are alive, meaning that the data is constantly coming in and being removed. Moreover, real-time results in exchange markets is critical for efficacy, since the demand for the goods is, in most situations, extremely time-sensitive (e.g. organ transplants). Objectivity’s database technology is ideal for exchange market data, since it is scalable, specializes in the storage and retrieval of large datasets, and stores relationships local to the data, making it very fast at reading them out.  Finally, Objectivity supports complex graph analytics results in real time through our distributed navigation framework.

I still hold out hope for my baseball cards. With some rare exceptions, I doubt they will find value again with anyone except for me.  At the same time, it is a tremendous privilege to go from trading baseball cards to writing software to enable the development of technology to solve actual problems facing our community and world.

The Exchange Market Blog Series, Part 2, will continue soon with what form a successful exchange market might take, and how an integration with a graph database as the underlying store might be what makes an exchange attract more users and keep it growing.  For more information about Objectivity and its product offerings, visit our products page or contact us.

     1. “Who Gets What and Why: The New Economics of Matchmaking and Market Design”

          by Alvin E. Roth, Houghton Mifflin Harcourt, 2015

     2. Freakonomics Podcast, NPR, 6/17/2015, Transcript at

     3. National Kidney Foundation,

     4. “12 Patients participate in ‘Kidney Swap’ at SF Hospital”, ABC7News,


Nick Quinn

Principal Architect of InfiniteGraph

Nick Quinn - Principal Architect