Enabling Private Transactions for Safe - Alexander Wilke

EthereumZuri.ch 2025 · 31 Jan 2025 · 10:41

Alexander Wilke presents work on enabling private transactions for Safe, the smart account wallet widely used to hold assets on Ethereum. The talk at EthereumZuri.ch 2025 looks at how privacy can be added to Safe transactions so that users and organizations can keep their onchain activity confidential.

Speakers

Topics

From EthereumZuri.ch 2025, hosted by EthereumZuri.ch.

Transcript

[Applause] yeah thanks so much for the intro my name is Alex I'm um building Bermuda Bay and Bermuda is a she a pool for um that can be accessed by safe but also by uua based accounts so just like accounts based on a private key and um actually there are two challenges which I will go over through but uh first let's just start with the overview about how private transactions in general work right now so um you have like a shei key pair which is used to decrypt uh encrypted notes or utxos and the sh key pair is uh based on two different Keys the viewing key and also the spending key and to Shield your funds you have to transact your funds into shielded pool

which then just creates utos and also the nullifiers to just prevent uh double spending and then actually to move your funds privately you just create like a ZK proof that you have the spending key and you just kind of prove ownership of the utxo um but for safe it's a little difficult because the save doesn't even have a private key it's a smart contract so it can't on its own decrypt utxos or encrypt in OS um so that's a little bit difficult and also let's just imagine we have a a key that start anyway uh we still want to respect the multis authorization so let's assume we have a private key still this private key shouldn't spend all the funds which is

uh in the in the save like we still have to respect the um threshold let say two of those three multistick uh save so for the first challenge um we have like a solution it's called like the MP CDH or in the long form multi party liip curve uh defy hon contract which is like a plug-in that can be deployed by the self at own so the safe deploys this plugin and then all of the signers in this case U Alis Bob and Charlie will do like a onetime setup which will create a shared secret which then can be used uh as a seat for the previously for the shared um sorry for the for the uh account for the um

she account so this uh seat can be used to create this VI key and um yeah it's like a plugin everyone can just access uh access this plugin and On Demand recreate the seed to uh derive The Shield account so from now on every signer can Crypt all of the uos and view the balance so um actually there's also like a a second challenge because now we have to the private key or like the the shed key but still we want to respect the the threshold so um for the Second Challenge which is which is uh which is authorizing the transction itself we need to do something else so now we have the account but um what we can now do is

that one of the signers can um kind of prepare or propose a private transaction and how it works is they um take the nullifiers they want to spend like all of the notes and then add some salt like the amount and also the recipient and hash it and then they will call um the S message lip or in our case we kind of extended it si meage message hash lip where we store the the hash into the storage of the save so um how it works is one of the signers proposes to transactions or like the transaction and then you will go to the save UI or save app and just kind of sign it like like you used to know um you used to and at

the end you can create like a storage proof that this transaction actually got signed by all of the signers of the save so you can see it's very simple there's like a mapping and this mapping shows um d by uh 32 which is the hash and this kind of just points uh if this protction got signed or not so at the end we just create a storage proof and we can just submit it with the um transaction itself to the Bermuda pool which will unlock the transaction so um yeah we used to know po so there are actually some cool use cases you could build like a private Dow where all of the signers or like the um members of the Dow can propose

transactions or how they want to spend the funds and then every Dow member can just sign sign or not sign this message to um approve this transaction you could also build something cool like a corporate private payroll where you have like an onine payroll and at the end the CFO or maybe like um HR member have to finally approve this transaction to um enable this private transaction for for the payroll and also there's like a nice use case for private uh self c credit cards because right now there is nois pay it's like also like a um credit card based on Smart accounts and actually everything not everything but the trans transaction amount and also the sender

and also the time is public and what we could build is something like um that nosis pay just gets like the the proof to withdraw the the private balance from from your save and just withdraws it to its own private save to withdraw the funds so the whole transaction will be private and also like the amount you you hold on your umis pay card could also be private and then also the institutional Asset Management like they all use safe because safe is just safer you have multiple keys and um yeah with safe and privacy they would hope um have the ultimate private solution and selfcast solution just combining both of the

aspects yeah actually it's um that's the conclusion we have um the shared secret problem which we can solve with the MPC DH contract to drive the shield account for all signers and then also the multi approval which we can solve with storage proofs and that's actually how Bermuda works for now for the save and yeah it was like a small um presentation about B muda but if you have any questions I think we have some time for questions too great thanks for the speech any questions they don't support it right now because

they still have like this kind of EA based Shield account but they should build they need to build all of the storage proof Integrations and also the the Shar secret for now that doesn't work with with safe so yeah yeah I think Umbra is working with stes addresses right so you just create new stes addresses to do so yeah it's kind of like the Ron approach but not the umra so you have one pool and all of the funds lay in one pool so one Shi pool yeah

I also I forgot to to mention that um for this module like the plugin you can also use pass designers also saves and also U uas so it's not just uas you can also use with p keys yeah you R addes um you can rotate them but then you have to do the the setup again for the shared secret but that's no problem you can always rotate them create a new shared secret and then transfer the funds to the new shared like the new private address so yeah live yet um for now it's in testet mode but we release more um so yeah more on public test net because we're building a lot now but yeah we

will release more on our social media and then yeah what that yes why would it why would it be better than other privacy preserving Solutions like attec or yeah because it's you can deploy our contracts to any evm chain right now so you have all of these public evm chains you can just deploy our contracts to the evm chain and then use safe like it's very easy to just use it with a save and for now other solutions they don't really support safe you can you still have to your private key and if you lose it you also Lo lose custody of all your funds so how much more expensive would be for example a stable coin transaction sorry what how much more expensive like

how much more higher would be the transaction costs for uh with your solution yeah I think for um for Save we pay like around 1 million now but it's not really optimized like the the proof is not really optimized so it's like 2 million 1 million gas so yeah depending on the networ how much percent is this more than just a normal uh stable con transaction um I can't really say how much it's not really like the the circuit itself it's not really optimized so it can be much lower like 50% lower and now like around 2 million gas so yeah I think it would yeah all right thank you any other

questions I have one of money yeah it's just a deposit into the pool so it's just like a transact function and the save itself calls this deposit function or like transact it's a general function and then then just deposits into this sh the pool where all of the funds from all safe users and also UA slave so it's like one one omnip pool contract which holds all of the funds but actually to make this state transition like the the private transactions you have to do the storage proof any other

questions no Okay so thanks a lot thank you [Applause] [Music]