ZKPodcast: Centrifuge and zkSNARKs in action with Lucas Vogelsang

16 Dec 2019 · 1:01:49

Lucas Vogelsang of Centrifuge joins the Zero Knowledge Podcast to discuss building an open, decentralized platform for the global financial supply chain. The conversation covers how privacy shapes Centrifuge's design, what it means to build production zkSNARK applications, and lessons from the broader zero-knowledge ecosystem circa 2019.

Speakers

Topics

Transcript

welcome to zero knowledge a podcast where we explore the latest in blockchain technology and the decentralized web the show is hosted by me Anna and me Fredrik [Music] in this week's episode we catch up with Lucas from centrifuge to chat about the origin of the project how privacy plays a role and what it means to build with zk snarks today before we start we want to say thank you to this week's sponsor

new cipher new cipher is a Y Combinator backed company that builds privacy-preserving infrastructure and cryptographic protocols they are currently looking for an engineering lead to work on a new open-source crypto system for privacy-preserving smart contracts this is a brand-new product and you'll get to work on a lot of cool primitives like fully homomorphic encryption and zero knowledge proof new cipher is headquartered in SF but is a remote first company for more about their work have a look at new cipher comm that's n you see why pH er comm or check out the link in the show notes for more about the lead engineer role so thank you again new cipher and now here's our interview with Lucas so today

we're sitting with Lucas vogelzang who is the CEO of centrifuge welcome to the show hi Anna hi Fredrik hello welcome thank you for having me so Lucas is a friend of the show and the summit series you actually helped me program the third edition of the summit yeah I've been to almost all of them I love them they're great events I think we actually met each other through that didn't we I think we did yeah at the first one you did I think as someone passed along that there is this privacy zero-knowledge event going on and so I just decided to show up and I think that was yeah the beginning Wow such a different era two years ago two years ago it's crazy the thing I've been

curious about with you is like I know that you weren't used to work in startups and regular startups web - I never really got like where your transition point happened and also whether or not like zero knowledge was like the moment was that the thing that you transitioned right into or anything before so maybe a little bit of background on what you were working on before and yeah what that point was for you would be cool yeah so maybe like I'll just go a little bit back further because I think actually for me the interesting thing is it kind of started in high school where I was like just loved to coat and I basically by the time I left high school I was designing

websites building products I wanted to do a start-up like right away I started studying and I dropped out after half a year of doing computer science because I kinda started to work on and that actually was successful we built a business we launched something that was all in the in the web 2.0 area that was in 2009 and so I I spent quite a few years in Silicon Valley and working in different things and like many times being like in the very early phases of new projects and so this is this was my motivation and how I was sort of working in in tech in the past and then I I took a bit of an off time in I traveled for a year through South America and I came

back and I knew that like I might not necessarily want to go back to Silicon Valley it was kind of getting boring I wanted to do a tech I really looked for a technical challenge because like the building a company and like just selling a consumer product in a like I don't know Instagram or something like that or even like the way business software works right I didn't want to invent the next slack yeah like that seemed like an in foreign challenge and so the thing is I looked I was sort of toying with two subjects it was blockchain decentralization and AI so for me AI seemed much more sciency and and like a little bit it still be ended up being a product that I probably couldn't relate

to as much and so I decided to go with blockchain first and I actually and so I realized as oh like this is basically brings me back into this open source community that I basically like learned everything in I was like hanging out on IRC channels for like every night as a kid and like learning to like find my way through the UNIX and Linux environment like setting up my computers and sort of contributing to these projects and and and so like coming into Spock J and it's like oh wow like there's actually projects that don't just use open source software like a lot of the web 2.0 startups do but they actually like make their entire business model around developing open source software and found a way to into to make a business out of it to find a business

model that works or hopefully will it's the jury's still out on that and yet like in doing that did you also find like the story of kind of dropping out of university and being a hustler and just getting into it and learning like being very self-taught I imagine did that was that still compatible in this space or was that sort of something you had to like rethink so I mean I think you can you can write your first solidity smart contract without a computer science degree masters or bachelors but then there were like I think there were definitely instances and I still think many times are like wow like what would how would it have been different if I decided to study at ETH computer science

for four years and like spend two years basically doing math which if you're looking at zero knowledge proves and privacy technology right like very quickly you run into into these a lot of math it's a lot of math yes exactly I know I don't come out of academia but I look at ok like these technologies like how can we actually get them to be adopted and so I do I I did have quite a bit of a learning curve and over the last few years I've this is like a significant focus of mine was like making sure that that I stay up to date with everything that's happening and and understand understand these technologies because they are very critical I think to what we are all building because a

decentralization with without privacy I think is not a world we we want to live in your story is kind of an intriguing on it to me it signifies this sort of that the time we're in where you someone comes into this space from web 2 and goes holy there's so much theory and there's so much you need to know like I feel like I need a master's degree in computer science whereas in web 2 and that's absolutely not relevant and like no one needs a programming degree you heard like a computer science degree to do glue coding but I think to make web 3 actually successful we probably need to make web 3 as boring as web 2 because otherwise people are just not going to

get into it and I think I mean I think that's why a theorem is so so successful right because it can make web web 3 coding as easy as web to coding like if you do everything on a public fog chain you basically use it as your user interface as your database as like everything then then actually we've we've sort of achieved that that goal there the problem is it's you like as soon as you start to do anything more complicated it either becomes extremely expensive to do everything on chain or or it becomes or you have things like privacy issues or just a very limited functionality but yeah I agree with you on that I mean I don't think we're completely there but I agree it's a large step forward but it's still like once you get into a theorem

and they're still like so no yeah of Cour the hard things to do and and then you go ok now we want to deploy something oh I just got to spend $150,000 on the audit first oh yeah no flags like that yeah I didn't think about the audit yes that is a line item in every like an every crypto project that is just way too much unfortunately but um I think necessary at this point in time yeah so what was your what was your first step actually into the space then did you join centrifuge or was there another project before that I always built build things and start things this is like the I think third or well depending on how you count I think the fourth project that I was working on

from day one and so building a team and coming up with the idea of figuring out how to how to build it and so it with centrifuge that was actually also my high beginning with talk chain I said ok like what what could we build in crypto and and so my background is I've been in Silicon Valley I was building software that allowed companies to basically get access to finance so you think of a supplier has an invoice outstanding to a large business that this large business tells them we're gonna pay in 90 days the payment terms are 90 days so you will have to wait for three months

until you got your money but you will pay your salaries every month sometimes even more you need to buy and then buy new goods you need to invest in your business and so what do you do you like you either have the cash on hand but oftentimes companies do needs to go to banks to finance this finance these receivables and so we so my co-founders and I actually met at this company called Tahlia which was building a product very much in the web 2.0 way for for sort of addressing these problems is a process called stopgap financing uh certain so it's well it's called I mean generally the categories trade finance you would have like factoring is what

you call financing invoices then there's like supply chain finance like a few different terms I would generally put it into like either factoring or trade finance but yeah so my co-founders and I were actually working Italian doing this we and and so looking into like crypto we saw a lot of opportunity to improve many things about how this is done and specifically like this this power imbalance between smaller companies and larger companies or like a a car manufacturer and a doorknob supplier for example well if the door-handle supplier is a small medium sized business somewhere in in this in the US and and

they go to a bank they they go to their local credit union ask for a for a financing on their and their invoice to the large manufacturer that you're still gonna get somewhere between like 15 20 % APR however if if this big big car manufacturer goes to them to the large banks and they just say oh we want money they're basically they're gonna get it for pretty much free two point seven percent APR or something like that easily met LIBOR plus a few basis points so that's that that imbalance is largely there because this large company has is big enough such that a bank would actually be able to adequately underwrite the credit risk

and and they're big enough that it's worth doing that process and in going through it and then giving them a competitive rate because again the buyer can also go with a large company can go to many different banks and negotiate versus for a small business you're typically not gonna go to 20 different banks and get them to compete those banks won't even play that game because they know they can just give it to someone else so this company that you used to work for this was that was what they basic that was the problem they were trying to solve so we were we were addressing part of that and so the problem sort of that we were that we were addressing was definitely that these smaller companies had better access to finance but it always still relied on the traditional financial

system that made it very expensive for them to borrow just because there was not enough enough a competition and there were like so many cases where this this didn't work and sort of so we said okay actually decentralization and boxing can make this a lot better because it gives individuals or and every entity using this system the ownership over their own data and then think that this can mean that banks can now underwrite this information not just based on the information that a large business is able to give them effectively but also that smaller businesses can can prove their transaction history can serve show what they have and for banks to be able to to do that better and by that being a

transparent more transparent and open market you can you can have more competition and and therefore lower lower prices for the suppliers yeah so what exactly is centrifuged is it a is it a blockchain is it a is it a protocol that a concept like what is it I mean all of those are are remotely technical terms that have become marketing terms so it depends on what kind of what kind of language I should speak generally centrifuge is an idea it's a piece of open-source software it has a blockchain that is part of it but then it also has a period of your network but I think if I

to describe what centrifuge does is it's a a net it's a peer-to-peer network it's a protocol for different parties to exchange data in private and so simplified I would there's an identity piece to it so people within or entities within that network basically use signature keys to sign messages so I would for example if I were to send an invoice to you Ana I would in the peer-to-peer network find you with your public key send this mist send this structured data to you you would actually sign it we'd use it you'd use a blockchain right now this is a theorem but we'll be our own proof of

state chain soon we use that chain to commit to this to this data so what we do here is we we sort of take this in this invoice for example and we calculate a hash from from all the data amiracle root and we commit to that on chain and then that and what this allows us to do then is you can tokenize these assets meaning you can create an NFT that for example would represent in the case of an invoice the NFT would represent the claim on the payment of this invoice and then I can take this NFT and I can go to a bank in quotation marks so go to like a defy lending product or you could actually sell it on it on a marketplace so by selling that n

of T you can now receive financing for this invoice and like back to that story you told about like this previous company it's sort of this is the proof this is using this invoice as collateral decentralized a blockchain defy way yeah and so the idea with with this peer-to-peer network where everyone signs these transactions is that now if I go to a bank and I were to show them this invoice I don't just have my information I also have at your signature and uh so I can prove to them that this is not just something I made up completely but and assigned as well therefore is at least aware of it and sort of agree to it and and so if you have we have the time timestamp that the blockchain gives us and by committing to

these hashes on chain and we have so we have we can like make make statements about our entire transaction history because if I'm if I'm a business that has been doing this for five years and I sort of like show this like show a history of transactions with you for the last five years this is something that can be verified and so so this should reduce the amount of risk fraud risk and sort of underwriting cost for the funding side and so but this is maybe interesting to go into so maybe about one and a half years ago we started building our basically we've built this peer-to-peer networks or building centrifuge from the ground up stack by stack sort of building building layers on top of each other and so about 1/2

years ago we had um these NF tees in a very rough first implementation and we started talking to all these other D Phi products because like wow of course like like we want we want sin fu to be successful we don't want to like build the entire solution day at the whole the whole appeal of decentralization and blockchain is that you have these projects that can work together code code that can function together without having to trust each other and so so what we wanted to build is we wanted to make sure that these entities would be attractive collateral in D Phi and so we worked at the time of Dharma he worked with maker Dow from very early on about sort of trying to figure out how we what

would be needed to have the business get there invoice financed and the realization was that D Phi actually at the time and unfortunately still is not really able to scale to this NFT level so it's it's feasible to finance or to borrow against an e or C 20 token maker can do it compound can do it Dharma used to do that as well right but NFT sort of pose a very different technical challenge which is that they're all have widely different credit risk right an invoice from me is very different than an invoice from Fredrik and so and they have different terms I can split them up I can't give you half of my invoice that

easily and so these challenges we sort of then started building another sort of layer on top that we we sort of felt like we needed to and which is what we call Santa Fe Tinh lake which is mystic tin lake lake yeah like names it's it's a basically a set of smart contracts and then these suppliers can basically deposit their and if T's so you can sort of think of it as an on chain portfolio of assets that then investors can invest into this in entire portfolio so you can have you can set up an instance of ten they can deploy these contracts saying and we're going to use this contracts to finance receivables invoices from the German

small small businesses in with matching these criteria and then serve you by collecting all of these and putting them into one pool the ears we meant in the air see 20 token again said that can now be used as collateral and so this this sort of was this missing piece that we sort of realized about a year ago is ago actually like this blockchain stuff is all fun and people are talking about composability and doing crazy things and this works extremely well with the RC 20 tokens but sort of yet for a Nifty's this is still there's still a long way to go until we have like ways to price some ways to understand them in a non on chain right of course you can look at it and and read out but this is a technical challenge that it's just the scalability

isn't there so we started building that and actually we shipped that mid this year and and sort of have been since then doing first the sum of the first transactions with with actual money and so that's so looking at sender fusion is sort of this entire stack of going from messaging off chain to tokenizing assets to also be able to have ownership on chain two then bundling them to make them understandable financeable by by others and I think you hit the nail on the head with like saying it's about how you pray price these things right where you are see 20 tokens it's still not super technically easy to price them you

need some sort of Oracle feed you need to go out to exchanges and go this is the price of this in your seats when he token but you can do it all in the same way for all of them whereas for an NF t you as your example with the bank like the bank might want to take five years of history like invoicing history into account and how they price this so you can't like it's it's not a you know just a straightforward way you do the same thing for everyone yeah this kind of becomes I wouldn't say it's like technically hard in terms of like code and implementation but technically hard in like you know everyone has a different opinion on what the price of this actually is yeah yeah so we basically so on a technical level this

is it is fairly easy to sort of build this portfolio of assets and then issue a RC 20 against it which is essentially what what tin Lake does but then it also has and so this is where where the words going in the future basically this is exactly this pricing information like where it's coming from the more decentralized the more we have different entities that can do this the better not just because we we we want to avoid centralization at all cost but also because then by having that you can sort of create competition for for these assets right by by having two or three different underwriters in this system who like try to provide pricing information and are incentivized to provide good pricing information by

putting up some sort of stake by having a transaction fee on on these financing transactions by doing that you can you can have the system where all the players are incentivized for it to sort of have an optimal result for the for the individual borrower and the find the lender said the lenders worried about having a low default risk and then act accurate at an interest rate as much as the the borrower's to right just realize this is like a very it's almost like next-level defy like defy right now is still so like use collateral issue like so like sort of low it's very basic and this seems like like a few levels ahead

but then there's there's like a bunch missing between what exists and defied what you're trying to do I mean yeah of course like if you if you would go to a bank today and tell them I'm gonna give you two dollars and I want a loan for a hundred euros equal equivalent of $100 in Euros I think everyone would do it right and that's what maker dive essentially does right now it's like you can you can take your ease and lock it up and get dye which solves some needs I mean of course like this there's a there's a need for that but in the end like all of defy today is over collateralized like very easy products and and so sort of what we're trying to do is we were trying to build like actual borrowing against unsecured loans which it has its challenges but that I

think those we can solve because you I'm of course our current financial system had issues with banks not always being good about issuing loans and pricing them correctly and so exactly like that was that was the definitely yeah it's this sort of like adding them together changing the risk profile yeah and then mostly also I'm hiding it making it extremely complicated to assess this and I think that's where the transparency or the the code that can sort of enforce these rules on in in blockchain can help us prevent it it will still require people to think about it but at least it can be made visible and it can be shown that like those those assets are way to

over leveraged and like if like if something happens here then like this whole system is gonna fall apart so do these things I think we can make we can make crypto a better thing but definitely I mean the crypto is not used for lending but if you look at the economy we are in it would not function without unsecured lending like you a business over expense itself constantly we like if you get a mortgage on a house right there's like it's basically the the like you're putting in some collateral but those banks then like take all that collateral and like take money and from a from a lender from a customer and give that money to you and so like I get in many places you people

don't over collateralized stuff and because there's a future there's an expectation of future growth and so as long as you have to add you it you're fine right and sort of so these lending products I think over is what we're looking at and of course that comes with challenges but it done well though that will be much better than sort of the the system you have today so let's dig in a little bit into how centrifuges actually been built because I know there's been a journey here and like you know did you start at aetherium which is sort of what you were talking about before there's some some side chains story involved somewhere and and now kind of ending up on substrate

so I'm curious to hear what that journey looked like I mean yeah so we have I think we do have a very much a Lean Startup approach that is maybe a bit atypical and in the boxing space mostly because of the way projects have been fundraising to give yeah I think we have to give a little bit of talk about the time when we started and and sort of what was going on right we started in summer 2017 and and I think with all we are all in the founding team sort sort of seasoned entrepreneurs and and sort of said okay actually what we want to do is going to figure out our idea and then I work on this and sort of build a first prototype

and do all that and at the same time this IC o---- craziness was going on and we actually did not like the idea of just like going out there and putting together a fluffy white paper with like 40 pages of stuff that is going to be outdated half a year later when you actually validate all of these things and so we didn't raise a huge amount of money and just and sat back and and started building in a in a small small lab not shipping anything so we build like I'm probably like a couple hundred lines of code like a very first proof-of-concept just a a way to like have off chain data like private data

sort of be committed to on chain but this is actually very similar to these open-open time stamp on Bitcoin and sort of elaborated on that a bit and sort of built tooling around that was actually the first demo that we we're raising money within 2017 and of 2017 then we did a small round and we said okay like we want to build this we knew that aetherium 1.0 was not the right thing long term but we still wanted to just like keep testing things out and shipping stuff and so we did start building all of our technology on on I theorem and the thing you have to know also and I think that's something that people thinking about privacy or thinking about like the web 3 space is

that of course you can like use a user theorem 2.0 or 1.0 excuse me I'm already today to like half transactions and transfer tokens like a lot of the infrastructure is actually not on chain right if you build your application with like 99% of the complexity on chain then you're probably doing something wrong in most cases you actually want you need a vast amount of infrastructure around it and so we didn't actually build we didn't really care about what our blockchain was going to be because the challenges we had to solve first is how do different nodes discover each other on the network and exchange data in private because you cannot just upload that to a centralized

server and then say oh but we have the blockchain that that keeps track of it so so sort of we the focus first was just building this peer-to-peer network and the stack for that was actually my first we were looking at quorum and how they did their a private transaction layer actually reuse some of that code and then realized no this is not really a good fit and then we switched over to using the p2p which at the time was just being pulled out of IP FS as the sort of abstraction network abstraction layer that gives you a peer-to-peer network and I'm actually very happy that this is now sort of becoming the de facto standard at the time where we were a probably one of the first go projects seriously looking into how to use it and

so sort of this was our approach and we said ok probably we will move off of aetherium for some part of this we did write a white paper at some point that that sort of went into this sidechain idea because of course you have to it's finally talking to investors and said also define yourself in the market so we went through this exercise but then still like it wasn't sort of the first thing we did until really like I would say nine months ago where when it started to be clear that we want to grow faster than we can on aetherium and that and and so to put things into perspective a a customer about a potential customer of ours for example an a software provider that provides

invoicing products to suppliers and buyers they typically have I mean they make a low number would be a few thousand transactions a day and so if you think about that and you think about eath 1.0 and that the transaction throughput they're like one customer can already pretty much like fill every single block that we have on etherium and so that's that's sort of when we said okay so we've we've done this we've done this core product not sort of addressing privacy by moving a lot of data off chain addressing sort of the needs of businesses by having a peer-to-peer node that is very tightly coupled to the to the application on chain but not solving for scalability yet and not and also knowing that sort

of the privacy primitives we want to use on a theory marry sort of kind of outdated so that was another consideration for saying okay like we want to actually be able to start building a a chain that has optimized cryptographic primitives for doing stuff in zero-knowledge and so we went through a couple iterations we looked at Kosmos we looked at other chains we looked at quorum again though definitely not something I'd want to use for that right now and then substrates and so it was an interesting point I think even now we're kind of quite far ahead with with sort of using substrate and and looking at our time line I think we will end up launching quite a bit before polka dot

goes live nevertheless for us if we said okay actually comparing comparing will seen was the decision of the two Kosmos and substrate we liked the developer experience and the tooling better of substrate and and so the polka dot didn't even play it a big part of that decision and so our strategy was we want to launch with a proof of stake network and basically solve this these scalability challenges that we're having now to then as in a sort of a second release when we've moved over a lot of the infrastructure that's only theorem today into into into substrate into our own chain then make sort of start building on top it's really interesting to hear

that you you'd be launching before tire chains on polka dot exists because that's actually kind of an intentional thing from parody side right where we actually went we're gonna build substrate and then we're going to build polka on on top of substrate if we just build poke it out and build built out the the basic thing we probably be done a year ago but because we decided to build substrate first like this is the thing that's actually now getting to a point of stability and and is a thing that you can actually launch something on and polka dot is is kind of going a bit further down the road yeah so so for us like deciding to launch an unsub straight was actually really just as this goal to start building with

something and we looked at we looked at sort of the tools out there we we don't I mean we're not a blockchain company as in we're building new technology for how blockchain should work I think we're building new technologies for how people can interact together in privacy but but so for us with a blockchain of course in a decentralized way with open-source software and so that requires a blockchain and because of that we we decided to go with substrate the appeal to that and where I actually also see where this e theorem 2.0 is going to is we see right now a theorem as the market leader and everything exists within one chain and it's extremely easy to move

your die from compound to maker and then to Dharma and then go and put it into your gnosis multi-sig and all of that is extremely simple and at least a great developer experience but it doesn't scale and even if we manage to scale ëthere IAM 2.0 to buy a factor of a million all of the world's computation can couldn't happen on ani theorem right and so so for that reason I the way I see this this world changing and by that I mean that the blockchain world is I think whereas right now the it's very hard to trust other chains and it's very uh it's not a very common thing to have assets come from other chains or transactions come from other chains we

will invariably end up in in this and I and so there is like in the web world there was this shift in thinking as well when like everything went from sort of being synchronous and like you had one request that went to the server and D like that single request was served by one one application and one like huge stack and now like if you post an update on Facebook you probably have 50 different services communicating like in an asynchronous manner and and you have 20 different databases that get updated and then there's like some magic happening that sort of reconciles all of this right and so I think that we will have similar shifts in in how development works like if we're sort of with aetherium and blockchain today we're in this web 1.0 world where actually technology is mostly still

extremely simple and and this shift will come and this shift will come by cosmos developing IBC by polka dots relay messaging by theorems charting right like for example at Def Con I think people were to me it was a bit surprising by how much people were surprised about Oh like ithi room 2.0 is gonna break composability i think for me that was like a very thing to expect like of course yeah we're gonna have like multiple Ledger's and multiple systems that need to be a synchronized and transactions that can't be atomic and anymore and you have to like do a two-phase commit certain things like that right we solved all these product not all of them but we solved a lot of

these problems in in other systems and so we'll just have to like sort of get used to that so from that perspective our decision time was to launch my substrate build a fairly simple proof of stake network that's using the standard and Grandpa babe consensus mechanism and services just this first place and we're like bridging this into theorem because of course the fight happens on a theorem and like rnf teases should should it in the end end up there but but sorta this has been the the strategy to just like start there and see how how this single chain universe right now with any theorem is gonna change into a multi chain universe in the next couple of months hopefully or maybe maybe a little longer

we'll see so next up what I want to talk about is kind of privacy and talk a little bit more about your involvement with zero knowledge proof research and how that is can be incorporated into the centrifuge model I think before we go into the zero knowledge stuff though let's talk about the privacy part because businesses trying to do business on chain it's not like privacy would be nice it's like it has to exist and it has to exist in a relatively complete and easy-to-use way for them to participate in it and I think your business definitely falls into that category I mean so I I can explain a very simple reason why for businesses is

it it's an absolute must I think so as an example if you have a coffee roasting company and they have they buy coffee for 1 million euros a month and they sell coffee for 2 million euros a month and have two employees so now you know okay they make a million of profit a month - salaries of or - salaries of maybe like I don't know 100 100 Maxim 100,000 so you know their profit margins nine hundred thousand as if I now I'm a buyer of that from that coffee roastery I would tell them look guys I know you you're like cost is probably not more than like 1.2 million euros a month and so why should I buy for you for two million euros a month when I can

negotiate that price down to 1.2 and so like basically like if you think of a business doing business on chain like having having this there are very few markets where this is actually transparent right like in most instances like this is your most private data and so and so this is also why like we sort of did things the hard way we try to build privacy first and sort of sacrificing a lot functionality and sacrificing in like finality or and sometimes in like certain guarantees because for a company for a coffee roaster to be able to have both their supplier and their buyers interact with them on in one system

wherever where all amounts would be public would not be an option right and so we may be talking about the transparency aspect I think this should be done with voluntarily providing this information I think if we build systems that force you to be public by default then you can never protect basically yourself from this public information being abused right and it's against and used against you exactly but then I think we have plenty of tools that will actually make it quite simple to then voluntarily disclose and so for example this my example with the like five years of transaction history you can actually

do provide a proof that you've been in business for five years by providing these signatures of documents these transactions of documents and doing so at limiting the disclosure of information as much as necessary going back to your coffee roaster example just to keep on that narrative so Coffee Roasters want the like the profit margin kept private so how much they spend and receive should be kept private but say they needed a loan and they wanted to prove somehow that they've paid their invoices for the last five years they could still have that sort of transparency and guaranteed validity yeah so I mean and I think that's where like zero knowledge proof become

extremely interesting so sort of the the thing we've started with was basically way to create this data and now that you have this data that you can verify that at the point in time it was created who signed signed it meaning who attested to it you can I can now basically build computation that uses this data and instead of effort the first thing we launched with was actually not doing that with zero knowledge proof so it was basically so this idea of tokenizing a payment obligation from an invoice that means that you have this off training invoice it has fields like the line items of an invoice of what exactly you sold it has the tax information it

has the delivery address it has the buyer it has a supplier it has an amount and a due date if you however want to go to a bank and sell them a in an invoice really the only thing they care about is sort of this the the due date and who's to who's the debtor so I could even just say as a supplier I have this invoice for five hundred thousand euros worth of coffee I want to sell this to you here's a proof that this n of T is basically linked to this invoice it's worth five hundred thousand euros and will be paid in in 90 days and now the bank can look at this information without actually getting your entire invoice information and so we've sort of built our like off to a messaging protocol based on that right now this is sort of what we're

life with is that these in these NF tees can be minted with this metadata that is verified against these off chain transactions so we call those anchors so on the on chain anchor that commits to to the to the message off chain to the document off chain and and but in a sort of in a second step and this is where we're moving towards zero knowledge proof is that of course now instead of revealing just simple a subset of fields from off of an off chain document you can actually have computation that would give certain statements about this option information but doesn't reveal the the data that was used and so to take this invoice example one step further if there was a an underwriter someone that was willing to raise

different businesses for a credit score then then you could for example prove to the bank that your invoice was is made out towards a business with a certain score but not to which one and so you can have an NF T that basically is minted by providing a zero knowledge proof that verifies that is invoice has meet match a certain criteria for example that who the buyer is and that the buyer has this rating but then I don't have to reveal the buyer just to prove to you what the rating is and so you can do that that's a Penta I'm always looking for sort of more examples of this like zero knowledge for

this transparent privacy combo and this is a very it's a sophisticated one but yeah it needs a bit of setup and he's a lot of explaining around how the system works but so essentially right today you would give the bank your cut your customer list and then the bank would ask a credit rating agency hey like what are the ratings of these companies and then look at it and do this calculation themselves but that leads to like you giving up more information that you want and so like whenever we look at these challenges we always say okay like how can we build this in a way that by default no information is leaked at all and that basically the suppliers can weigh for themselves how much information they're willing to get give up and so a credit rating probably gives you a good price

maybe sometimes you need to reveal who the name is and sort of giving this optionality I think is is crucial right so I want to hear a little bit more about like the actual zero knowledge work that you're doing what kind of systems you're playing with what kind of tools you're using I know from Zeke on one you are presenting with the Socrates team and we've had Socrates on the show we had Jakob I think last year like a full year ago talk about what Socrates was and how it works but I'd be curious to hear like what is your involvement with Socrates and what are the tools that are actually built into the centrifuge stack so this is currently under active development and so so we're

at none of this is on maenette yet but we've sort of started doing work with with Socrates and working with Socrates and maybe I'll try to give you like very brief history of my experience but it was zero knowledge and like and specifically CK snarks so like I've given you plenty of reasons why privacy matters to to us to myself personally and for us as a project so in 2017 already I was trying to like see okay what is the tooling for developers to build zero knowledge proof sand so for us we're not using zero knowledge boost in like one core part of our protocol but we're basically we have this vision of people building like zero knowledge enabled applications on top right

because we're building the infrastructure for these for the data to exist and to be exchanged but then an invoice with a credit rating is a very different snark like that the example I just mentioned is a very different snark than a a real estate token and a house that is represented on chain where you want to maybe have a verify and zero knowledge that like this is up to like the paperwork is all right or that that certain criteria are met and so when we think about that is like we're not trying to solve a particular problem within our system we're trying to allow people to define these assets and like build these programs and so I was always very interested in in sort of the the

most developer friendly toolchain and and from the very beginning I think this always was Socrates although until very recently they were lacking a lot of tooling around it a lot of features that actually made it useful so while the language itself in 2017 is already simple enough like you couldn't really do anything with it at the time because it didn't even have a hash function so like for I mentioned like our documents are basically converted into Merkel trees and hashed on chain so if you wanted to validate something in this your knowledge proof you will need to validate this Merkel proof and so you need to be able to do a Merkel proof very easily in in in a snark and if you

try to do so you will very quickly realize that oh well there's like proving systems and smart programming languages but then there's this whole other set of problems of which hash function can you use that is both efficient on chain and efficient in a snark on a theorem there are none sadly and this is like one of the reasons why we're moving to to our own chain we're using Patterson hashes for our snarks and this is like for example just not feasible to do on ethereum or feasible meaning like at least 10 times expensive as sha-256 we are using we're using like specific signature schemes that again

