Live data from Hacker News

Ledger: Stripe's system for tracking and validating money movement

stripe.com

11–20 of 43 posts

Re: Ledger: Stripe's system for tracking and validating money movement

#11

> Even when we have billions of transactions, a single missing, late, or incorrect transaction immediately creates a detectable accuracy issue with a simple query—for example, “Find the clearing Accounts with nonzero balance.” How do you deal with float , transactions where the first leg happens in T+0 but settlement is done in T+N ? Do the clearing accounts have a flag/mark allowing for a nonzero balance?

We model a timestamp which functionally is "when does this activity go on the books"? We compute clearing both based on this "effective_at" and a "system time" (there are some business functions with known periodicity and it makes for a useful debugging tool).

Long-clearing activity makes for some interesting business cases and long-standing float obviously can lead to some detection noise. For example, Brazil has uniquely long settlement times.

Re: Ledger: Stripe's system for tracking and validating money movement

#12

> Even when we have billions of transactions, a single missing, late, or incorrect transaction immediately creates a detectable accuracy issue with a simple query—for example, “Find the clearing Accounts with nonzero balance.” How do you deal with float , transactions where the first leg happens in T+0 but settlement is done in T+N ? Do the clearing accounts have a flag/mark allowing for a nonzero balance?

The general way you'd handle this is with undeposited or in-transit ledgers. Funds would go Account A > Undeposited Account B > Deposited Account B, where they're typically in Undeposited Account B for N days. All ledgers would balance.

Re: Ledger: Stripe's system for tracking and validating money movement

#13
post #6
post #4

I'm not sure who is the audience of this article. I've worked in fintech and have read several practical guides on ledgers and found them interesting reads. In contrast, this one is laden with overly verbose language whose meaning is unclear, such as > Transaction-level fund flows give us powerful tools to reason about complex interconnected subcomponents. This article reads as a fluff piece for investors to me; it's…

> have read several practical guides on ledgers and found them interesting reads Can you share some links?

Modern Treasury has some great docs: https://www.moderntreasury.com/learn/what-is-a-ledger

Re: Ledger: Stripe's system for tracking and validating money movement

#14

> Even when we have billions of transactions, a single missing, late, or incorrect transaction immediately creates a detectable accuracy issue with a simple query—for example, “Find the clearing Accounts with nonzero balance.” How do you deal with float , transactions where the first leg happens in T+0 but settlement is done in T+N ? Do the clearing accounts have a flag/mark allowing for a nonzero balance?

We model a timestamp which functionally is "when does this activity go on the books"? We compute clearing both based on this "effective_at" and a "system time" (there are some business functions with known periodicity and it makes for a useful debugging tool). Long-clearing activity makes for some interesting business cases and long-standing float obviously can lead to some detection noise. For example, Brazil has un…

I work with payments in a bank in Brazil and as I was reading the question I thought "interesting question, here we have a great 'delay' in clearances and very old and very complex government-embedded systems to deal with it, funny to see that you know about it too.

btw, are you familiar with Pix? https://www.bcb.gov.br/en/financialstability/pix_en

Re: Ledger: Stripe's system for tracking and validating money movement

#15

> Even when we have billions of transactions, a single missing, late, or incorrect transaction immediately creates a detectable accuracy issue with a simple query—for example, “Find the clearing Accounts with nonzero balance.” How do you deal with float , transactions where the first leg happens in T+0 but settlement is done in T+N ? Do the clearing accounts have a flag/mark allowing for a nonzero balance?

Not the author, but know a little bit about this. You’re describing a payable or receivable, depending on the direction of the funds flow you’re thinking about. You’d have an account for the payable/receivable that should clear. If it doesn’t do that by the expected settlement date, someone or something needs to go look and find out why. The settlement date itself should be predictable based on properties of the submitted transaction and the network/scheme reporting.

Re: Ledger: Stripe's system for tracking and validating money movement

#16

> Even when we have billions of transactions, a single missing, late, or incorrect transaction immediately creates a detectable accuracy issue with a simple query—for example, “Find the clearing Accounts with nonzero balance.” How do you deal with float , transactions where the first leg happens in T+0 but settlement is done in T+N ? Do the clearing accounts have a flag/mark allowing for a nonzero balance?

Many systems have concepts of booking date & value date https://support.mambu.com/docs/booking-date-vs-value-date

You may also have suspense accounts for certain types of use cases: https://gocardless.com/en-us/guides/posts/what-is-a-suspense...

Re: Ledger: Stripe's system for tracking and validating money movement

#17

Earlier quoted context omitted.

We model a timestamp which functionally is "when does this activity go on the books"? We compute clearing both based on this "effective_at" and a "system time" (there are some business functions with known periodicity and it makes for a useful debugging tool). Long-clearing activity makes for some interesting business cases and long-standing float obviously can lead to some detection noise. For example, Brazil has un…

I work with payments in a bank in Brazil and as I was reading the question I thought "interesting question, here we have a great 'delay' in clearances and very old and very complex government-embedded systems to deal with it, funny to see that you know about it too. btw, are you familiar with Pix? https://www.bcb.gov.br/en/financialstability/pix_en

Well at least some people there should be familiar with it - https://docs.stripe.com/payments/pix

Re: Ledger: Stripe's system for tracking and validating money movement

#18

> Even when we have billions of transactions, a single missing, late, or incorrect transaction immediately creates a detectable accuracy issue with a simple query—for example, “Find the clearing Accounts with nonzero balance.” How do you deal with float , transactions where the first leg happens in T+0 but settlement is done in T+N ? Do the clearing accounts have a flag/mark allowing for a nonzero balance?

Using Hedera hashgraph would be interesting

Re: Ledger: Stripe's system for tracking and validating money movement

#19

> Even when we have billions of transactions, a single missing, late, or incorrect transaction immediately creates a detectable accuracy issue with a simple query—for example, “Find the clearing Accounts with nonzero balance.” How do you deal with float , transactions where the first leg happens in T+0 but settlement is done in T+N ? Do the clearing accounts have a flag/mark allowing for a nonzero balance?

The general way you'd handle this is with undeposited or in-transit ledgers. Funds would go Account A > Undeposited Account B > Deposited Account B, where they're typically in Undeposited Account B for N days. All ledgers would balance.

Second. That's exactly how we handle all money flow state transitions in our ledgers.

Re: Ledger: Stripe's system for tracking and validating money movement

#20
post #4

I'm not sure who is the audience of this article. I've worked in fintech and have read several practical guides on ledgers and found them interesting reads. In contrast, this one is laden with overly verbose language whose meaning is unclear, such as > Transaction-level fund flows give us powerful tools to reason about complex interconnected subcomponents. This article reads as a fluff piece for investors to me; it's…

Stripe strongly encourages writing for its own sake. So much so that they run their own press. I suspect the intended audience is whoever is curious for a medium depth primer in what a ledger looks like for a company handling billions of transactions. As someone in payment tech I found it very interesting.

As someone looking to setup $5m/year in a small side business I was frustrated to learn stripe categorically bans what I was planning. I’m on Braintree now and assumed stripe would be better. Now looking for alternatives.
Post reply on HN