The Payments Engineer Playbook

The Payments Engineer Playbook

Money as Metadata

What happens when we ignore the belief that all money is interchangeable?

Alvaro Duran's avatar
Alvaro Duran
Jan 07, 2026
∙ Paid

In reality, no two bank notes are the same.

When we say that money is fungible, we’re suspending our disbelief for a moment. Of course, I can tell that my bank note is not exactly the same as yours. But we go along with it because, well, everyone else is also playing pretend. To the point that we even forget it.

Fungibility is such a pervasive belief; I would have to pause for a moment to even consider that it isn’t really true.

This, however, is problematic for engineers who handle money. We’ve embedded this white lie into the software. And, sure, most of the time it doesn’t do any harm. You’ve probably never encountered any such situation where having to differentiate two bank notes was needed.

But that’s probably because you only handle money online.

I was watching a talk by Formance CEO Clément Salaün the other day, called The color of money1. In the talk, he argues that assuming that all money in a ledger is fungible is a bad idea.

Say you accept cash at your Starbucks joint in exchange for topping up a gift card. We’ve already covered what a great idea it is to have gift cards, or store credits, and Salaün goes as far as calling it “the best business in the universe”.

How to design mixed payment methods with store credits

How to design mixed payment methods with store credits

Alvaro Duran
·
October 9, 2024
Read full story

But there’s a catch. Days later, when you deposit that cash, along with everything you’ve earned from selling Macchiatos and Frapuccinos, your bank rejects some of your bank notes because they’re fake.

You thought you were getting Washingtons, Jeffersons and Lincolns, and in reality you were getting Monopoly money.

Soon, you’ll realize that you actually have two problems:

  • You don’t know what amount to substract from which gift cards

  • You don’t know which sales to cancel

Because you mixed the legit and the fake money, now you can’t make which one is which.

The solution that Formance CEO offered is actually pretty clever: make fungibility intentional.

Intentional fungibility means to trace the payer of every bank note the same way you trace its amount and currency. That gives you the choice to treat those bank notes as if they were any other bank note, but retaining the ability to trace back who gave them to you.

This, in other words, means treating banks from different people as not directly balanceable with other people’s notes. They’re currency from a different country, so to speak, and only become truly fungible when you decide so.

With that tiny bit of extra information, you retain your sanity when it comes to fake bank notes, even if, for a brief moment, you have to suspend the widespread notion that all bank notes are created equal.

I find this idea very interesting.

But I don’t usually deal with physical money when I build software. For me, it’s usually credit cards, APMs and bank transfers. When I see cash, it is rare, and in the form of Cash On Delivery.

Fraud exists online, but it’s not in the form of fake bank notes.

Does that mean that this idea is cool, but pointless in the online world? Is this another idea that’s clever, but wasted effort?

It’s not. Making fungibility intentional introduces a whole new approach to money, even online.

This is an idea that changes everything. And I’m not even sure if the people at Formance are even aware of.

I’m Alvaro Duran. After nearly a decade building and maintaining large-scale money software, I’ve seen what works (and what doesn’t) about software that moves money around. In The Payments Engineer Playbook, I share one in-depth article every Wednesday with breakdowns of how money actually moves.

And I show you how top fintech companies build their systems.

If you’re an engineer or founder who needs to understand money software in depth, join close to 2,000 subscribers from companies like Shopify, Modern Treasury, Coinbase or Flywire to learn how real payment engineers plan, scale, and build money software.

This week, we’re looking at how money gets represented in software. You probably use one of those open source, third party packages that are now standard in your language: Go’s go-money, Python’s py-moneyed, Ruby’s money, whatever.

This is fine (at least you’re not using floats to represent money).

Richard Pryor Stole a lot of Half Cents and Bought a Ferrari

Richard Pryor Stole a lot of Half Cents and Bought a Ferrari

Alvaro Duran
·
August 27, 2025
Read full story

But you’re leaving a lot of information on the table. All of these libraries work under the assumption that all money is fungible. And we’ve just proven this to be limiting, and sometimes harmful.

In this article, I’m going to argue that:

  • That you should build your own money library

  • That building such a library isn’t that hard, and very useful down the line

  • That using a third party money library is akin to installing left-pad

Enough intro, let’s dive in.

User's avatar

Continue reading this post for free, courtesy of Alvaro Duran.

Or purchase a paid subscription.
© 2026 Alvaro Duran Barata · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture