Privacy in Cosmos Live: Guy Zyskind (SCRT Labs)- Privacy-as-a-Service.
24 Jun 2023 · 15:48
Guy Zyskind of SCRT Labs, speaking at ZKValidator's Privacy in Cosmos Live event in Prague, lays out his vision for privacy-as-a-service. He walks through use cases ranging from on-chain verifiable random functions to what he calls Unstoppable Wallets, describing how confidential computing can be delivered as infrastructure other Cosmos chains and applications can build on.
Speakers
Topics
Transcript
okay uh hi everyone I'm guy I'm the founder of secret is generally a privacy preserving smart contract blockchain essentially it's a your run-of-the-mill Cosmos chain with cosmosm but the key differentiator is that users can encrypt inputs State can be encrypted and outputs can be encrypted so essentially you can do all kinds of private computations um I you know if there's one message that I think people here should take is that privacy in my opinion and I've been in this for like a decade is very misunderstood so usually when you talk about privacy in web 3 it's
always a discussion about you know how to do private transactions how to do Anonymous transactions how to hide your IPS all like the the conversation before me these are all very important problems but the problem is that when people think that this is all what privacy is about it limits the discussion so anytime I go like on a podcast on a Twitter space it always gets into this box of you know should we allow people to anonymize their transactions their IPs uh what is the importance of protecting your own data and how should we deal with Regulators again a very important discussion I'm sure like half of the day would be about that but I want to say that privacy extends
way way it goes way deeper than that in web 2 we just assume that we have privacy we just assume that it's built into our applications at least in some form yeah the big companies holding our data but it's not that the whole world can probe in and see what we're doing and in practice if you think about web free because everyone can see the data there are many applications that we can't see that we can do today think about all kinds of games you know casinos poker you know a strategy PVP games all of those require some kind of hidden state that is segmented between the players if you think about sealed bid auctions
generally people don't care about the privacy of their auctions no regulator will come on board and say oh your bid was Private that is like you know your money laundering like that's not a discussion you need to do still be documents because they're more efficient especially if we're going to start having things like Mev markets and all that um and there are many many more use cases um and it's secret um really what we're trying to focus on these days is basically making it clear that these are the use cases that we should focus on and with this kind of like umbrella thing called privacy service we're basically trying to externalize it Beyond secret like you can do all of these on secret today but it's less interesting I mean security is a limited ecosystem Cosmos is a much
bigger ecosystem evm is a much bigger ecosystem and those are really the the the let's say the domains that we're trying to kind of uh penetrate with these privacy the service concept now I'm not going to talk about all use cases I'm actually just going to talk about one which is more of a passion research project of mine that we launched this week and I'm slightly going to touch a second one as well so the first one is going to be unstoppable wallets um there's a research paper if you want I can give you the link it went up oh just go on ePrint it went up on ePrint yesterday and then the second thing is basically on chain Randomness and there are many ways to get Randomness today in blockchain but all of them are off-chain
and Via secret you can do it on chain um so let's uh drill deep into Unstoppable wallets um so wallets in general I'm sure everyone who knows that they're essentially private Keys you use a private key you sign a transaction blockchain has a public key you can either move your funds send them to someone else use a contract do something some operation or you cannot but that is also a single point of failure if you lose your keys or if someone takes it you're done so you know there's this then idea of okay let's uh spread the let's not have like one Honeypot let's spread it around let's have a multi-sig wallet uh how many people are familiar with NPC wallets here okay so multisig wallets how many people are familiar
with that Okay so I guess I'll explain both multi-sig wallets are very simple instead of one person controlling the wallet you have a group it can be eight out of 10 people 5 out of seven one out of two whatever you want to do it NPC wallets are the same they're a bit more technically sophisticated actually much more they have some benefits the biggest benefit is that they'll usually cross chain so whenever you have a multi-sig implementation you know you have one for Bitcoin and and the forks one for evm and that's usually a smart contract and the forks you have a different one for Cosmos and each chain basically needs to roll out their own when you do it via MPC multi-party computation you
basically are building something that can go on any chain um the problem and by the way NPC wallets are generally are winning the game so like companies like file blocks now coinbase all of those companies are basically they're moving to operate um in this way you have the service provider here they have like you know one of the keys and then you have one or more users um that are co-signers and that's how you get more security so let's say I'm a I'm a company I can sign up to fireblogs they we generate this MPC wallet they get half of the key I get half of the key or I can do things like I have one half of the key and they will co-sign
with me for any transaction that is up to like ten thousand dollars and then maybe there are three out of five people in the organizations that are able to sign on transactions that are high that are higher than that so the service provider X is both a co-signer but also has this like policy engine now the problem with this model is that there's still a lot of trust in the service provider so it's not as bad as like you know going on a centralized exchange and using that as a custodian but um and they and obviously the service provider cannot steal the money because they only have access to half of the key I mean it's obviously more secure from the user perspective because now even if the user is bleached there is like
another service provider but if that service provider is out then you lose access to your funds unless you have a backup they are usually operating in closed Source um if you've worked with these companies it's very hard to add like new assets and new features like it's really more of an Enterprise kind of web 2 solution not really the kind of like open platform that we want in web3 and what we did with unstoppable wallets essentially we took the service provider part and we put something that is much more familiar to people in the space a blockchain smart contract and now if you half of the key sits with basically the blockchain with the validators and you
can split that across the value details as well and then there's a smart contract which you can program and you can now start to basically program on-chain wallets um with whatever functionality that you want and obviously as long as the blockchain leaves like there's no situation where the blockchain goes offline and you lose access to your funds um the problem with this approach that we had and it almost killed it is that um MPC requires um pretty heavy duty cryptographic building blocks and we looked at all of the uh threshold ecdsa basically the MPC algorithms to do this kind of thing and
we try to extrapolate how that would run on chain and it would completely break our Network or any Cosmos Network or any evm network for that matter in existence it's just too expensive it won't work so we did the kind of stupid in retrospective of actually building our own algorithm and running our own um it took us a while but after a few months we actually got something which is very very useful so we built a new threshold DC DSA protocol that is on chain friendly and that can run inside of a smart contract um if people here are from like the ZK area I like to correlate this like this is kind of like analogies to how in ZK
you know um it's very very inefficient to use like normal uh symmetric ciphers or hash functions so there's this effort to build like ZK pool friendly hash functions so this is in a way similar like it's very very slow to run this kind of cryptography on chain so we had to kind of with that in mind come up with the solution that is friendly on chain um it also has other benefits like robustness and furnace basically it's much more resilient than usual multisig wallets um and to be clear this is not for secret or this is not just for Cosmos this is meant to basically be a cross chain mechanism to sign and control Wallets on
any chain the best analogy here is that Unstoppable wallets are kind of like a building block to do cross chain account obstruction so account obstruction is this idea of small contact Wallets on ethereum here's an idea how you can do something that can work on ethereum Solana Cosmo secret whatever you want um and this is an example where we basically have a smart contact wallet on secret but you sign it with uh you sign transactions with it on ethereum and we that was the first example where we got it to mean it um all right so I think one point to drive home is that these smart wallets
they're programmable completely and we think there are many use cases that you can build and use them for and we implement it too one of them is obvious and the other is less obvious just to show that the the the their expressible power um so the obvious one was to do basically a multi-sig wallet so you need five out of eight people seven out of ten whatever you define when you launch the the wallet but you also have a spending limit in this case we put like just as an example like a one if spending limit so basically when you try to sign a transaction when users are trying to sign a transaction the contract verifies that they get enough signatures and that the it actually
parses the ethereum transaction and if it only cosign it if it's less than one ethereum and you can you know come up with schemes that are much much more reliable than this um but I think the cooler use case because that's not something that people think of when they say this for the first time we didn't think about it uh when we started um you know there's in crypto we always operate in this um scenario where we move assets we don't move private Keys we don't move wallets it's always that those are static and you move assets from one wallet to another but there are many use cases in many markets that actually operate on the wallet level they don't operate on the
asset level so if you think about things like you know if you lost money in FTX right and you have a claim and now there's this like uh trust like pen and paper based like over-the-counter markets where people are selling their claims um basically they're selling their their claims to get some immediate liquidity what if you could find a trust this way where I could actually sell my wallet which may have eligibility for like an FTX claim in a way that I probably revoke my access to that wallet and the and the buyer gets it and and with this mechanism you can actually do that another use cases VCS you know often this is bind to like thefts and
E-liquid deals and again there's a huge over-the-counter market for that so again if like a VC wants to get out of like a illiquid position they can here use this mechanism to sell the wallet and not their assets um there are many other use cases for this um I think the point is to get developers to actually try to think what more can be done one less example which we didn't develop but I do want to touch on is what I consider the unruggable dials in my opinion one of the biggest shortcomings of Dao's today is that the the at the end of the day holders vote on whatever but usually the actual power the actual
Treasury and funds it resides at a very very small Committee of several people and those people can technically listen to the Dao or not they can do whatever they want so what if you can have a smart wallet like this um where there are specific rules that the community sets in a smart contract on how the Dow can actually spend their funds and maybe this is being composed with another contract a voting contract for the Dow such that if ever for example the dad wants to do something bigger like maybe make a really big spend that requires the entire vote of confidence from the community so maybe that contract basically absorbs information like
voting info like voting results from another Dow voting contract and only if and only when that happens can the multisig actually spend the funds in that way um one less detour because this is probably of separate interest like we had to put a fairly deep cryptography into cosmoism and into secret to make it happen um uh one of them was put in additively homorphic encryption which basically gives you the ability to do certain operations over encrypted data on chain but not all of them a this is the first but B um I think this is this goes this this
has potential and use cases that go beyond just um what we're talking about today like one example you can do encrypted voting contracts um using this mechanism completely respective to the wallet thing and the last point I'm going to touch is everything I talked so far is like there's code samples there's research backing it security proofs all that but it's more or less poc in research level this is different so this is basically something with the protein mainnet a few weeks ago we call it secret vrf it's simply a way to consume Randomness to your
application or your chain in a very unpredictable way and do it on chain there are off-chain solutions to do this but this is the first on-chain example and right now we have apis to all other IBC and Cosmo chains and we're working on an evm version as well um so yeah I'll open up for questions most important takeaway message is privacy is not just normal it's not just important but it's really also useful hopefully if if anything you take from these then it's that message thanks okay thank you very much