Live data from Hacker News

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

stripe.com

31–40 of 43 posts

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

#31
Interesting ratios between transactions and events: numbers in the article suggest perhaps 50 million transactions a day which correspond to five billion events. So 100 events per transaction on average, which gives some idea of the complexity involved.

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

#32
post #2

For those curious, YC funded an open source financial ledger company in S21: https://github.com/formancehq/stack

Did they implement Interledger Protocol (ILP) for their traditional or digital asset ledger? https://interledger.org/developers/rfcs/interledger-protocol...

Mentioned company founder here, we did not yet! I'm glad to see the ILP project is continuing to progress well though, we should definitely consider it again.

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

#33

Earlier quoted context omitted.

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.

What's your small side business?

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

#34

Earlier quoted context omitted.

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.

What's your small side business?

Apparently something on this list: https://stripe.com/en-ca/legal/restricted-businesses#prohibi...

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

#35
post #9

Earlier quoted context omitted.

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.

Hello! I am the author. Thank you for the comment. While Stripe does love to write, I think our core premise here was that being able to reason mathematically about independent distributed systems was a unique application of a ledger. Likewise, we think the data quality offering is a unique extension since it gives us tools to make improvements to our systems over time.

I appreciate the reply. I think I would have appreciated a more clear description of how you are reasoning mathematically about your distributed systems. Simply claiming that you can and do is fine, but as an engineer I would have loved more practical examples. The only part that I found which touched on this was when you described how to find clearing errors by simply searching for clearing accounts with a non zero balance. Are there other examples of mathematically reasoning that you could share? I don't need/expect a reply here, this question is rhetorical to demonstrate how I think this article could have been stronger for me.

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

#36
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?

I'm fully aware of how unsatisfying this reply is, but unfortunately I can't seem to find links. It's been a few years since I was deep diving into ledgers and I must have cleared my bookmarks from that time.

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

#37
post #35
post #9

Earlier quoted context omitted.

Hello! I am the author. Thank you for the comment. While Stripe does love to write, I think our core premise here was that being able to reason mathematically about independent distributed systems was a unique application of a ledger. Likewise, we think the data quality offering is a unique extension since it gives us tools to make improvements to our systems over time.

I appreciate the reply. I think I would have appreciated a more clear description of how you are reasoning mathematically about your distributed systems. Simply claiming that you can and do is fine, but as an engineer I would have loved more practical examples. The only part that I found which touched on this was when you described how to find clearing errors by simply searching for clearing accounts with a non zero…

Not the author, but I worked on the Ledger team at Stripe for 5 years.

Clearing is definitely a key part and a large amount of signal can be derived simply through the zero-balance assertion. To give you some more detailed examples of that:

1. System A bookkeeps +$11 and system B bookkeeps -$10 against the same account, where this is representative of A handing off responsibilities to B during some multi-step process and something was off. In practice, this might look like a Charge being handed off from a product team to the team integrating with card networks for submission. There's plenty of reasons this could have gone awry internally from either team like incorrect fee handling, incorrect FX handling, etc.

2. Pipelines reconciling data may bookkeep $11 and -$10 against the same account, where the two events come from different data sources. This could be a difference in Stripe data vs partner reporting or even a difference between two reports from the same partner (e.g. a transaction-level report against a aggregate we've estimated attributions for). Again, there's plenty of reasons this goes wrong like an error on our side, unexpected partner behaviour, actual partner error, or our incorrect interpretation of a complex partner behaviour.

This approach is general in that we don't need to be concerned about what the actual data models or system interactions are to effectively apply monitoring to everything. Another element is to not create a lot of noise on for non-zero balances while they're in an interim state. Some amount of modelling happens to establish an expected time to clear for accounts, and with the right granularity, like "Charges from product teams to integrating teams usually take 10 minutes", "partner report A and B arrive and are processed 1 day apart", or "we receive money from partner A about 2 days after submitting".

In the end, we're trying to boil down every other Stripe system and partner integrations into a Stripe-wide set of discrete states, transitions, and with dollar value they're for. Teams may have their own system diagrams but they'll also have a parallel Ledger event diagram if they handle money which takes consideration to get right (e.g. failure modes, modelling everything well). I suspect that's what the author is getting at with reasoning more mathematically about distributed systems, as we add a twist on a typical system design here.

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

#39
post #35

Earlier quoted context omitted.

I appreciate the reply. I think I would have appreciated a more clear description of how you are reasoning mathematically about your distributed systems. Simply claiming that you can and do is fine, but as an engineer I would have loved more practical examples. The only part that I found which touched on this was when you described how to find clearing errors by simply searching for clearing accounts with a non zero…

Not the author, but I worked on the Ledger team at Stripe for 5 years. Clearing is definitely a key part and a large amount of signal can be derived simply through the zero-balance assertion. To give you some more detailed examples of that: 1. System A bookkeeps +$11 and system B bookkeeps -$10 against the same account, where this is representative of A handing off responsibilities to B during some multi-step process…

To me, this reply is more valuable than the original post simply because it's written without such heavy dependence on jargon. It also does a better job of "showing, not telling" examples of the behavior that need to be handled.

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

#40

Earlier quoted context omitted.

[flagged]

I had to read it a few times too, I'm still not entirely convinced that "being able to reason mathematically about independent distributed systems was a unique application of a ledger" actually parses into anything. Is 'being able to reason' an 'application of a' ? It looks... off

Their application of a ledger allows the reasoning
Post reply on HN