Analysis of DeFi Tradings and Risks through Network Science - Natkamon Tovanich
EthereumZuri.ch 2025 · 31 Jan 2025 · 19:02
Natkamon Tovanich applies network science methods to analyze trading activity and risk across DeFi protocols. The talk treats DeFi activity as a network science problem, considering what patterns become visible when protocols are examined in relation to each other rather than in isolation.
Speakers
Topics
From EthereumZuri.ch 2025, hosted by EthereumZuri.ch.
Transcript
[Music] so thank you very much for the introduction since I have 20 minutes so I will uh talk about one of the work that's happening in my team and uh as um the presenter uh the the MC said I am from blockchain at X Research Center and we are looking for the twoyear post position in blockchain and defy in economic or in computer science so just please contact my boss Julian Pratt in this email okay so uh today I will talk about the content risk in financial Network so starting in 2008 right so you have we have um big subc crisis
happening in us and then we have a the de Crisis happen in the European countries yeah and uh during this time there is the rise of the interesting of the interest in among the network science community among the finance and economic on why such the shock propagate okay and just such a small shock like for example when gree say that they cannot pay the debt then every country in Europe just start to be um let's say uh worry about like okay what will happen next okay that is because it's Network effect okay so people may uh heard about Butterfly Effect right about the contagian like the epidemic like
covid-19 right so in this thing in financial Network it can start from for example like in this network Greek bangr so they cannot pay the debt then it's a fake front and then with this interconnected system in the end this risk will propagate throughout the entire Financial system okay so financial institution is interconnected Network and then you can find the relationship like okay Greece owe the money to France France owe some money to Germany and W Versa and then the collapse of one country can just propagate this chock to the network so it's a the phenomena is called to connected to fail so in um our research
question because we work on the decentralized finance domain so we want to try to analyze if this kind of systemic risk can happen in decentralized finance and how can we evaluate this so uh if you are not familiar with the l and boring protocol so we use comp power V2 as our example so in this system we have lender who just deposit uh your token right and then you get C token as the guarantee of your deposit and in decentralized finance in defy if you are borrower you first need to over collateralize your asset with some token and then you can borrow right so this is how uh the
things if everything is like go or go go go on right like for example like ethereum price just uh and bitcoin price go up forever then everything is fine except when there is a the the chock you know like for example the price of ethereum drop 20% and at that point someone will get liquidated because uh their help ratio just reached the threshold and what they do to make this uh system uh continue is that you will have uh Liquidator and most the the bot right that try to liquidate you so they see your collateral plus some plus some let's say premium that is the incentive
for Liquidator to try to look for the liquidate account and then try to liquidate as soon as possible and then this this this is a story on how things going to happen and usually when uh people monitor about what happened in the decentralized lending protocol you can look at the utilization right and then you look at the interest rate because the interest rate is derived from the utilization but that is not a part of the full story because now you know only one side right on the asset side you know how much money have been loan and how much money you have left as a cash flow in this in this Landing pool right so what we do in this work is that we try to model uh the balance sheet of
lending pools so you have two part right you have a asset and then you have a liability and usually the the liability is that people uh deposit your uh deposit the tokens right some people will do it just for PE deposit and some people just use it as a collateral to borrow the other asset so for example like the guy just uh deposit eum to borrow stable coin like usdc and in this case we can find the link right between the collateral assets ethereum and usdc so this is how um pools are are connected and this one we can because in blockchain we have like the granular
data okay but uh some somehow I we use the graph to collect the data and somehow the data is very noisy there is some error so we spend a lot of time to fix that and then we can try to monitor the balance sheet over time so this is uh for one snapshot day so you can see that there is a ethereum pool that is big and followed by die and usdc and on the on the other perspective because we uh can find the link between each Landing pool right so for example in this case ethereum has been used a lot to borrow usdc and to borrow CI and you can see that uh it's it's um for for finance people it's a bit weird that
like you you have a usdc or you have that and then you just borrow the other kind of stable coin okay and you also have a lot of self borrow and that's is because uh in decentralized lending in compound you issue the com token and com token has some market price so that's why people just like do some uh sale borrowing to try to get this token to maximize The Profit right but actually you can see that because most people use cryptocurrency asset like ethereum to borrow stable coin and that is uh in finance it's called repo insurance so you can see this kind of Link because uh in the end you have stable coin to do
whatever you want and you can and you also have the which have the value equal to the eum because uh it's a it's a promise that you can just retrieve retrieve this money anytime you want okay if they have the money for you okay yes t yeah because it's a really small pool yeah so okay so um what will happen the uh Judgment Day catastrophic day is that
let's say that in one day but it's never happened before like ethereum price dropped by 50% so that mean that many account you got liquidated right so what is encoded in the smart contract is that this account are up for liquidation so that is the people who do liquidation sees the ethereum but in this case what they liquidate is not enough compared to the original amount so you uh post the bad loan to the system and in this case the pool have negative met wordss and in the financial um literature if the pool have negative Network it's going to trigger something called Bank Run so if people
realize that this um let's say this pool have negative equity Network then everybody will come to the bank and then we try to withdraw the money and that is the when the bank is default so they are collapse okay so um in our our our previous work uh we try to simulate the liquidation under the shock the price shocking like 50% 100% and see that how many pools uh that uh this this uh this this impact just propagate okay but this is the previous work so what I'm going to talk about today is about the contagion in the bipar graph because what we do before is that we just
consider the interpool network in which we just project all the user into the pool but now we want to try to uh look into the perspective of the user okay and in this case it can uh count as a bipy graph where on one side you have the user who deposit or who borrow on the on on this uh lending pools okay so it's like the link of liability between the pools and the user and in this case you can see the picture of the network snapshot so you can see that liquidity pool now are not directly connect but they are connect through the user so the that that mean the diffusion of shock just pass to the user and what we do is that we try to simulate the
propagation of shock in this bipad high graph and try to focus on which user is more critical to the system so this is the empirical anal analysis okay so we we we just like uh select one random days and then we look at the distribution of user and you can see that in compound most people are just dust uh users because they just deposit like less than uh 10 US dollar and that's because when you um try to perform the action in in uh in the in blockchain in ethereum right sometime you have some delay between the time that you intend that your transaction will be included and the time that it actually includes so you so we saw a lot
of dust user and you can see that there are the in in in the second chart the right in the in the middle chart you have the big user but big user you have the Red Dot which mean that they are they're doing mostly self borrow so in this case it mean that you have a user then you borrow you deposit to to the pool and you also borrow from the pool so that is the loop effect okay so you see that the top one is do the just a sale borrow and then you can see that if there is the rich people okay Rich uh deposit big depositor or big borrower in in such a pool in the concentration index yes yeah it's just a wallet yeah for so
so so each one is the the account Y is the wallet yeah so we we didn't uh agregate or do the clustering yet so the framework that we use for now is that we use a de rank which is widely used in the physicist Network s and this one uh in this uh de Brank algorithm they uh measure systemic risk because they measure how financial distress okay distress okay it's not the just a real am it's not the real amount it's just the distress okay propagate across the interconnected entity so this one is a classic paper and what we do is that we uh perform the de br simulation on this bip graph so we start from like let's shocking the etherum price to 50% and
then we check who got liquidated under this situation and then we cascading impact based on this algorithm and then see uh which uh user can propagate a lot of the a lot a lot of the loss throughout the system okay so what we we can what what we perform is that we um perform the shock side right from 10% to 50% and you can see that uh if you have a my price shock for each of the top pool like die eat usdc usdt and Bitcoin you see that you have some uh stress in in in in the system so the more the the chock price the more intense this the de rank okay this this uh financi this
stress is in the in for the entire network okay and you can see that over time after 23 you can see that that branks go decrease over time that is because the the pool accumulate the network so they have more more Equity but they also have the a lot of reduced activity in the user because um people after 23 they just move from compile to a or to other activity in defi we can also measure the shock amplification because we start from the initial loss from the liquidate user right the the account that under liquidation but then when you you use this algorithm you can measure how much stress propagate to the system and you
can see that there is the amplification not like two or three time but 10 or 20 times okay I will mention again that it is not the real number it's just from the dep rank um de Brank propagation equation so we can see how uh this stress can reach everyone else in the netwk okay so you can see that even minor liquidation can cast case uh significantly into the loss okay from the de Brank simulation and the amplification is nonlinear so you can detect a critical user in this case because you can calculate um the loss propagate for each user within the bipy network and you can see that the the the one that I label
with the account they are the larger borrower that uh propagate a lot okay to the to to this the entire network and the top three is the you can see that they are um um year Finance they are Moro and they are the account fund by Ken so this one propagate loss our margin trading accounts we can also look into this graph you know right because you can have a linear loss right oneon-one or you have uh something like not so linear and you can see each strategy that each user use for example like mofo they deposit a lot of ethereum and but they also with the other asset
just for the self borrow and that's why they propagate more compared to uh the other strategy so this is uh what we we can find from this simulation and uh so what we do in this work is that we try to outly the methodology to model the systemic risk in uh decentralized Landing we identify that there are two main function of compound you have report insurance you have liquidity Mining and uh we conduct uh stress testing on the bipar graph to access the systemic risk how it propagate throughout the network and we can identify the critical user that possibly propagate this throughout the system okay and uh but there are a lot of thing
to be done so we want to try to find the factor like why this guy has uh is more systemic risk than the other maybe because there is a strategy that they use to invest in decentralized landing and because because the de Brank is the algorithm right it's just based on some uh let's say that uh let's say that uh there some loss function okay some LW some distress function propagation but we have a new PhD in apply mathematics and economics who will just uh do uh more realistic modeling like for example when the when the price drop then the user got liquidation but if you have big liquidation it can also reduce the price
of the token so it's more like feedback loop right in into this system and uh this one will lead to the more realistic um simulation of the risk in the defi system so thank you very much for your attention and I am happy to answer the [Applause] questions thanks for the speech um any questions yes thank you um what was the decision made uh to take a look at the compound protocol instead of other protocols
that's basically my question H because uh back then uh three years ago compound is still the leading uh decentralized Landing protocol and then we start to collect the data by that time and after three years uh we realized something but now we try to extend it to a and mofo yeah but I think for they use some different system so we need to study the the the paper the the Y paper on that okay you know clear um our question would be um coming back to to the question that I had with defining the user using interconnections between different wets in order to identify like institutions for example FTX and Etc and like to well
basically escalate the research further is there a plan where I know you occurred into so right now we consider that each account is uh independent right but uh we Al we can also rely on The Ether scan label data to group those with the same let's say the same company together yeah so is it in the plans or yeah it's the it's it's in the plan yeah in the plan but we have so many plan but yeah we will consider this into account too yeah other question s you want me to
now can you return to the slide with the the kind of heat maps please uh yes no yeah this one I was just wondering why is there such a huge difference between usdc and usdt ah because in usdt after Luna collapse in compound the colorization ratio is zero so you cannot use usdt as a collateral to borrow anything else in compound V2 okay so it's basically disabled yeah so that's why there is no prop much propagation because they cannot you cannot use this to uh borrow anything yeah other one okay so thanks a lot so thank you very much
[Music]