Debt Shuffling

Today is an exciting day: we’re launching what has been our most-requested feature for a long time. We’re calling it “debt shuffling,” but it’s best explained with an example. Say this is you and your friends:


The arrows mean “owes money to.” There are only seven friends here, but they will have to write 21 checks to settle up!

Enter debt shuffling. Any one of these people can click the “shuffle debt” button, which will take you to a screen like this:


The monk will think of a way to reduce the number of checks you have to write to settle up. This debt shuffle will take the complicated graph above and turn it into this!


We go the extra mile when we’re proposing a debt shuffle by paying attention to how many bills you’ve split with each person in the group (and how recently those bills happened). If you split bills with some people more often than others, you probably see them more often, and those are the people it will be easiest to settle up with.

We were thinking hard about privacy as we were developing this feature. How do we make it useful without giving away information about your private debts? Here’s what we came up with. You get to see the effects of the debt shuffle on you (that’s the “before” and “after” display above). You also get to see how the money was shuffled around (that’s the “Check the math” section above) — this lets you verify that the debt shuffle was fair. What you don’t get to see are the balances between your friends before or after the shuffle.

We really hope you enjoy this feature as much as we’ve enjoyed developing it! Debt shuffling takes the convenience of BillMonk’s “social money” concept to the next level.


30 Responses to “Debt Shuffling”

  1. Ben Bernard Says:

    Awesome! I’ve been waiting for this feature! Its totally sweet!

  2. Paul Irish Says:

    That must be some serious math. Congrats!

  3. Kyle Says:

    I’m not a big fan. We wrote our own debt-shuffling program that just removed cyclic debt from the system, so it trended towards lower amounts being owed for everyone, but we had to manually enter in the transactions.

    Using your system, I managed to transfer a 2,000 dollar debt from being owed from one person to being owed to me by a completely different person, greatly increasing the monetary amounts owed by everyone to nearly everyone else (but through fewer checks, I suppose)

  4. Adam Says:

    I kind of have to agree with what was said by the guy above… fewer checks isn’t necessarily as nice as a lower total debt. Regardless, its a step in the right direction I suppose.

    Ideally whenever the webservice api you guys have been promising gets released we can just implement our own debt-shuffling algorithms directly.

  5. Harshdeep Says:

    Sweet! Thanks, Billmonk just keeps getting better 🙂

  6. yeah Says:

    Hey, that’s what has been all about right from the beginning (in Spring 2006).

    🙂 Very nice work though, I’m a great admirer of you guys at Billmonk…

  7. Kyle Says:

    Same Kyle as above. Someone hit the debt shuffling button and actually saved it, Now said $2,000 dollar debt has been shuffled around. Can we please have an opt-in or a reversal feature? This is a terrible implementation of what is honestly a wonderful idea.. 😦

  8. Kyle Says:

    (ah, it can be deleted, crisis averted.. i’ll stop spamming the comments now)

  9. Raymond Says:

    Potential privacy exposure: I can use this feature to find out how much my two friends A and B owe each other, provided A and B both owe me a lot of money.

    A owe me $100: After shuffle owes me $120.
    B owes me $100: After shuffle owes me $80.

    Therefore A owes B $20.

    Dunno if this is a problem. Awesome feature regardless.

  10. Josh Haberman ( Says:

    Hey Kyle, thanks for the feedback! It’s true that the current algorithm optimizes for the fewest number of checks to be written, and will sometimes make debts bigger as a result. That’s mostly useful if you want to settle up now, and want to write the fewest number of checks.

    The good news is that we could easily use the same UI but have different shuffling algorithms under the hood. There could be a drop-down that has options like “fewest number of checks” or “smallest amount of debt.” I can’t promise this will happen immediately, but I think it will make debt shuffling even more compelling for cases like yours.


  11. Kyle Says:

    To Josh: Ah, I actually wasn’t thinking of that scenario, it makes more sense now (though being able to provide a cap for this outlier scenario would be nice). It just hasn’t been the way me and my circle of friends have used billmonk so far, so we weren’t considering it. 🙂 The dropdown to choose between them would be very welcome, though an automatic cyclic-debt removal (supposedly what cyclr is providing?) would be even more cool 😉

  12. wisnij Says:

    Consider the cycle Bob -> Mel -> Emily -> Bob in the original graph above. Debt “flowing” around this loop should be able to be cancelled out, reducing the weight of each edge by $22.77, without any physical money needing to change hands. (It’s like Gauss’s law for money; if you draw a surface around the members of a cycle, the monetary flux through that surface will not change if the cycle is relaxed.) The question is, using the current algorithm, will the final acyclic graph be different if this cycle resolution was done ahead of time?

    That said, I DO think that reducing the number of edges is an improvement. I’ll just have to remember not to include Kyle in any shufflings. 😛

  13. Aaron Says:

    Yikes! I’m not sure how happy I am with the implementation. I’ve been wanting this feature in BillMonk for a while — and actually bandied about some ideas with my friends on how to implement it in a privacy-preserving fashion, etc.

    But just to test it, I clicked “shuffle debts” for my housemates and I. I’ll back up Kyle’s feedback: Whereas before a series of roughly $200 checks would have been traded around, your algorithm will cut out 3 of these checks.. but in exchange, requires one of our housemates to write me a $800 check, and then for me to write a $900 check to another one! This makes it actually more complicated to settle up, since this requires everyone’s bank accounts to have enough of a float to ride through the processing of these checks, or else it imposes a rigid serialization order on who writes which check when, to prevent them from bouncing.

    I like the metric of optimizing for least checks written, but maybe could you add a “maximum debt inflation” percentage? E.g., 200% means that a $100 debt from A–>B can be increased to at most $200 from A–>B ? Alternatively, you could just add a hard cap: “Generate no debt greater than $X” (for user-supplied X)

  14. Payments Watch » Net Settlement For Everyone Says:

    […] announced the release of a new feature they call debt shuffling. It’s like net settlement for a group of people (e.g. a social or person to person network of […]

  15. Sreejith Says:

    This is just what i was looking for! Awesome algo guys 🙂

  16. John Cena Says:

    Damn cool guys. You rock!!

  17. Lazy Boy Says:

    It’s like a card game without money – everybody owes everybody, nobody lost, nobody won…

  18. Bob Says:

    The hardest part of this is finding this many humans you can trust to pay you on time.

  19. Matt Says:

    What if BillMonk had a bank account that could take and receive funds. If a group of friends wanted to settle their debts, each person would find the net money that they owe ( or are owed). Then, they would all either pay BillMonk, or BillMonk would pay them. The end result is that the entire group is even.

    We did this at the end of last summer. Everyone owed everyone else and it was a total mess. So each person just figured out our net cash flow, and everyone who owed money paid a single person, then that person distributed the funds to the people that were owed.

    Assuming everyone trusts BillMonk, the only problem I see is that you need to have the group of friends agree to settle everything.

  20. Leskov Says:

    Отличный пост – слов нет. Спасибо.

  21. This Says:


    Have you been blogging long? Staying within Budget is all about Focus | Debt Prison is a great blog, you have a great writing style too. Found this post last Monday and i’ve been reading your blog since. I’ve subscribed to your RSS feed and I am ex…

  22. flood cellphone Says:

    Big thanks…)

  23. Online Checking Account Says:

    The $77 million settlement with OppenheimerFunds Inc., announced today by Treasurer Alexi Giannoulias and state Atty. Gen. Lisa Madigan would partially reimburse about 65,000 account holders.

  24. neundinlY Says:

    заходите вот сюда на сайт – удача Частный бизнес

  25. Deborah Channing Says:

    Hi, I just wanted to say you have a wonderful site and this was a very informative article. I bookmarked your site and have it in my reader now…looking forward to more content in the future.

  26. Shyam Says:

    true… you know what they say…Money is nothing more than a piece of paper with the image of a long-dead person on it.

  27. tax advice Says:

    driving practical test…

    […]Debt Shuffling « Notes from the BillMonk[…]…

  28. debt Says:

    wonderful publish, very informative. I ponder why the other experts of this sector do not notice this. You must proceed your writing. I am sure, you’ve a great readers’ base already!

  29. Yeppoon Builders Says:

    Yeppoon Builders…

    […]Debt Shuffling « Notes from the BillMonk[…]…

  30. practical driving test Says:

    It’s an amazing article in favor of all the
    internet visitors; they will take benefit from it
    I am sure.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: