DSS 2026 — Fund-Flow Modeling by Solving Large Linear Algebra Systems Yannis Smaragdakis Source video: https://www.youtube.com/watch?v=aYaG2ffycjc Automatic captions — not human-reviewed. Complete spoken-audio coverage is unverified. Source language tag: en (English). Source export SHA256: 4a335fe6c98691089c43cfc39d18a572a7714ae94d59b559cdfa222e60e6b01c [0:00] Thank you very much. [0:02] Okay. [0:03] So [0:05] fund flow modeling by solving large [0:07] linear algebra systems. And if that [0:09] title didn't turn you off, I don't know [0:11] what will cuz like it's about as boring [0:14] as it can be, right? Large linear [0:16] algebra systems. What's what's this all [0:18] about? It's actually going to be real [0:20] fun. [0:21] But the the slides are a bit heavy, so [0:24] I'll try to depart a bit from the slides [0:26] and try to give you [0:28] a bit of an intuitive understanding of [0:30] what I'm proposing here. And we can [0:33] discuss whether you agree that this is [0:35] interesting. I think it's pretty [0:36] interesting. It's been my pet project [0:40] for a very large part of the past year, [0:42] let's say. And the the the result is [0:45] deployed on our site. So if you go to [0:48] app.dedup.com, you you can see the [0:50] results of this algorithm running every [0:52] two weeks. And I will tell you what are [0:55] the drawbacks and what alternative [0:57] algorithms we have for the same problem. [0:58] But what's the problem first of all? [1:01] So [1:02] fund flow. [1:04] Every time there's a hack, [1:06] everyone asks, where did the money go? [1:09] There was recently a certain hack you [1:11] may have heard in the past three days. [1:13] And everyone is asking, where did the [1:14] money go? And they will be asking that [1:16] for years to come. [1:18] And everyone, meaning exchanges, [1:20] investigators, regulators, everyone [1:23] wants to know who got funded from the [1:26] proceeds of the hack. And the standard [1:28] answer is to do taint analysis. And [1:31] there's a whole bunch of algorithms [1:33] there. And I'm not sure if I can point [1:35] at the screen. There's poison. Poison [1:38] means [1:39] you you get poisoned by some tainted [1:41] funds. You transfer the poison to [1:43] everyone else. You are marked forever. [1:45] Or haircut. You proportionally assign [1:49] what portion of your funds is tainted, [1:51] etc., etc. [1:52] I'm not going to go into all the [1:54] alternative algorithms that everyone is [1:56] using to to do fund flow. But the main [1:58] point is is that everyone else is doing [2:02] fund transfer tracking. So you need to [2:05] know when money changes hands. You need [2:08] to know when there are transfers. [2:11] what's the problem with that? It's that [2:14] we don't really know all the time how [2:16] money changes hands in DeFi. [2:19] Uh so in DeFi value can move without [2:23] transfers and that's the principle of [2:25] money laundering. That's how people [2:27] launder money after they get money that [2:30] they shouldn't have gotten. [2:32] Okay, so examples and this is not an [2:35] exhaustive list, but and and you may [2:37] have seen many of these. You can deposit [2:39] something on behalf of someone else. [2:40] Let's say I'm a hacker H and I want to [2:43] give value to some other party C. I want [2:47] to [2:47] give value to C, but not do a token [2:50] transfer to C directly. So what [2:53] technique can I use? Of course, I can [2:55] deposit with any DeFi protocol on their [2:57] behalf. That's the most stupid thing. [3:00] I can deposit and get an NFT that looks [3:03] valueless. [3:05] So it looks like I got nothing in [3:06] return. I just deposited to a well-known [3:09] protocol which is not tainted by itself. [3:11] The the well-known protocol is innocent. [3:15] And but I got an NFT that's value zero [3:17] that has value zero and then I pass it [3:20] on. So I passed value zero. [3:22] So the other person should not be [3:23] tainted, but the other person can now [3:25] withdraw from the main protocol. [3:28] I can do all sorts of hiding off-chain. [3:31] I can have an off-chain order and some [3:35] innocent party can jump in and fill that [3:38] order [3:39] and indirectly the proceeds go to C, the [3:43] party that I want to benefit. [3:45] So C gets the funds, but I'm never doing [3:49] a transaction with C. I'm signing I'm [3:52] signing an off-chain order. [3:54] And there's lots more. [3:57] I can do value injection. [4:00] C holds a worthless token and I give it [4:02] value. How do I give it value? Through [4:04] any combination of liquidity provision [4:08] or whatever. I can buy it at an inflated [4:11] price. I can [4:13] I can enable liquidity in another wide [4:15] otherwise worthless pool, whatever. The [4:18] point is DeFi lets us create lots of [4:22] complex financial mechanisms and all [4:25] these financial mechanisms allow value [4:27] transfer without a direct token [4:30] transfer. [4:32] So we all believe this? [4:34] Are we okay [4:35] with the principle so far? Okay. [4:38] So none of this is malicious. [4:41] It's very hard to keep up with that. [4:43] Obviously not impossible. There are lots [4:45] of people who are trying to do it, but [4:47] it's very very hard to have a catalog of [4:51] all the DeFi protocols and all the [4:52] patterns they can use to obscure value [4:55] transfer. So what are we trying what are [4:59] examples of this kind of valueless [5:01] transfer? This is actually in parallel [5:03] with the work I was doing. I saw this [5:05] paper some seven months ago by people [5:08] who were then at Eigen Fi and it said [5:10] exactly the same thing. Basically here's [5:13] an example of how back a few million [5:17] blocks there was 38 million of US 38 [5:20] million of funds laundered through a [5:23] transaction that nobody could track [5:26] because it was an off-chain order that [5:27] some MEV bot filled in and indirectly [5:31] there was value transfer from P to B and [5:34] everyone could see the transactions, but [5:36] nobody could tell that there was value [5:38] transfer there [5:39] because there was no direct transfer of [5:42] tokens, no direct taint. [5:44] So what's the principle that we're [5:46] trying to explore here [5:48] to exploit here? The principle is what's [5:50] in yellow. So this is the entire [5:51] presentation. [5:53] The principle is we can have an [5:56] innocuous DeFi protocol and it can [5:59] obscure that I'm passing some value to [6:02] someone else. [6:04] But if it's an innocuous protocol, what [6:06] it will not obscure is that I'm [6:09] mentioning that someone else that I'm [6:11] passing the value to. [6:12] There has to be a transaction where I [6:14] participate in [6:16] and somehow my address and their address [6:20] appear in that same one transaction. [6:24] And we have to link that transaction [6:26] with others perhaps, but at the very [6:28] least, whoever is sending the money, the [6:31] who is very supplying the value and [6:33] whoever is receiving it, they are named [6:35] in one transaction. [6:37] Obviously, there's exceptions. The [6:40] exceptions are privacy protocols that [6:41] obscure the recipient addresses, Tornado [6:44] Cash, Railgun. We'll talk about those at [6:46] the very end. [6:47] But if you take out privacy protocols [6:50] and you just keep regular DeFi, which is [6:53] used for the [6:54] lion's share of money laundering, this [6:56] principle holds. [7:00] Are we clear? And I want some feedback [7:02] because if we haven't followed this, [7:03] we're not going to go very far. Are we [7:05] clear on what I'm I'm saying here? [7:07] Yes. [7:08] Excellent. So [7:10] I'm trying to link the taint of [7:14] co-participants of every transaction, [7:17] meaning I'm going to go into all [7:19] transactions ever that ever appeared on [7:22] chain. I'm going to take the call diet [7:25] data for all of them. I'm going to parse [7:27] it and find addresses, [7:29] send the recipient but anyone who's also [7:31] mentioned. [7:32] And if they appear anywhere in the same [7:35] transaction, I'm going to link all those [7:37] addresses in a very large linear system. [7:40] And then our problem will be scaling. [7:42] Our problem will be solving this very [7:44] large linear system. So let's look at a [7:47] couple of technical details and then we [7:50] can get to the high level again. [7:52] So [7:53] the model [7:54] pretty much says I will give a value to [7:58] the taint of every participant, of every [8:02] addresses, [8:03] of every address. What's the taint? It's [8:05] a value that [8:07] how to what percentage, let's say, it's [8:10] a it's a let's say a fraction that will [8:14] give some metric to the taintedness of [8:17] an address. [8:19] I will take as input the participants of [8:21] every transaction, like I said at the [8:22] top, and I will take as input some [8:25] amounts that will help me with weighing [8:27] what transactions are important. And and [8:30] then there will be some extra [8:32] assumptions here. So I'll start with a [8:34] list of known hackers. There are roughly [8:38] 10,000 addresses that are directly [8:40] involved in past hacks so far in [8:42] Ethereum. So we start with this [8:44] information, and then we we're going to [8:46] check how these addresses relate to [8:49] every other address that ever [8:51] participated in transactions on mainnet. [8:54] And the simplifying assumptions here is [8:57] that any address that has many thousands [8:59] of transactions, I'm going to exclude it [9:01] just to make the system a little more [9:03] scalable. It would most likely end up [9:05] being zero tainted anyway or very close [9:08] to zero, but it also helps us with [9:10] scalability here to just do it upfront. [9:12] So any well-known DeFi protocol will go [9:15] to zero right away based on this [9:17] criterion. [9:18] And the [9:21] high-level description of the math is [9:23] the sentence up there. [9:25] An address is as tainted as the average [9:28] of its co-participants in each [9:30] transaction. [9:31] And then the transaction the [9:34] transactions are averaged [9:36] compared to other transactions on the [9:38] same address based on how much value [9:40] that address gets. [9:42] And if that address is completely [9:44] worthless, they get an arbitrary value [9:46] of epsilon, same for every one of their [9:48] transactions. [9:50] So again, what I'm saying up here is you [9:54] participate in a transaction with [9:56] someone else. Your taint value is [9:58] averaged and contributes to their [10:01] taint, and their taint value is averaged [10:04] and contributes to your taint. [10:06] And the this average is also averaged in [10:10] proportion to how much the transaction [10:12] contributed to your total worth. [10:14] So if we actually [10:16] do this in math, it comes to a linear [10:19] equation that looks like this and I know [10:21] it's it's going to be very hard to [10:23] parse, but let's it's it's not really [10:26] that hard if you spend two minutes [10:28] looking at it. So very quickly I'll just [10:30] go over it. [10:32] This is how much the transaction matters [10:34] to address A. [10:36] What does that mean? The address A, if [10:38] we take the absolute values of every [10:42] funds transferred to or from it, sum [10:44] over all of those and weigh the [10:47] transaction based on how much value that [10:49] transaction contributes, that's this [10:51] factor. And then everything else is just [10:54] averaging over co-participants in the [10:56] same transaction. [10:58] So [11:00] hopefully this scared you enough, but in [11:02] intuition it's very simple. We are just [11:05] averaging [11:07] all participants in a transaction in a [11:09] large linear system. It can be [11:11] recursive. My taint contributes to [11:13] yours, yours contributes to mine [11:16] because we participate in the same [11:17] transaction and then we solve that [11:19] linear [11:20] equation, that large linear system to [11:23] get a score. This is very much like [11:25] PageRank, but over all participants in [11:28] all transactions. [11:31] Okay, so [11:33] large linear system, [11:35] very [11:36] very standard, but here are some [11:38] intuitive features. [11:41] The result of this is not a probability, [11:44] it's not a fraction of stolen funds. [11:46] It's just a metric. So if I get a 0.7, [11:49] it doesn't mean anything other than [11:52] probably I'm more tainted than someone [11:54] who got a 0.6. [11:56] I mean there will be a threshold. Let's [11:59] say everything above 0.3 is most likely [12:02] very involved in some money laundering, [12:06] but [12:07] it's not an absolute threshold. It's not [12:09] a confidence. It's not a percentage. [12:12] Second, everything is symmetric. I [12:15] funded a hacker is the same as a hacker [12:18] funded me. [12:19] It's going to give me the same score. [12:21] So it's a completely symmetric system [12:24] and it goes back in time. So I funded a [12:27] hacker 3 million blocks ago, it's still [12:30] going to give me a high tainted score [12:32] the way this system is being solved. [12:35] Okay, so with all this intuitive [12:37] understanding of the system, [12:40] you can see results from that system [12:43] live if you log in right now as a free [12:46] user on app.ddub.com [12:48] and you find you start from any address [12:50] or you actually look at the list that's [12:52] called hack fish related. [12:54] That's the name of the list here. You [12:57] will get graphs like this. You can go [12:59] and explore all the way to taint sources [13:01] and when you get to 100% I cannot give a [13:03] live demo here. These are frozen slides, [13:06] but if you go all the way to taint [13:08] sources to 100% and you click on that, [13:11] you actually get what incident gave us [13:13] the confidence originally that this is a [13:15] hacker address. But you can also trace [13:17] back and say why does this address have [13:20] a 74%? [13:21] Oh, [13:23] I have at least two transactions that [13:25] give me this confidence. There may be [13:26] many more and these two transactions [13:29] contribute in the linear system and it's [13:31] because this address got linked to that [13:34] known hacker. [13:36] So go and explore and if you want to ask [13:39] me about the Binance hack, obviously, [13:42] like I said, this is a huge system. [13:44] We solve this every two weeks. In two [13:47] weeks, in 15 days from now, you will see [13:49] how funds moved from the Binance hack. [13:52] But right now we only have for the [13:54] Binance hack, we only have internal [13:56] systems like this one. [13:59] So we have some internal data, but on [14:01] the public system you cannot see it just [14:03] yet. You will see the results in 15 days [14:06] though. [14:07] Okay, so [14:10] just to give you an idea of the scaling [14:12] of this system, it's it's huge. We [14:14] actually have to solve it at ranges of 1 [14:17] million blocks, but very, very quickly [14:20] right now on the full chain, just [14:23] Ethereum. Let's not even go to base, [14:25] Binance, anything with higher [14:27] transaction rates. [14:29] It right now takes on CPU [14:31] like 3 days, 2 and 1/2 days to solve the [14:34] thing. [14:35] Like just on this range of blocks, it [14:37] takes 22 hours on an even faster machine [14:39] than our production server. But [14:42] if this is to scale, if we find like [14:45] really good business cases for that, we [14:47] can speed it up quite a bit. So on a on [14:49] a really expensive server, [14:51] like a $150,000 server with 4 GPUs, we [14:55] can actually get it to be more than 25 [14:57] times faster. So we can solve this in an [14:59] hour [15:01] if we really if it really made a lot of [15:03] sense for us, if we had the right [15:06] business value for it. So that's kind of [15:08] the exercise on how fast we can get in [15:11] solving these systems. But again, this [15:13] is a very heavy system. This is a very [15:15] large system and it's not something that [15:18] one should do casually. [15:20] Okay, so it does it give good results? [15:23] It gives you really good results. [15:25] Informally, you can go and explore and [15:27] let us know if you don't like what you [15:29] see, but it gives pretty good results. [15:32] Just an example from like addresses [15:35] that were humanly found tainted from the [15:38] Bybit hack by ZachXBT. [15:40] Automatically, the first time you run [15:42] this system, it finds virtually all of [15:45] them. Like [15:47] from the 52 addresses, 42 of the 52 have [15:51] taint scores of over 0.7. All of them [15:54] have some taint score that not zero, but [15:57] at least 42 of the 52 automatically are [15:59] very highly flagged in the taint scores. [16:03] And overall, it flags many thousands of [16:06] addresses. Like of course, there are 350 [16:09] million active Ethereum addresses [16:11] historically, so 150k is not that many, [16:15] but that's exactly what you expect. How [16:17] many addresses are in some way tainted? [16:20] That's roughly what you would expect [16:22] overall. [16:23] Like I said, we also have alternative [16:25] models that are taint-based, not so [16:28] scalable, but this is our most general [16:31] model and it's also publicly exported. [16:33] You can play with it. The results are [16:35] visible with the caveat that they're [16:37] only updated every 15 days, but you can [16:40] actually go and run this or not run, see [16:43] the results [16:45] on our site as a free user. [16:48] Okay, so [16:50] what's next? There's lots of ways. This [16:53] is this is good, interesting an [16:55] interesting model I think and there's [16:57] lots of ways [16:58] where this can be improved. I think the [17:00] main one is this. [17:03] Can we start the large linear system [17:05] with a proportional taint [17:07] doing the same thing as a human [17:09] investigator will do for a Tornado Cash [17:11] or a railgun? [17:13] Like can I start with a taint of 0.2 for [17:16] that address because I have 0.2 or 20% [17:20] confidence [17:22] that this address really got out of [17:23] Tornado Cash, that deposit that came [17:26] from a hack based on sizes or based on [17:29] timing or whatever? So can we replicate [17:32] what human investigators do and [17:34] integrate that information in the linear [17:36] system and extrapolate from that? That's [17:39] I think the highest promise vector. [17:41] So that's all I had, but I think [17:45] there may be interesting questions and [17:47] we'll let me say a bit more. Thank you [17:49] very much.