XChainWatcher: Identifying Anomalies in Cross-Chain Bridges
XChainWatcher: Identifying Anomalies in Crosschain Bridges · 25 Mar 2026 · 1:13:36
Andre Augusto describes his research into crosschain anomaly detection, focusing on identifying anomalies in cross-chain bridges. It is relevant for security researchers and bridge builders interested in monitoring cross-chain activity.
Speakers
Topics
From XChainWatcher: Identifying Anomalies in Crosschain Bridges, hosted by Ethereum Engineering Group.
Transcript
Hello and welcome everyone. Today we've got Andre Austo who's going to tell us about his research on crosschain communications. And um so Andre before you dive in to your talk, can you please um give us a bit of a rundown on yourself, who you who are you, where are you going, and you know, just tell us all. >> Yeah, sure. Uh first of all, thank you for for having me. So I'm a PhD student. Um I'm working at the University of Lisbon and uh in ESKID. It's a research institution connected to the University of Lisbon. Um and um I'm expected to to graduate um probably somewhere uh at the
end of this year 2026. And my research has been all around crosschain security. Basically in this um paper specifically that I'm going to to present some results here. Um this is all about finding anomalies and um and attacks in crosschain bridges. Um I have other works but always in this sense of finding vulnerabilities, anomalies and you know stuff that's not going right in crosschain solutions and um and we need to to basically fix. That's basically my my contribution.
um and the way my mys is going. Um and yeah, I mean I think that's that's a little bit of myself. >> Yeah. >> Yeah. Thank you for that and um yeah, crosschain security is such a huge area. Um so good luck with your PhD and let's present your slides now. Um yeah. >> Yeah. All right. All right. Um so so yeah, so the this paper and and the the our most recent published research is called crosschain watcher um identifying anomalies in in
crosschain bridges. Right? So for the ones that are familiar with with the the ecosystem, it's not really hard to motivate why we need to research crosschain bridges and specifically security in crosschain bridges. Uh but for the ones that are not familiar, this is probably the the big picture. Let's say it's actually now probably uh a bit more than this, but since June 2021, we have around uh $3.2 two billion dollars uh that were stolen from from these kind of interoperability solutions. Um and according to DeFi Lamb as we started this research this was about 35% of all funds stolen in in DeFi. Um so we have here so this is basically um a
timeline of crossing bridge hacks. Um this ends in 2024 March 2024. It's interesting that since then and actually in 2026, we're already seeing um again attacks on crosschain bridges. For example, in in February, we had two more attacks and bridges. Um and the interesting thing here is that we always have this recurrent problem that there all that there's always a bridge being attacked, right? So even the smallest bubbles here are usually in the order of at least a million dollars, which is kind of kind of massive. And uh the the the main one is um $611 million which is this bubble right in
the in the middle which was the the Ronin hack. So it's one of the attacks or one of the bridges that I'm going to talk a little bit about today um as as um as a case study um in to to test our our tool. So what exactly is the consequence of having an attack right? So of course funds are are are stolen, people or bridges lose their their funds um that they they have locked. Um but also the impacts can be a lot um um a lot higher than that. So at the time that the Ronin bridge was um connecting and and today
as well but it was connecting the Ronin blockchain and Ethereum, right? So Ethereum was the the main hub of liquidity and then we had a smaller blockchain Ronin which is like focused on the the gaming industry and the idea for the Ronin bridge is to you know bridge that those two blockchains and invite liquidity from Ethereum into the Ronin blockchain. Um so the problem in that approach uh or when when the attack happened was that and it's interesting to to take this example specifically because we have like five or six days between the attack being made and the attack being discovered and when the attack is discovered and of course the
bridge is paused then suddenly we don't have any more the flow of deposits of uh funds into that smaller blockchain into Ronin. And therefore you know every kind of application that depends on those flows u on on those on that value then suddenly um doesn't have any any kind of uh liquidity um anymore let's say right so it has liquidity the existing liquidity that's there but no new liquidity is getting there right so yeah basically what I said just decreases the flow of funds to other blockchains and consequently to to the apps deployed there so at the time We identified two main two main research gaps. So the
first one is that we didn't have any kind of research beyond historical attacks. So we didn't know what was going in crosschain bridges that were things that were not supposed to happen but they were not really attacks. So in this case we just uh called them anomalies in the sense that something's not going well and actually the the main um um you know whoever is being left behind is not really the the the protocol but the users. So the users are interacting with the protocol and and uh there are some anomalies in in the way in the process the users um interact with the protocol. And the second thing
is the lack of quantitative studies on crosschain security. So we had a bunch of theoretical uh solutions about how to bridge uh funds between blockchains but actual data on um on bridges um that are really deployed in blockchains was was uh really scarce. So now we have been seeing a lot of um I wouldn't say a lot but some studies that are tackling both of these things um after after our own um and I will talk a little bit about that as well probably at the end.
So in order to kind of um fill in each of these gaps we proposed two different contributions. So the first one is what we call crosschain watcher. It's an open source framework for anomaly detection and it's based on data log. And the second of course is based on crosschain watcher. We performed this quantitative study trying to detect anomalies in two previously hacked bridges. Um, we chose two historical attacks. Uh, the the Nomad bridge hack and the and the Ronin bridge hack, which are basically the the one of the the most um, you know, in terms of value stolen, there are two of the most interesting um, um, attacks
and this is basically what I'll be covering today. Right? So first of all um after motivating all of this and why we need this I'll just explain briefly how a crossian bridge works and take into consideration that this is first of all a simplification and um it applies to these specific bridges. Unfortunately bridges are not really standardized. Uh we still have that problem which means that it's difficult to find um a specific architecture or flow of information that you know just is is suitable for everything everything out there.
Then I'll talk a little bit about crosschain watcher um the the small performance evaluation we did and then we have the anomaly detection results divided into two different steps. Uh so the first step is basically a single chain analysis. So we take analysis of bridge contracts and token contracts in one blockchain and detect things that are not going well there. And then we bridge into a crosschain setting where we merge the state of multiple blockchains and um and find anomaly anomalies there. Then I'll just wrap up this the the whole thing with the main limitations of all this what we can do forward um as next steps in the in in in as future research directions and uh and
some final uh points. All right. So how exactly does a token bridge work? Again, um this is how these two solutions work, how a lot of other solutions work, not how every single bridge works out there. So let's say I have a user, the user wants to deposit some tokens into another blockchain, right? So it wants to transfer uh those assets into another blockchain. So usually the the the user first of all deposits these tokens in um the in the source blockchain. So we have this bridge contract on blockchain A that now
has control over these assets. There's usually a set of events that are emitted once the the smart contracts are being run. The logic is being run. a set of events that are being emitted and this is what's captured by off-chain entities. This is let's say an offchain interoperability mechanism as we we call it. So it's something that's looking for state changes in one blockchain and then it's triggering something on the other one. It can just relay information. It can publish a proof um can trigger directly the the the transfer of funds to to the to the recipient. In this case, what happens is um we have this bridge contract on blockchain B minting some tokens and
then the user is able to make a transaction and withdraw those those tokens from the from the bridge. Right? So um and again the an event is emitted and then the offchain entity can can look at that. So there are multiple modes to to achieve this. Right? So in this in this figure we have this lock mint. So the the original tokens are kept locked in the source chain contract. Um and we're minting tokens on the destination chain. However, we could actually burn these tokens right here, which would be um much better security-wise because we avoid having like millions and millions of dollars um locked in a single contract in one
blockchain uh which are basically honeypots for uh for attackers. So we could actually burn tokens and mint tokens. We could just have locks and then locks if we have liquidity pools on both sides. So there are multiple variations of this. Right. Right. So crosschain watcher. So how exactly is uh what are the different components of of crosschain watch and how does it work? So I will I will um divide this into different steps. So the the first thing that's important and probably the most important thing is that we we have this set of transaction receipts with the execution of a certain transaction. Right? So we fetch these
transaction receipts and we have first what we call an event and transaction data decoded. I'll talk a little bit more about this in in in the next slides, but the idea is simple is simply we decode the information that's usually encoded um in the in the events in the in in the the data of the transaction. We extract the information and we build a set of logic relations with that information. Right? So assertaining that things happen. So probably uh something happened in the bridge contract, something happened in the in the token contract, something happened in the transaction with these parameters and so on. And also we have a lot of relations that come from a static configuration
file and these are usually things that are um just constant. So for example, the finality of blockchains, it's usually something that's that's constant. the uh a set of addresses that are controlled by the bridge. If we just if we want to know if the user actually locked um some tokens and transferred some tokens to the bridge, we can just check if there was a transfer of funds uh from the user into a bridge controlled address and so on so forth. So we have this set of logic relations um which are basically the facts, right?
So we produce a set of facts that are represent the data and then these facts are loaded into our anomaly detector. In this case we use data log. Um it's um um it's a let's say a static um it's it's not exactly um an anomaly tool but it's it allows us to define a set of rules and then define uh or get everything that falls within or without those rules that we define using static analysis. So we uh of course this relies on on what we call this crosschain rules and it it evaluates those those facts against the crosschain rules and then
reports um any anomaly or uh thing that went well right so I'll dive into each of these uh steps one two and three uh separately now so the first one is the event and transaction data decoding right and and it's very simple so for each transaction receipt we have a set of events instead um payload in the data. So we decode each of these events to which means transferring uh or transforming something like this into a uh standardized um where a human readable not standardized a human readable format where each of these parameters um are are filled with with data.
The problem again is that we need to do this for each protocol, right? So uh each protocol has a different structure has a a different um schema of events a different way of of doing things and therefore we end up with something like this. Imagine we have three different protocols these three different protocols uh you know to simplify they have you know parameters that match each other which is not usually um u mandatory. So sometimes um you know they they have different sizes and information that the others don't have.
But the idea is if we have a bunch of protocols um a bunch of bridges that have different structures then we need to transform these events uh and transactions and these different protocols and blockchains into standardized data structures and the standardized data structure is basically our our set of data lock facts. So here we have things such as for example in the beginning native deposits and withdrawals of of um of funds. Um usually in these bridges uh we noticed that whenever the native tokens were being used the wrapped versions um were being used as well. So whenever I was
depositing for example native um ether on Ethereum into Ronin um or into uh Moon Beam using the Nomad bridge or or any other blockchain using these bridges um usually that deposit usually involved the wrapped version of that token. So in this case wrapped ether right. So this these set of events um represent those interactions with native tokens um in the in the process of depositing or withdrawing tokens. So in I think I didn't say this at the beginning. So usually the deposit is when we transfer funds from the Ethereum to um any other
blockchain and then the withdrawal would be the the opposite um the opposite flow, right? And this is the the nomenclature that these bridges um um attributed to each of these um these names. Let's say then we have these these labels source chain and target chain SC and TC. So these are source chain uh uh related state changes and target chain related state changes. So these token deposits and token withdrews basically these represent events that were emitted by a specific um contract bridge contract um asserting that a certain token deposit
was made. Right. um we retrieved simply events that were emitted by the bridges by the bridge contracts and fill in this the these facts these declarations. We have ERC20 transfers um the the usual prompt to amounts we have transactions uh transaction data and then we have these four different facts that are basically those static um uh they come from those static configuration files. So the first one is the bridge controlled address. So we have a set of whitelisted addresses that we know that belong to the bridge. We have token mappings to map tokens in different blockchains. So how do I know that the
contract I'm specifying on the other side is actually the same as as I'm I'm sending if I don't have any kind of text uh that's making this this conversion which was the the the case in in these in these solutions. we had crosschain transaction finality. So we um define in seconds what is the finality that should be uh or what is the the period that should be respected before the destination transaction is accepted um in relation to the the first one in the in the source blockchain.
uh we'll see that it's a bit different from no nomad and roy because nomad has a a different um a different process let's say and and finally we have the the rapid rap native token so we were able to specify what exactly is the address of the wrapped token or the the n the the version of the rap um native token in a specific blockchain right then we go into the anomaly detection Right. And the anomal for the anomaly detection we had um we divided the rules into two different things two different um categories.
So the first one is what we call isolator rules. This is what I was talking at the beginning where we have rules that are just taking the state of one blockchain and the analysis is independent of anything else in any other blockchain. On the contrary, we have dependent rules where we have state changes being um evaluated uh against and dependent on the state of any other blockchain. So you have a bunch of isolated rules and then we have um dependent rules that basically evaluate the flow end to end.
And in order to model these rules, we have two different options. And it's it's interesting you know this is the usual um uh decision that people need to make when we have some kind of um uh intrusion detection system for example. So we have anomaly based systems or we have signaturebased systems. In the first one, uh, we usually model what we are expecting as behavior. So, we can model everything that's supposed to happen and what does not fall within those rules, it's an anomaly.
Or we can just model specific things that we already know, specific attacks or specific anomalies, and everything that falls in those rules, not outside, is an anomaly. Of course, the first one is a little bit more prone to false positives because we can probably model the u the state changes what's supposed to happen um wrongly and therefore it's a little bit more prone to to false positives. Um, in terms of coverage, of course, if we're just relying on a set of signatures and finding things that have this specific signature, uh, we can identify only known anomalies. Uh, whereas if we have an
anomaly based, we can find new anomalies. And of course, um, anomaly based usually heristic rule based. Um well signature can also be a role based but usually relies on this database of signatures um in order to to define um the the signatures. So in this paper we focused on the anomaly base specifically because of this new anomalies right. So we wanted this was our main goal to uncover um anomalies u or find uncover the anomalies in crosschain bridges um that were were were not discussed yet.
All right. So let's go into um let's say a little bit of of uh uh in practice or seeing an example in practice. So this would be the the first rule for example, right? So we have something like uh something that happened on on the the source chain um and we need to assert that something a transaction was a valid native token deposit. So this needs to ensure that there was a valid deposit of native tokens by the user on the source blockchain. Um and it would look something like this. So the the on the first the the first um declaration let's say not exactly declaration but uh uh the first thing being evaluated would be um the
source chain token deposit. So if there was an event emitted by the bridge um in this transaction with a specific set of parameters the we we have the destination source tokens the the chain ids where where this transaction is supposed to land on uh we have amounts then we have native deposit. So this is an a deposit of native tokens. We need to have also an event of the wrapped version of the the native contract, the the native token um asserting that there was a transfer from the sender into a a bridge address uh with a certain amount. This bridge address is here um asserted as being
something that is controlled by the bridge in this source chain ID. We have we of course need the the the transaction uh the amount needs to be sent natively as well. Um we have token mapping. So we need to uh assert that the tokens that are being um uh transferred from the source chain to the target chain or the the uh these two are equivalent to one another and they are not different tokens. Um we'll see in a second why this is really important in the in the results. Uh we have a asserting that we have the the the source token is the the rap native uh version um of the the the the rap token
basically. Uh so rapther in in Ethereum for example and we assert that the the the events have a specific order and usually the bridge emits an event after the token emits an event. Right? Because um when the bridge emits an event saying there was something something happened um it's better that the the bridge already has the that those funds those tokens in its control and not the other way around otherwise people or offchain entities would um understand that there was already some kind of event emitted and state change done but the actual tokens were not transferred yet.
So this would find um some kind of um this kind of anomalies. So if tokens were transferred by the user but the bridge contract did not emit a token deposited event then uh there was something wrong because tokens were transferred but there was no acknowledgement by the bridge contract that that had that happened or the other way around right. Um yeah, this is basically what I just said. It's for being in writing for the slides. Um so we then have rule two which is exactly the same but instead of having native token deposit, it's an ERC20 token deposit, right? So it ensures that whenever a state change
involves the transfer of ERC20 tokens, the bridge contract also emits an event and it corresponds to the the first um event that was initially emitted as well. Then we go to the other side when we're depositing the tokens. So we have on the target chain the value deposited native tokens. Um in T and and S are the represent the source and target blockchain. Um we have then of the first dependent rule where we have the uh rule one and two. We have the deposit of tokens on the source chain. Then we have the deposit of tokens on the target chain.
And then we have the crosschain transaction value deposit that basically maps the state changes um of all these into uh and analyzes the flow end to end. Right? So it would look something like this rule four. So, we have a an event um uh or or we have a a valid token deposit on the target chain of an ERC20. Um and we need to match these with either one of these, either a valid native token deposit or a valid ERC20 token deposit. And the reason why we don't have also here a valid native token deposit on the target blockchain uh is that because we saw that was not
something that happened. Usually um when we we were transferring funds to another blockchain in the other in in the target blockchain um the native tokens were never used. Right? There are some solutions now that that do that but they're kind of specific um and they don't really fall in this this model that we have here. Uh and then we have to assert certain things. For example, the crosschain transaction finality. Um so again the transaction on the destination blockchain should be after a specific period um compared to the to the transaction on the source chain. And then we have token mapping. So we need
to map tokens on these two chains and ensure that token we're transferring is exactly the token we're receiving. um because in this case we have no no kind of um uh swaps of tokens um and yes and ensuring that the finality is is actually guaranteed. Right? So um as an example again if we failed to comply with this rule then indicates that tokens were moved only on one side of the bridge. So a deposit happened on one side but not nothing happened on the other. Uh or you know the crosschain transaction finality was not guaranteed which is actually something that happened. Um and so on so forth
and then we we have this flow for depositing tokens and in this case we had to repeat the whole process for the other end. Right? So for the the withdrawals uh there are some protocols right now that you know not just right now but in the in the last couple of years um that do not have this distinction of the direction where the transfer is happening. It's just a crosschain transaction and the crosschain message. Um but in these cases we had to um distinguish between the deposit and the withdrawals because they were a lot different. So it's exactly the same steps basically a little bit repeated uh but we have a valid native token withdrawal on the target chain a valid ERC20 withdrawal um
on the target chain as well. It ensures again this mapping between token contract and bridge contract in the transaction data. uh we have the token withdrawal on the source chain and then finally the crosschain transaction um evaluating the flow end to end of withdrawals from let's say the the small blockchain into Ethereum back again. All right. So this is so these are the the the rules that we defined. Um they were defined by looking at how these protocols work by interacting with them um and see um and analyze a bunch of different transactions um out there in in these protocols. So we performed a
small performance evaluation just to make sure or just to to show how much time do we need for each transaction received to get processed. Um and it's really interesting here we have the the transaction receipt processing time. Um this is a cumulative distribution and we can already see that um for Nomad and Ronin uh if we select the the orange and um uh basically both oranges a little bit one darker than the other. Um, so we have non-native tokens being being transferred, right? So these are ERC20 token transfers that we're we're sending
or users are sending and these are pretty kind of fast to process. The problem happens when we have native tokens and um and both Nomad and and and Ronin have a little bit bad performance and Nomad specifically because we found that a lot of these transactions actually had internal transactions and the value natively was transferred in those internal transactions. which means that we need to make extra RPC calls in order to get the internal transactions and validate the the the the value being transferred is effectively the value that the bridge is expecting and therefore it takes a while and and uh since we don't have um since we use
public RPCs to do this um then native extracting information from native token transfers was um a bit harder. So if we look at u the uh just at the median um times in terms of transaction processing transaction receipt processing time we see exactly the same the same stuff. So in Ronin uh for native tokens we have 0.35 seconds for each um non-native tokens 023. The difference is is not a lot but um u but there is a difference.
And then in OMAD we have this this huge difference native tokens uh 078 almost reaching almost a second for each transaction received which is really bad and non-native um transactions taking uh 0.19 seconds. Um all right so in terms of anomaly detection results so again let's start with the isolated rules so the rules that don't depend on the state of any other blockchain.
So the first finding is is this. So attackers use low value tokens usually with the name of known tokens to interact with bridge contracts and these are marked as fishing attacks now on like ether scan for example um because users can be misled into using these fake tokens is thinking they're real real tokens right so I can just create a token with the name and the symbol of of an existing highv value token in order to uh fool people into interacting with the with the token and probably uh pumping the the value of of that coin.
The second one is that over $26,000 uh dollars worth of reputable ERC20 token transfers were sent directly to bridge addresses without using protocol contracts. So what it means is this is that what this means is that usually when we want to transfer funds we need to go to the bridge contract and the bridge contract now manages the whole process and transfer the funds um in and we we had to approve that first of all.
Uh but transfers funds uh does the the crosschain logic emits events and something that is triggered to to the other side. If we just go to the ERC20 token um to the contract address and send a transaction transferring funds to the bridge address, it's not triggering anything, right? So, uh a fifth of a million dollars were basically donated to bridges because people just sent those tokens directly to the bridge instead of um interacting with the with the protocol contracts. And this is actually very interesting because a lot of UIs had this at the time.
um insane for users to not do this because it would be uh or lead to a reversible irreversible loss of funds. Um but it actually appeared really common to have this this kind of behavior. Um then we have the attackers interacting with bridge contracts providing fake tokens with symbols and or names equal to reputable tokens in order to deceive the bridge to un unlock real funds on the destination blockchain. So this is kind of similar to the first one but but not really. So on the first one people were just transferring funds and involving the bridge contract in in those transfers.
But in this case, um, attackers are really trying, people are really trying to interact with bridge contracts and trying to bridge funds to to another blockchain, but they're providing the addresses of the source and destination tokens um are are fake tokens, not the real ones, right? And uh if there is no token mapping, as I was saying in the beginning, uh then the bridge can be deceived into unlocking real funds on the destination blockchain. um if it has no kind of um token mapping verification system.
All right. Well, into into the the good stuff. Let's say um rules that depend on the state of other blockchain, right? So, we have things on one blockchain that depends on the state of another. So, in finding form, we have 37 instances where the protocol defined finality was not satisfied. So in Ronin um the the offchain validators before doing something on on a destination blockchain they would need to enforce the source chain finality period to enroll this was about 45 seconds right so everything that fall be um behind that that 45 second um time would
be something that would would wouldn't be like advisable to do because uh there could be some kind of uh revert or fork in the in the in the source blockchain. And we saw that this is latency over the value. And we saw that a lot of um transactions were actually beyond that 45 or before that 45 second window which means that they didn't respect that um that time that should be enforced um in order to um to avoid kind of kind of problems with chain reorganization in Nomad. So Nomad works a little bit differently. So Nomad was an optimistic
bridge doesn't exist anymore. Um and the idea of Nomad is that we have a specific period where transactions can be challenged and if they're not challenged in that period then they are just optimistically accepted and we can then withdraw the funds uh automatically without having to prove anything. So we have to prove in that period where some challenger um watcher there are a lot of names for that they need to prove that in in those uh in that uh um in that window that a certain transaction is malicious and it's called fraud proof window usually.
Um so the the the Nomad um bridge had a a fraud proof window of of 30 minutes which means that all transactions were accepted optimistically after 30 minutes and it's interesting because the the the data it's actually building this wall auto automatically. Um but we found this five different crossing transactions that were accepted by the nomad bridge uh when they shouldn't um they shouldn't be be accepted in this case. Yeah. Um this is exactly the same the same as um the the latency of the crosschain transaction over the the value of the crosschain
transaction. And we have a um a few transactions with a with a bit of funds um in involved in these. The next finding um was an anomaly where a user submitted a transaction that deposited 10 dai into a recipient address that was actually right pattern instead of left pattern. This seems like a really neat peak. Um, but the the idea behind this is that we do not have protocol safeguarding users against these kind of incorrectly formatted inputs. So what happens is we have a bunch of different blockchains.
These blockchains may have different uh formats for or different sizes for um addresses and therefore the bridge was just accepting anything that the that the user was sending. Um and probably the user this user was not really interacting using the the UI uh was doing probably a transaction uh like a manual transaction let's say um and they they u probably mistakenly right pattern instead of left pattern which means that the address actually extracted by the bridge was a bunch of zeros and and something else right um or or the opposite uh something else and a bunch of a bunch of zeros, right? So,
there should be some kind of um of way of enforcement um of saying that probably this is this is not something that the user was supposed to to insert there. And of course, these funds were uh were simply lost, right? So, no one could could recover these funds that were sent to to something to to uh to a wrong address, let's say. Um then we have um one of the transactions. It's really interesting that they deployed actually a new contract on Moon Beam that was mapped to a token contract called wrapped GLMR.
GLMR is the native token of the Moon Beam blockchain. Um and the interesting thing is that this already happened or did this already existed. So this mapping of the GLMR or the RAP GLMR um was uh already existed and was already mapped by the bridge. So there were a bunch of transactions using those tokens. But the bridge actually allowed a new token being deployed on on on Moon Beam uh with a contract called Rap GLMR with no value at all. um and allowed the um mapping of that token with the existing real um uh wrap GLMR token on Ethereum, which means that basically the
bridge or the the the the operator of the bridge uh just lacked a complete token contract verification just allowed this these two uh token contract that that were not related to one another uh to be mapped. to to one another. In finding seven um we have up to $4.8 million stuck in uh these bridges due to serious usability issue and the idea was that uh a lot of deposit of tokens in one blockchain did not have a match on the other side of the bridge. Right? Uh so we at the first the the first time we
saw this we were like okay so this is probably because of the attack because we were studying the specific period where the attack happened and therefore if the bridge is paused of course there are a bunch of transactions trying to withdraw funds but they are not going through because the bridge is paused. The thing is that the majority actually occurred during normal use. So this is for the nomad bridge. You have the data over the the the number of events emitted um to to withdraw funds. We have this big bubble red bubble here which is um it represents the unmatched events at the attack when the attack happened on the Nomad bridge. But what we can see is that actually the the unmatched
transactions kind of follow exactly the same pattern as the match transaction. So there were a lot of transactions going through but also a lot of transactions that were failing and something happened on one side but nothing happened on the other. And this is for Ronin right exactly the same pattern um where um a lot of transactions didn't have um didn't have a a a match on the other side. And it was interesting that this was only in one direction. So it was not when we were depositing tokens from Ethereum to to the other blockchains using Nomad and Ronin, but the other way around
and um actually I was I was probably going forward. Yeah, I'll go back in a second. Um and the problem here was that when we were depositing tokens from one side, the the offchain uh relayer was actually sending the tokens directly to the user um automatically. So the user didn't have to make any kind of transaction in order to get those funds uh when transerring from Ethereum to another blockchain. However, the other way around when transferring from the other blockchains into Ethereum, probably because of the gas fees, the user was left with the um um the requirement of having to manually withdraw funds from
the contract um once the proof was relayed there. which means that the the the process was not like controlled uh 100% by the bridge or the relayer as in the deposits and in the withdrawals the user was always um needed always this this kind of um of transaction and the question is this that's here. So what if the user doesn't have enough funds to cover for the gas fees? What if it's the first time that the user is interacting in this blockchain? That's why they wanted to transfer some some tokens here and they don't have funds to cover for this.
So, currently we have some solutions that already solve this. And this is probably not a big of a deal um anymore because we are able when we deposit tokens, we're able to specify uh that we want some um uh some tokens um some native tokens in order to make these these kind of transactions. Uh but at the time this was this was the um a big problem, right? Um and main finding is that nearly half of the users again didn't have uh enough ether to pay for the gas fees in the destination blockchain.
So this is um a distribution of balances of those um destination addresses the non zero because there were a lot that were being transferred to the to the n address. Uh so this is the the distribution of balances of those destination addresses um before the attack happened has nothing to do with the attack or the the the the consequences of the attack. And we mark here this uh 0.0011 ether uh which was what was advised by the Ronin bridge uh to pay for for gas fees on the destination blockchain. And the interesting is a lot of them were were below that uh below that threshold but also a lot of them were um um above
that threshold which means that a lot of users sent funds and they actually had enough to withdraw those funds but for some reason they didn't right uh and that's probably I don't know because they didn't know uh because the process was not automated enough and they didn't know that they had to make that transaction Um so a lot of these addresses they had these these um this amount of tokens native tokens but when when we were looking and we manually looked at at the majority of these um they didn't have any kind of interaction with with the bridge which is which is kind of kind of interesting.
And finally the the last finding it's actually related to an attack is to to the attacks that Nomad and Ronin suffered. Uh so we were able to identify these malicious transactions uh that were uh that originated the Nomad and Ronian bridge attacks. Um and actually in the Nomad analysis, we overcame previous analysis by uh uncovering nine additional um EOAs that were not reported at the time in the in the in the reports and 136 more transactions than the the largest existing public data set on Nomad uh that was available on on GitHub. Um and therefore we we could call it a a a success. Uh so the
Nomad bridge attack was really interesting because um it was the same um attacking transaction or the same payload repeatedly submitted um because it was simply a replay attack. And uh what happened was a bunch of transactions, hundreds and hundreds of transactions with exactly the same payload uh just changing I think the address or something. um and people could just forward that to the bridge and and uh and withdraw funds. So there were a lot of transactions where in the no in the Ronin bridge hack was just two transactions exploiting the the bridge.
So we we had a bunch of false positives right. Um so one of the reasons I actually I didn't say but we selected a very small interval of time. So we selected just uh about 3 months of data um because we wanted to analyze manually analyze each anomaly found right um since that was the goal of finding new anomalies and finding things that were not going well. We wanted to model the the the protocols and then everything that folded outside of those rules they were anomalies and we wanted to analyze them manually. Um and therefore uh we we chose this this small period which is represented here in T1 and T2.
What happened was that we found a lot of anomalies at the beginning at the end of the of these periods. And the reason why is simple. You know, if we have some kind of withdrawal of funds here, but then uh the the um counterparty in terms of transaction is already falling outside of the interval, then this would be flagged as an anomaly because we didn't have a a match of that deposit or or withdrawal. So we had to extend these periods um to T0 and D3 um in order to fetch specifically for fetching for deposits or withdrawals that we were interested in these in these intervals uh in order to match the
ones that were not matched previously. All right. So the main limitations of this so the the first limitation of this is that the the modeling was very strict and we were not accounting for such a strict modeling of rules because of this lack of standardization. So every bridge functions it in its own way. The events are in a specific format. uh the actual contracts involved if we involve the wrapped versions of the native tokens or not um and so on and therefore um it is it is possible to extend this to other uh bridges but not without changes. We always need to make changes to to what
already exists in order to fit specifically the behavior of of that bridge. Um and of course um we're relying on the state changes um of of these protocols based on the events that the they emit and therefore if there are breaking changes if the signatures change uh we need to of course uh update the the rules or update the data extraction and the filling of the different facts and so on. Uh the second one is only based blockchain. So nowadays I think at least Solana has a lot of crosschain activity. Uh so it would be interesting to have also this kind of uh things in um in other ecosystems besides EVM based blockchains
and we have small time small time frames into blockchain. So doing something like a large scale analysis interesting uh and this leads to the research the future research direction. So a little bit in the same sense I would say one for for each of those limitations basically to extending this period uh under analysis analyze more more protocols beyond um Nomad and and Ronin and um large scale we we need to and we're actually working on this as we speak um doing something like training anomaly detection models for for large scale anomalies for large scale analysis um and using both the signatures that we already have. So now we have this
database of signatures and we can search for things like this uh or we can find for new anomalies. We find new anomalies um in in in other in other protocols. So yeah I mean this is this is basically it uh just to summarize all the ideas. So we have u recurrent problem um bridge attacks bridge security is is um is is a problem. Um we propose crosschain watcher uh that's composed of three different steps. Um an event and transaction data decoder, a logic relation builder. Um a set of crosschain rules that define the expected behavior um in specific bridges. Um just
uncovered a little bit the transaction processing time and how much time it would take to process a bunch of transaction receipts. We have several findings uh eight findings in in the paper if you'd like to to see them in in more detail and um and I'll just discuss a little bit the the main limitations and future work that can be done on on top of this. And that's that's basically it. Uh do you have any any questions? I'll be happy to to answer. >> Hi, thank you for that. I have a question. Is it okay now to ask?
>> Sure, go ahead. >> Okay. Well, I guess uh you described that you li focused your study on a few bridges. Um but I guess now with aentic models, you could probably go after all of them uh while you're asleep if you if you uh if your university has the budget for the tokens. Well, that's a good point. Um, yeah. So, so that's that's what we're um I mean, not specifically in in Agentic, but uh um I would say that we're going a little bit to a more automated process um and large scale
analysis in terms of these kind of things. Um again, the idea here was not really to um do something large scale. The idea was to make it small, concise, but find interesting insights and interesting anomalies that people were not aware of. Um and the idea was you know besides finding attacks and finding uh you know protocols being exploited which I mean we weren't expecting to find more attacks than the ones already happened uh which I think it wouldn't be um really um um you know we with I think that would be very high expectation. Uh but the
idea was was to find things that were not going well and specifically also user related. Um that could mean that there were things not going uh the way it were it was supposed to to go in terms of uh user interaction and actual protection of the users when when interacting with these kind of protocols. >> Okay. Thanks. U just a follow-up commenter. um all the hackers are using large language models and I guess all the chases have to do the same thing to keep up. But it just came to my mind because I have been in blockchain for 10 years and before that I was in banking.
I was actually one of my first jobs was a swift operator in the 1980s. Uh but just occurred to me that the techniques you have created could could also be used in Treadfi. You probably have the basis of a very profitable startup there. They can go around and find all these lost coins. There's probably all of that sitting in the traditional banking system as well for various reasons. Uh, and you probably have a a startup there that you go to the bank and you charge them 20% or the banking system or charge them 20% to find lost money sitting around which
can be recovered because they're not they're not hidden behind a cryptographic wall. So maybe you should go look for the lost the dead money sitting all over the banking system. Oh, thank you. Thank you for the suggestion. >> Are there any other questions? >> Yeah, I have a couple. Um, thank you for the talk. Um, so my question well first question in in slide 38. Um so the acceptance in the optimistic chain depended on validators detecting
the fraud or in this case rather a not valid transfer right. Um >> so the issue is that the validators just didn't uh detect the the or or somehow notify the fraud. Is is that right? >> No. Uh so it doesn't mean that those transactions are malicious. It just means that they needed to wait for the 30 minutes before being accepted. >> Uh I get that they are not necessarily malicious but they are also not valid, right?
>> Yes. >> Yes. Yes. >> Uhhuh. So So uh I guess my question is should validators have detected that? write it. Yes, I guess >> so it it is only possible to detect. So the thing is there's there's a transaction on on one chain um there is information relayed to the other immediately. Right? The thing is supposedly if users try to withdraw that those funds immediately they will that will fail because those 30 minutes have
not elapsed. The transaction can be valid or or uh or not. Um what happens in those 30 minutes is that those off-chain entities can challenge data that is wrong. But if the data is correct, they don't have anything to challenge. Right? So they just need to make sure that the contract is enforcing those 30 minutes. The problem here was that somehow the contract did not check that those 30 minutes and therefore um someone tried to withdraw before those 30 minutes and it was accepted and at that point the the offchain entities cannot do anything because you know the funds are already released right so it's more like a
monitoring uh process and a monitoring system such as this that could find something like this happening um and correct a a a a bug in in the smart contract. We could not find we wanted to search for this and we wanted to search for the specific contract. We could not find it uh you know the the specific source code that was there. Um because you know it's it's constantly being updated or it was constantly being updated. Uh so we could not actually go to the the to the root source of this.
Um, >> yeah. Could you use Foundry? Um, so it can you can have it so it's essentially forking a chain. So you could point it at Ethereum and point it at a certain block number and then resubmit the transaction and I don't know if there's a way of getting the transaction trace, but you'd need to I guess to really understand you'd need the code from that era that was deployed. >> I think that would be possible to be honest. Yeah, we we didn't try that. Uh but that would be possible. And and replay exactly the same transactions in in that um in that specific block number. Yeah, that's actually a good thing.
>> Yeah. Just to understand what happened because you know I as you're saying the contract should say it's impossible but somehow or other they got their money out. >> Yeah. Um okay I have more questions uh can I go on? Yeah please go on now. Um so uh okay just so just to finish the previous question so then the validators role of validating is actually uh I mean so the problem of timing is actually out of scope for the validators right uh is that I mean the transaction itself is valid just if you look at the bigger
picture the bridge should have done something different but the validators did their job Yes, probably what's what's confusing is that in this case we probably don't call them validators because they don't validate anything, right? So usually we have this process where there's an entity asserting that something happened and publishing approved and in this case we have simply just relayers. We have something that information being relayed and then we're not relying on something someone validating. we're relying on something saying that something is wrong but what you said is is perfectly right.
Right. So I would just correct that that naming because it may be misleading in terms of of thought. >> Yeah. Okay. Okay. Um in another question in in slide 41. So you mentioned that the new wrapped GM um token. So the new address over the original good one >> uh no uh it was just a new contract uh that you know you and I could deploy uh and it had that name and that symbols everything equal to the the normal let's say the value one. Yeah. But I guess I'm
asking does the the bridge contract in the receiving side have some kind of index of receiving contracts or how >> there's a mapping of tokens. Yes. Yes. So uh usually uh in these cases they maintained a list of mappings of source token destination token um and what happened was in in this transaction there was um a state change saying that this new token that's I think invalid was mapped to the real one on the other blockchain. Which means that up until that point, if we try to withdraw funds using the fake tokens, then we could
unlock real ones. >> Uhhuh. Okay. So that's I mean that sounds like an actual attack, right? Uh >> yes. Uh you know it's not an attack per se, but uh it's uh it's the base for the attack afterwards. Yeah. Okay. And another one last one in slide 43 and 44. Uh so regarding those 4.8 million stacking bridges, did you try matching those trans those unmatched transactions to public complaints by users of the bridges?
>> Uh we didn't we didn't match with public complaints. Um I remember we saw a couple in like uh forums where people were trying to withdraw their funds and they they they couldn't do it. Um when we started looking at the balances of the addresses and we when we started seeing a lot of users didn't have any kind of activity um then we attributed the calls to the the lack of gas fees to cover for the for the um funds to cover for the gas fees. It does not explain however the ones that had uh enough funds to cover for that
and didn't issue transaction and because it it was so weird we actually checked a lot of them right and there are hundreds in um in each of them right actually in Ronin more than 5,000 we we checked a lot of them and a lot of them didn't have any kind of um any transaction to um to the bridge contract >> and have you tried reaching out to the bridge owners to ask about at least at least about the biggest ones because I imagine if from some amount of money people would start making noise, right?
>> Uh I mean that's a good assumption. I have no idea. Um so in Nomad I think it's it's a bit lost because the the bridge was never recovered after the attack. um and it's it's um not active anymore. So um I think the the refund process of users uh is still ongoing, at least the last time I checked. Um for Ronin, I have no idea to be honest, but it would be interesting to check that. >> Okay.
>> Oh, thank you. >> Yeah, and Ronin have moved to OP stack. So they're going to have a completely new bridge. So, um, yeah. >> Yeah. And I think they're also using CCIP, I believe, uh, or some other new >> Okay. >> Uh, bridge to do some stuff. >> Could be could be. >> Um, so on I don't know, it was slide must have been 36 or something like that. It was Ronin where there were some um dots that were before 45 seconds and then yeah that one there. And so I was looking at that and I was thinking, you
know, and I know you said there was a peri time period that you did your analysis over, but like were those dots related to I don't know early in the blockchain's ex in the bridg's existence or you know did you work work out why that might have been the case or is that because it just seems crazy that you that could happen. Yeah, we we searched for uh different changes in the uh in the actual uh software of of the blockchain, right?
And see if these 45 seconds were uh were different in or were changed and were probably smaller in a specific time. Um but the the documentation was actually updated um we we saw on GitHub updated before this, right? So um it it was based on their documentation of course right I was not measuring the the the block time by myself um and uh yeah so >> but yeah it's it's um it's not also not as um how should I say it um so in in Nomad it's easier to see this trend right and
transactions are really really going up in u um from this this 30 seconds 30 minutes and here it doesn't seem like there's a specific trend here um which was also something that we were thinking of you know is this something uh could there could there be something wrong here but the thing is also 45 seconds may not be enough to uh make the validation process because in in Roland we have the validators and the validators are computing um proof proofs between one another and actually it the the actual processing time could be sometimes a little bit higher than this 45 seconds um and more towards the the
the 100 let's say but that's just um a possible explanation I don't have a reasoning for that. >> Yeah. In two slides time for um for Nomad. Yeah. Why is it that there's that line at 115 days? Why? >> Yeah, this is it's a usual question. Um, so what happened was the the bridge was paused and then it was uh they got that back up like a few months afterwards. >> Um, and those are the withdrawals that were matched uh that that were completed at that time that were initiated in the beginning and those were a bunch of
false positives that we were having that I was saying at the end. So, we had to go into that that extra bit and get the the the final withdrawals there just to match the transactions that were uh unmatched due to the Yeah, due to the the bridge being paused. >> Yeah. Okay, that makes sense. All right. Um yeah, look, I I mean there are all sorts of things that I ponder about. I mean, but it's fantastic research. So, thank you very much for doing it. And I I think um I I think the ideas that we've had about and that you've obviously all already had about automating stuff um so
you can cover more bridges and expanding the tone. It just um yeah, there's so many possibilities to um learn and um yeah, it seems very interesting. Um are there any other questions from the audience? Andrea, is there any question that we should have asked you that we didn't ask? Some probing question that would have put you on the spot? >> Um, well, I think to be honest, it's uh um Oh, there's one usually which is about real time or not real time.
>> Ah, >> because this is based on data log, right? Um and uh one of one of the questions we we get asked a lot is whether we could do this in in uh in real time actually or not. >> Um and because it's based on data log, I wouldn't say so. Right. >> Yeah. >> Um >> so again the idea was not really to build something production ready, you know, real time that we can plug in directly. was to do more this historical analysis of of transactions and therefore um it's it's not supposed to be used in in real time, right? So we would need other types of solutions in order to do that.
>> I think that would be the the the one we get a lot. >> Yeah. Yeah. Yeah. Okay. That's that's interesting. I know at immutable we use hexagate to match up transactions to make sure if one part happens the other part happens and you know all sorts of u metrics and that's real time. So I guess you could you could change what you're doing slightly and come up with a competitor for um that sort of bridge security um organizations. >> Yeah.
>> Yeah. Basically. Yeah. I the logic is is all the same. uh the the way or the thing we would need to change is the way of uh extracting information first of all because um it would be important to get not only when transactions were already accepted and you know they're just gone uh but probably like monitoring me seeing if there's a transaction uh targeting the bridge trying to run that um and see if if it is uh going to cause any harm and then like closing the bridge immediately for example uh but the actual rules are can be kept the same if we try to do it like this. Um and uh but the the data extraction process uh would be would be
different of course. >> Yeah. Yeah. Yeah. For sure. >> All right. Look, thank you everyone for coming along. Andre, thank you very much for doing a wonderful presentation and um I u good luck with writing up your thesis and doing your verbal defense. Thank you. Thank you for having me, guys. >> Yeah. All right. Have a great evening or day, everyone. Um and talk to you all later. Bye-bye. Abriato. Abriato. Andre. Bye.
>> Thank you. Yes. Have a good
Related talks
- Security of Crosschain Transactions and Bridges
- How to Hack a DeFi Protocol
- Common Vulnerabilities in Bridges
- Breaking Bridges - An Incomplete Sampler of Bridges Hacks
- Not Quite Water Under the Bridge: Review of Cross-Chain Bridge Hacks
- Securing a Cross-Chain Bridge
- Pre-Crime and Library Upgrades: The Future of Omnichain Security
- Securing Cross-chain Communication by Nithin Eappen | Devcon Bogotá
- Mitigative Measures for Bridge Exploits
