Introduction to Gridlock: Multilateral Trade Credit Setoff in MPC
EDCON 2024 · 29 Jul 2024 · 15:05
Enrico Bottazzi introduces Gridlock, a protocol for netting financial obligations while keeping firms’ invoice data private. He explains how circular debts can be cleared without injecting additional liquidity, then shows how multiparty computation can replace a trusted clearing agency and discusses the security assumptions and practical constraints of that approach.
Speakers
Topics
From EDCON 2024, hosted by EDCON.
Transcript
hi everyone my name is enrio batti and I'm a researcher at PSC which is a team part of the ethereum foundation and today I'm going to speak you about gridlock which is a protocol for multilateral obligation netting in MPC and this is a joint work with my colleagues Nam and masato so first of all let's start with the concept of multilateral obligation netting which might be new to many of you in order to understand that I'm going to introduce you to two preliminary Notions the first notion is the one of uh what is an obligation so
when a business sells goods or services to another business they usually don't get paid immediately instead what they do is they issue an invoice to the buyer and this is this invoice represents a financial obligation that the buyer needs to pay the seller into some amount of time and the second concept is the concept of liquidity so liquidity refers to the availability of cash of a business and this is important to mix uh their obligations so to pay their bills to pay their customers or to leverage some new business opportunity for
example so let's get into the concept of obligation netting so so the one that you see here is a is a obligation Network an obligation network is made by firms so in this example we have three firms and uh each firm has a balance you can think of it as their cash availability in the bank and uh there are also obligations in this network so the edges that you see represents the obligation between the firms and uh in this example we are kind of stuck because because each firm is waiting for another to make them a payment in order to complete their payment so if we take for example firm one they are waiting
for firm free firm fre to pay them 8K in order to complete their payment to firm two and the same goes to the other two firms and this is technically called as a gridlock situation when you are kind of stuck and the only way apparently that you can solve this situation is by injecting money from the outside so normally one firm will get a loan from A bank and kind of unlock this grid lock but that's actually not the only way to unlock the gridlock you can perform what it's called netting so the netting operation is basically calculating for each firm you see it on
the right what what's their net balance that is calculated by taking their starting balance subtracting The Depths adding the credits and as long as this net balance is uh greater than zero you can kind of remove this obligation from the system and this allows to unlock this gridlock without any injection of external liquidity that might be expensive or might be cumbersome for the firms involved and this is a real example of this concept of obligation Network in Sardinia this is provided by sardex a business and you can see that this
obligation network is made by thousands of businesses and you see colored these are so-called cycles of obligation and each cycle of obligation is a way that allows to remove this obligation from the system so without being too theoretical you can kind of understand it intuitively like if I ow if I owe money to Alice Alice owes money to Bob and Bob owes money to me we can kind of remove this cycle and we are all uh okay all okay all done and how this is done in the real world how would you build this system you you will
probably hire an agency a trusted third party which will receive the invoices from the firms reconstruct the graph perform the netting and return the updated inv vo voices after the netting to the firms and this is not only a theoretical concept this is actually something that already exists in the real world and this is done for example in Slovenia in Europe they are implementing this multilateral netting on a Countrywide level since 1991 and uh to give you some data in 2019 this procedure had clearing over 200 million euro and this came with a
participation rate of 1.2% of the total of the firms in Slovenia and what are the benefits of this U procedure well the first one is kind of immediate to to understand is a direct benefit that comes from the liquidity saving for each firm but there's also an indirect benefit that is more applicable to The Wider Network and a wider economy of a country and as you can imagine greater participation leads to Greater benefits so the more films you have the more likely you are to detect cycle and therefore to remove liquidity from the system and uh this leads us to the
research hypothesis of gridlock and our research hypothesis is that the the use case the application in Slovenia gather uh a low participation rate we we said it 1.2% in uh in 2019 because the firms were required to give up all their data to this agency so they were required basically to give up their their all financial statements they're all business relationship to this government agency and what we believe is that if we allow this netting to be performed in a privacy preserving way there will be higher participation and this will lead
also to Greater benefits to the participants and also to the economy as a whole so now we go more into gridlock and I'm going to touch let's say a few technical aspects of gridlock the the kind of setup is the same that I described before except for a for a kind of crucial thing so on the top right we not we no longer have an agency but we have a set of NPC nodes and their role is basically the same one as the agency but there's a difference of course because they are performing this operation as a secure multi-party
computation so we have this uh set of computing parties and each firm will secret share their data their invoices with with this set of computing parties and uh from the point of view of the Computing parties one node only really have a has a share of an invoice and the share is meaningless doesn't carry any meaningful information about the underlying data in this setup the nodes can perform any arbitrary function f over the inputs and in this case the arbitrary function will be this netting function and uh the data privacy right now in this setup is guaranteed under
some predefined threshold security assumption so if we have four Computing parties we can create a n Out of end threshold that means that only if these four parties collude and kind of collaborate they can then reconstruct what are like the inputs or the outputs of this function but as long as one of this Computing party is honest they will never be able ble to reconstruct the data of the firms and um I kind of alluded many times to this concept this abstract concept of privacy but what this privacy mean in Grid law we have two Notions of
privacy the the one on the left which is the weaker notion of privacy is amount privacy so this means that from the point of view of the Computing parties all the data related to the obligation amount all the data related to the balance of the firm is uh is hidden they cannot see that while a greater notion of privacy is Network shaped privacy which means that even the existence of an edge between two firms is oblivious from the point of view of the Computing parties so in this scenario the the the computed nodes cannot even learn that there's an existing business relation between two
FMS and you can understand why this is a stronger notion of privacy and also it comes with like uh let's say more U Performance challenges and uh just getting a bit into the the technical part this is actually how we Define the algorithm of netting and this is uh in computer science is defined as an optimization optimization algorithm and in our setup we have an obligation Network that involves n firms we have a matrix a of shape n * n which contains this obligation and a a vector B which
is the net balance vector and uh the the goal the optimization problem is to find uh a matrix o Prime such that the grand sum function is minimized so it means that we need to minimize the the sum the grand sum of the updated obligation subject to these two constraints the first constraint is telling us that um the balance should be maintained between the initial State and the updated State and the second constraint which I think is really important is that the updated obligation should be less or equal than the initial obligation so we're not as a
during The netting we are not creating any new obligation we are at least reducing some existing obligation so what are like the Targets in terms of performance so we start from this claim from fleshman that uh is claiming that if at least 40% of the firms in a country will join this procedure this will lead to a liquidity saving equal or greater than the 10% of the national GDP so you can think this is like a very huge achievement if if if possible and uh taking uh the Slovenia us as an example this would equal to
100,000 firms and what we are targeting as a performance is we want to perform the netting for 100,000 firms in less than eight hours using MPC and um just to make you understand on a very high level like performance in MPC it's way slower than what you would do if you were just Outsourcing it to a single agency because it requires a lot of communication between these Computing nodes so that's why we let's say the target is not as fast as you would get into a single player setting uh I wanted to mention also that U this this um concept of gridl doesn't
only apply to this Countrywide netting procedure it also apply to interbank netting and this is something that this netting procedure is already done by Banks almost on a daily basis and of course the way it is done today is not privacy preserving so you can apply gridlock to Banks too you can apply to achieve privacy preserving rebalancing on payment Channel network and lastly another interesting application that I came across is this trade chain detection in a bartering Network so to recap what we discussed
today like some takeaways from my presentation so we got an intuitive understanding of multilateral obligation netting and I think the most intuitive way is just to think about I owe money to Alice Alice owes money to Bob owes money to me so we kind of can simplify this network the second thing is that at least when applied to firms to businesses this generate liquidity savings from the participant which is very important especially for small and medium Enterprises and the more are the firms joining uh this uh this this procedure the higher the benefits for
all the participants and uh as of today days we saw the example of Slovenia and this procedure is done uh using this trusted third party and uh By Design This solution required to give up the access to your data to this agency while what we are doing at gridlock is to replacing this agency with a set of parties that perform this netting operation in MPC and uh by doing that in MPC we achieve strong stronger security assumptions for the Privacy guarantee on the data of the parties so just to conclude this is a
research project so it's not a business it's not a startup you're going to see a paper being published uh around September I guess and uh if you scan this QR code you will find any reference to me my co-authors uh short write up on the project and also any reference any paper that has been referenced during the presentation thank you