are easy to verify in a snark and sort of and and so going back to like my history like those tools were all made singing in 2017 and thank you at the time see cash was so busy cash I'd see Zeke on one I think they start sort of started introducing their new crypto which I'm sure you've done a podcast about right they've managed to cut the transaction time in sapling from 45 seconds roughly to four seconds and that was not done by using a better zero knowledge proof so for the most part it was done by heavily optimizing the cryptography used in snarks meaning those job job the job job embedded curve and so sort of those are sort of the mid the the parts around the proof system

that are really important that really make a difference yeah I think actually I think we did talk about that in the Zuko episode episode 50 yeah okay cool yeah so so so looking in 2017 the de facto standard and I think still the de facto standard in like snarks is basically set by by the Z cash team which is an amazing team the the de facto standard was shot 256 it was extremely slow it took 45 seconds to do a transaction on on a theorem shot 256 wasn't even available so for us it was like okay this is way too early we're not in the business of hiring a team of and cryptographers to like work that out they're probably not even ten cryptographers in the world that can do

that but anyway you get the point we want to build applications and we said we knew that there are plenty of other problems we have to solve first meaning the peer-to-peer network and the way that data is exchanged because of course I could snark you can create a proof for it but you need to have the data for it and so we started tackling this problem first and I sort of made sure that I was extremely connected in the zero-knowledge community spend a lot of time just knowing about everything that's going on and sort of making a lot of those design decisions in our protocol knowing how this will be used in snarks and so for example how we build the trees how what the hash function is we're using how we encode things for example like you cannot have arbitrary length strings in in a snark

like physics so the loops and and sort of this this arbitrariness of the length makes it extremely expensive or some technically sometimes even impossible we sort of had to like design our system with that in mind and and we've done that and now we're at the point where we actually are still working with Socrates where we're basically on a theorem right now we've created this proof of concept and work together with them to use their baby Jub Jub pi crypto library that has an implementation of these efficient cryptographic primitives that are compatible with Socrates and so we're using Socrates to implement this nft that verifies the credit rating of a supplier so looking at Socrates the

tooling is not just the programming language that you need to create a snark there are many of those you also need the right hash functions you need a way to sign messages you need a way to generate keys and so this is where I've been sort of following them and I like a lot of the development that they've been doing is really saying as a as an application developer we don't you don't want to worry about that kind of hash function you don't want to worry about how you use those what primitives to use right that's like then you very quickly get into reading papers on hash functions and comparing them and trying to find issues and I've done all that but like this is not what I would expect our user base sort of the people that I want to build on top of centrifuge to do

right and so Socrates approach is it's not always the most efficient it's not always the the most advanced cryptography like sometimes it lacks the very raw like low-level features that you would want but it also makes sure that you can do a lot of the mistakes that you can very easily do if you don't watch out and you use one of those lower-level tools so for example there is this bug in in a lot of the the first Ethier mixers that went live they are based on mixing m'as where you had a number overflow and that number overflow meant that the numbers on a theorem didn't necessarily match one-to-one I can um Bernie VM didn't necessarily match one-to-one with a number that was

then passed into a snark and so what what does that mean it means that if there if it can pass two numbers into a into a senora candy theorem what validate it both as being a number then you get this non determinism where you can basically do a double spend for exam so it's a the the problem is very similar to like an overflow in a regular program so that's where I think Socrates is helping a lot in like making sure that people don't accidentally run into these issues because that those are huge security vulnerabilities for basically render your smart useless what do you think is what is Socrates comparable to like is there anything else out there like Socrates I mean there's yeah there's Sir calm there I mean sort of

Socrates replaced lip snark I think lip snark was sort of expected you to be a cryptographer and gave you some of the tools to like build these things whereas Socrates has the expectation that you're a software developer that now wants to just build a very simple something themselves and so I think and and there's there's many different on this spectrum I mentioned circum snarky by the O one laughs people so there are a few of those that come from this and and it and there's this is expected the incas system is super early there is not one way to do it of course and there are differences in flavours I mean God knows how many programming languages there are for regular programs but so I think Socrates had had this focus on user friendliness or developer

friendless in that case when we had them on last time to talk about it there was a very large focus on generating solidity code for the verifier part so kind of like assuming that you're trying to do something with aetherium and and deploying the verifier on the ethereum blockchain has there been any movement to like generalize that or or include more things like generating I wasn't verify or verifiers in anything yeah actually I have a friend who built a thing I built it was improver and verifier for Socrates there were other someone and I think that was the Kadett team if I recall correctly they built a

pull of bulletproof back end so you could use with bulletproof instead of CK snarks mmm so there that this ecosystems been growing yeah so I think is it this was a start at the start was there's this alt BN curve on etherium you want to be able to program a snark for it you want to prove it off chain and you want to verify it on chain that was the first use case and then you slip snark in the backend and had this very simple programming language to let you do these things it's - for a very large part this is still I would say 80% of the focus but now people have been extending it they replaced the underlying library I think it's now bellman people added different provers different verifiers

there are different proving systems but now girl 16 made it a lot easier so sort of this it's been changing and it's been growing I think which is which is great yeah but going back to that question of like does it's like Socrates the way I understood it was also just like very tied to aetherium specifically do you know if that has Jeanine one one thing with one problem with the theorem right is that unfortunately even in the most recent hard fork we didn't manage to get new elliptic curves into into the VM and and so basically everyone's using this all TN curve on ethereum which because that's the only one that's available and and and that's the one that Socrates supports natively but you really want to be using something else if you were

designing your infrastructure today you would not use it and so Socrates still solves that use case where you want to build something with aetherium but they've for example the bulletproof backend like sort of creating this modularity in the proving backend is something they've they've worked on and I think it's getting better now and so for us actually it's it's not a constraint for us anymore we we know that if we want to plug in a different background back in because we want to be on the LS 381 381 is one of the curves then we can do so um yeah and I think if there's a backend then it becomes super gin general and like you can deploy it like because it's an entirely computational thing you don't have to make any assumptions about your

environment or the data layer or anything so you can just if it's a wizened blob you can deploy it on any walls yeah yeah so we um we actually started looking into the bellman is luckily written in rust so the back end all the Socrates is written in rust which is what all of the current crypto is seems to be written in or at least in a large part of it and so that compiles very easily to - awesome right and so x4 for Socrates it's it's definitely an option and and I think something we've we're thinking of doing ourselves is developing this was a verifier at least right yo you care about the verifier in in a boxing concept for the for the for the chain for the robots amount of chain but then

actually what people have also been doing from the very beginning is if you want to create a proof and you don't want to require users to download software which is not as important for us because this is like a b2b like not a user interface but like more of an API that people use but for like for example a mixer like Maximus having a prover in wasum allows you to have the browser actually create the proof because now you can run you can run that and I think so I'm not sure if Socrates is the preferred tool that people use for that but they're I would think circum or web Snorks would be one that actually very easily integrates into like creating these proofs of JavaScript not right and

so now you can have the browser create this proof and submit it to the etherium with inferior or whatnot I mean everything that you're talking about right now it's moving incredibly quickly we're hearing I mean especially in the zero knowledge base not maybe not only in the zero knowledge base but like recently in this your knowledge base we've been seeing so much so many new papers coming out so many new paradigms and we're all kind of on edge waiting for like what's gonna come next and I've heard from other teams where they're very tentative in actually deciding on any particular system because of this change how are you actually making like how are you developing a product like a

like a full project using some of these things given the speed at which it's changing I mean the the thing again is like you see snark part is actually a very small part in infrastructure the same way that your smart contract is very tiny like you end up building a lot of tooling around it to make it usable for the user and so I mean that and that's why we focus on that because when we looked at this in 2017 it was like we're not gonna like develop our first snark on day one and then like build everything around it you said okay no like we need so much other stuff around it that we can like start with that I get really is so right now it would be a full-time job to like keep up with all of the papers that get published and all of the like new

proving systems that are coming out and and so now you have like upgradeable upgradable trusted set up so you have Universal trusted set ups you have you have proving systems without trusted set ups and so I think this will significantly change the experience for how you develop these things but I think the infrastructure around it is is it's gonna largely stay the same and so for us right now we're we're basically saying we're definitely not picking one of these like six months old papers and they're going to implement it I think that's it's already the fact that 0z cash is the only project that is using snarks really do not the only project

but pretty much the only project and least they were in the beginning I mean it's this is like compared to like any of the cryptography we use in other places in this industry this is extremely extremely immature right and so I would be like very careful with what what's happening and like definitely wait and see and and I think this will take a good year or two more until I think this this recent wave of new technology coming out like for for people to actually understand it well enough to like break some of the first ones and and have an idea of what's more secure and for us like we're I mean again like we launched any theory of knowing that probably it's not gonna scale and solve our needs we're probably gonna also ship like

something using ZK snarks with trusted setups that right I'm pretty sure I would but I would bet on on the trusted set up the way we know it now probably not being the wait is gonna it's done in the future because it is a huge issue it it's like doing this ceremony is is a lot of hassle and if you had a universal trust it setup that would make it so much better but read the reality is the market needs to just or the the into the even academia needs to still figure out like are they secure how can we use them what are they broken or maybe even there's a better version so I think we didn't see a little bit but also just use what is sort of established today which i think is just the crypto that

sea cash sampling is using they're like they've shipped that and they they're not really innovating on snarks at the moment they're publishing papers but like if you look at their development roadmap actually the the challenge for them now is is scaling this and sort of making sure that the tooling around it is ready and before they run into the next barrier technological very on the CK snark side is probably still gonna be be a bit of time and I think so that's we're at this point where like the same with eutherian 1.0 and 2.0 where we have the system now that we can probably do a lot of stuff with and expand on cool well listen thanks so much for joining us on the show yeah thank you for having me

thank you very much I think it's really cool to actually talk to talk to you talk to a project that's building with all of this in mind sort of from the ground up and I want to wish you a lot of luck with it keep us posted yeah thank you alright and to our listeners thanks for listening thanks for listening