zkBob 🛠Integrating zkBob privacy into DeFi workflows - Kirill Fedoseev
ETHGlobal·Mon, Oct 9, 2023, 12:00 AM
Speaker
Join Kirill Fedoseev from zkBob for a workshop titled "Integrating zkBob privacy into DeFi workflows". Thank you to everyone who joined our first in-person appearance in 2023! We are incredibly grateful for the support and contributions of all the hackers, tech mentors, judges, partners, and volunteers who made the ETHGlobal Tokyo event such a huge success. Without your dedication and expertise, this event would not have been possible. We would also like to extend a special thank you to the attendees who traveled from over 59 countries to participate in the event. Your presence and involvement made it a truly international weekend, and we are thrilled to have had such a diverse group of participants. With over 1070 hackers it was a pleasure walking into Toranomon Hills and seeing such a talented pool of individuals. With over 22 workshops, 9 talks, and over $375,000 USD in prizes we hope you enjoyed the weekend full of hacking, meeting all our incredible partners and learning from enthusiasts of the space. We are proud to have welcomed over 35% of attendees who were new to Web3. We hope this event sparked your interest in the world of blockchain and provided you with valuable insights and knowledge. We cannot express enough gratitude to everyone who contributed to the success of ETHGlobal Tokyo. We are already looking forward to the next event and hope to see you all there! 🎉🚀 ----------------- Follow us: https://twitter.com/ETHGlobal​ Check us out: https://ethglobal.co​m Email us at: hello@ethglobal.com
Transcript
foreign [Music] one of the core developers at the Pope Francis ecosystem and we are building a Next Generation stable coin with optional privacy so he's gonna we're gonna talk about that so we believe that ziki Bob that Financial privacy is first of all of course very important for everyone's use cases not only in crypto but in webto world and as in webto world is really a norm for people to think that their financial privacy is somehow preserved within Banks and other institutions in crypto it usually becomes a big problem since the crypto blockchains and are basically public ledgers and all information about public transactions are freely available for everyone on chain to see and when it comes to sensitive financial information so there is no really a simple mechanism for achieving privacy in this financial activities within everyday usage of stable coins so at ziki Bob we are trying to fix this problem by introducing this optional privacy for a stable coin so we are basically right now building three important projects within our ziki ball packet system so Bob itself is a multi-chain multicultural stable token with optional privacy implemented via the C keyboard protocol which is a Dr powered by CK snarks which allows this private micropayments between users and one of the recent projects which also started working with is called pop CDP which is basically a protocol which will allow users to not only generate Bob by locking the stable collateral but also use some of their volatile on chain assets to Mint this Bob using the CDP model so just a few words about the Bob stable coin so the first typical question that is asked about the stablecoin which you probably didn't heard about is related to the how does the stable coin preserve its price and keeps it big so here we decided to follow the simplest possible approach first of all with just starting by baking each bulb with a similar amount of usdc so for now Bob each freely available and circulating Bob is backed one-to-one with usdc and all circulating Supply is 100 backed with uh on chain stable coins yeah and to further Harden the pack we're also using this concept of very tight concentrated ranges of liquidity on uni swap V3 and similar liquidity protocols yeah for hardening in the back and keeping this one-to-one ratio between other stable coins we also introduced this headless mm called called Bob swap which is currently integrated to one inch aggregator and Pathfinder and we're also looking into integrating it into other amm aggregator Frameworks in the nearest Future and basically Bob swap allows you to swap between other waitlisted stable coins into Bob and from Bob with fixed trade which is in zero slippage and almost zero fees and one of the also other cool features it supports is called Idol asset compounding so whenever somebody logs some USBC or usdt in the Bob swap contract this can be automatically Auto compilated to the some of the Blue Chips plenty markets like compound or Hardware to earn some additional and notable yield for the protocol Revenue so which is also a cool feature to have and just to conclude about the Bob Part just to throw some numbers so the current market cap of Bob is about 50 million USD with achieving about 8 to 10 million dollars of trading volume daily we have more than 400 4 600 active holders of Bob token and the overall collateralized circulating Supply available freely on the market is around 7 million and the Bob itself is deployed on multiple chains we are looking forward to deployment on other chains as well but right now we are present on polygon optimism and arbitrum roll ups uh ethereumane and BNB chain so yes as I said before we also started working recently on this module for collateralized step positions which is soon going to be available on one of the both present networks and this way users will be able to generate new bulb on the market using their uni swap with three or Quicks for free LP positions with pop or other token players as collateral and this way it's gonna increase the capital efficiency and allow for more collaborations for us in the future so now jumping into the coolest part the ziki Bob so the Ziggy Bob is a privacy optional privacy layer for Bob token the way it works is by using the zero knowledge proofs people using the keyboard are able to confirm the particular validity of the particular operation and transaction without actually revealing the concrete details sensitive details of the of their deposit private transfer or withdrawal such as the amount of their operation the destination addresses and so there you confirm this validity of this operation by using and calculating the zero knowledge proof snark proof within their application UI and this way only the actual sender and the receiver of each particular operation has the ability to actually access and to grip the operation metadata and to actually know what happens inside of this operation then to limit further privacy leakages and to simplify the use case the way how this protocol is used by the users all transactions are sent through the elected relayer so that users don't actually need to buy for the to pay for gas in gas tokens and instead they can use the same token for payment of fees to the relayer as the ascending which is the Bob stablecoin so here's a small snippet from the UI so basically as I said the UI allows you to make a deposit inside your privacy application from your public wallet on polygon or other available networks then you are able to perform transfers to other participants within the C keyboard pool and finally once you for example receive the salary you are able to withdraw them back to the public wallet to continue your defy Journey so right now we are looking for collaboration in multiple major use cases so the biggest one we are currently focusing on is related to everything somehow connected to payroll activities invoicing payments processing so basically a lot of organizations and crypto and Beyond a lot of dials are already paying their salaries in stable coins which is a convenient choice of currency for payment of salaries and paying them and keeping them on chain is a very beneficial use case but usually this all happens uh publicly on publicly available blockchains which is make which makes it very inconvenient for everyone involved so for those makes a inconvenient to disclose everyone's salary to everyone for people receiving the salary they are and they can be scary for receive uh salary on publicly available address so that everyone on the blockchain can see how much they receive how much they spend and how they spend it so it makes a perfect fit for the Privacy application connected to stable coins to kind of try to integrate with all those for playing salaries in stable coins yeah and we are also focusing on other use cases as well such which might include something related to vendor purchases Anonymous donation fundraising granting programs and the connection to the threat fight world and its use cases like on and off boarding between stable coins and the traditional banking processing of bank deposit remittances and so on so and as I said with the example of salaries for example how it all works so we have our employer Carol let's say who wants to pay for his people and employee privately so he has usdc let's say he's able to go to uniswold for one inch UI to swap his USD to Ball but nearly One to One Rate then deposit this whole amount to the sikibok application and then when the day of the salary came he's able to within one transaction to pay for all of his employees using the CK addresses and then once the employees receive their salary they are able to freely withdraw on their Bob back to the public wallet and so nobody really knows how much each employee receives and what he does further with his money so right now the ziki Bob application is available only on polygon and optimism that the Bob talk and expressed on multiple uh chains as well and as well as people are using other chains as well so for further and simplify the uix for our users we also made the school integration with li-fi so you have access to the widget of li-fi within our application which actually allows you to perform quick efficient and fast swaps cross chain between other your available assets and Bob so that you can use it for deposits or when you have withdrawn Bob you can swap it back to other assets on any other available chain quickly within the our UI so now a few words about compliance and our approach to to this topic so first of all we believe that compliance topic is becoming more and more important every day for every crypto project and especially it's true when it comes when we are talking about privacy related obligations we have seen a lot of and the events in the past years which were related to the to the Privacy Solutions and the lack of sufficient compliance Solutions so we also believe that no actually a single compliance solution exists that can fit and close all the use cases and eliminate all the questions from all the all of the Regulators so we believe that the the best approach we can choose here is to combine multiple compliance approaches which every on its own make life of malicious actors a bit harder while still preserving the decent amount of Simplicity and robustness of the user experience in within our application so what we're doing on the compliance side within our publication via basically screening the deposit and withdrawal addresses so that no malicious actors related to known exploits hacks or other types of listed on chain activities are able to perform operations within our privacy protocol we also allow our will soon start to allow our users to generate a cryptographically verified statement of their account which includes the history of their transactions for last month last three months or so so that they're able to generate the report and to prove to the requesting party which could be a centralized exchange the banking um banking institutions or government authorities what they actually did in Nepal where did they receive their money from and how they did it they spent it and so this way they're able to prove the source of funds the the way how they spend it without disclosing it publicly to to the whole blockchain but instead to just disclose them to a particular requesting party they were also imposing different limits on the amount of activity certain actors can perform within the pool so we have a strict limit on the amount of daily activities you can make on the deposit and withdrawal side we have the limit on the total pool size uh all of this makes life really harder for the hackers and the exploiters who are able who want to and the deposit and operate on large amount of money but at the same time it doesn't really makes life harder for typical users of our application who just receives the salary or perform day-to-day transactions we also did a cool integration with their binance and know your cat kyc provider which is basically allows you to Mint to your address to pass the kyc on binance then to connect it to the kyc enabled solvent nft token issue that on your wallet and this our application will check the existence of this solvent nft on your account and if at present it will can lift or significantly increase the available usage limits for for the application yeah so and one of the latest feature we have added to the ZK bulb and the one we are asking our hikers to use throughout the second one is called direct deposits so basically it's a solution for simple and fast private payment integration within different parking products so its main goal is to minimize the and the required efforts and quadrant for when it comes to integrating privacy features to open source wallets third-party centralized application different protocols difficed applications and so on and so the coolest part of that is that aha even though the all all of the previous Decay Bob operations such as deposits transfers and withdrawals they require users to actively participate in the generation of the snark proof within their UI which makes makes it nearly impossible to integrate such a workflow within partner products in case of direct deposits no actually educational proofs generation is required for the user and instead so Random another referred byte is responsible for generation of those snark proofs so the way it works is pretty simple so we have this potential just a few ideas who can integrate interactive Wizards so it could be text protocols the nation fundraising platforms different cross chain breaches and protocols maybe open source wallets we want to simplify the life of the users maybe something some tooling related to payroll and invoice processing which is located on chain and so all of these protocols implemented in some form of smart contracts can easily interact with the escrow smart contract for our direct deposit processing logic basically by specifying the destination CK address of the users they want to send their money to specifying the desired amount then after some time normally it takes 10 to 15 minutes the relayer which is really requested by us will be will be able to protest those pre-submitted direct deposits in bytes generate the necessary stack proofs for them in a trustless manner so that no one is really able manipulate the data in the direct deposits after it has been submitted and once this transaction from the relayer is eventually submitted to the pool contract and confirmed users of the ziki Bob are the the receivers of those direct devices are able to access the funds right away in the same way as they do by simple interacting by the simple interaction within our ckbop UI so users can continue to transfer them inside the pool to other participants or we throw them back to the public Xerox address so now a few words about our hackathon bound to what we're asking you to do is to help us to bring the financial privacy and to find the important Everyday Use cases which lacks this financial privacy for stablecoin transfers and to connect ziki Bob with any existing on-chain activities where it might matter and so we are asking you to do so by integrating the ziki Bob Derrick deposit feature with any existing or your customly built protocol project or any other application of your choice so just again a few ideas what where can we start we can build an integration with the open source wallet for making deposits into privacy pool easier and more available for public usage you can integrate it as a and endpoint and at the different protocols related to Bridges swaps and the aggregators you can do something with the purchasing of fundraising and donation from multiple users or you can build something around the payroll tooling and of course this list is not limited by only our ideas you can suggest and discuss any idea you have in mind right now or later Booth as well so we have a total Bounty of 10 000 Bob for this hackathon for the first 5K for the Post first place to give for the second price and the remaining 3K will be evenly distributed among all successful notable submissions so basically all projects which successfully will be able to integrate the keyboard Target deposits in their projects will qualify and receive a guaranteed boundary between this from this price pool of 3000. yeah and during the judging process we'll definitely take a look at about creativity novelty and the implementation quality of your solution how the ziki bobbin integration is actually crucial and integral to the overall application and how your solution aligns with the Pope and ziki about the system values of unchain compliant privacy yeah and I think we have a few minutes for a short live demonstration of how interact deposit works so I can log in into the zkbop UI right now so I have created previously a couple of days ago test SDK account so we're gonna wait until everything is loaded so what we see here is that I have a CK account I have connected a public meta mask address to it on which I have right now 5.9 Bob tokens I have a ZK account with a total balance of 14 Bob if I go to the history yeah I will see that this balance of 14 is obtained usually so a couple of days ago I made a deposit of eight Bob then someone transferred to more Bob to my receiving address to my receiving ZK address and finally I made a direct deposit to this address uh to this account as well so in order to just do one more generic deposit to our account we're gonna need to send two transactions so just for the possibles of this demo the simplest way we're gonna do it is through polygon scan UI so this concrete deployment is on polygon so the first transaction is we need to actually approve the tokens the Bob tokens for usage into the interact deposit contract so that's a quite typical flow for any reply application so we're going to send an approval transaction so it's good and then in order to send the direct deposit from the polygon scan UI without generation any snark proof we're gonna create a new receiving CK address in our account tab we're gonna go to the second track deposit smart contract and here we're gonna find the direct deposit function for making such deposit so we're gonna pass then address we want to make our deposit into then we're gonna choose the amount let's say we want to deposit three Bob tokens so the Bulb Has 18 decimals so we're gonna also type 18 zeros and the fee for depositing is 0.1 Bob so we're gonna add that here as well so that the receiver will actually receive free Bob and then we also have a third parameter of fallback user which is a basically alternative receiver for this particular deposit in case it cannot be made through due to some compliance issue with the with the sender with similar problems so since we are sending the deposit to ourselves we're gonna just copy the same address we're using in our metamask here I'm going to send this transaction so we're going to see that from our account 3.5 Bob will be eventually deducted during this transaction so yeah and once the transaction let's wait till it's displayed so yeah we have successfully submitted a direct deposit from our address to the cable direct deposit it's more contract so now we're gonna have to wait for 10 to 15 minutes for the layers to pick up this transaction to put that in a batch generate a necessary stack proof and submit it to the main Z cable pool and after that we're gonna see the one more in Kevin transfer or free Bob with this direct deposit label on our account and the total balance of our account would be increased to 17 Bob so yeah that's pretty much how it works yeah so for feel free to access to subscribe to our Twitter feed the dogs about the Kebab on our website we have a cool page for specifically for this hackathon regarding direct deposits come to a reboot for any questions for any if Global and yeah thank you very much for your attention I think we have five minutes for questions here if you have any if you have any questions so please raise your hands are gonna bring their mic oh yeah so how um volume dependent is the Privacy protection so like if there's not that many people doing deposits and withdrawals is it easy to track like linked together the transactions yeah so of course this there is a well-known concept of anonymity pool so and it works differently in different protocols since in our protocols there are not only deposits and withdrawals on some fixed amounts but you can also kinda after you make the deposit split into in multiple withdrawals so make transfers within it within the pool so actually the funds become really dispersed over time pretty fast and so if you even with within like hundreds of users it really becomes nearly impossible to tell what really happens and how are they connected so yeah basically I think even existing anonymity set for the Z give up is already quite enough for for the majority of people so if you're gonna go into the contract open the token transfers here we'll see that a lot of stuff going on here and there is actually no any way to tell how this depositors and withdrawals are connected with each other how they can exchange it the money within the pool so kind of becomes quite untrivial to to the reverse engineer um what is the best way to like with oh sorry oh so is there a way to withdraw a fund on on chain Yeah Yeah so basically once you have this balance within the ZK account and you want to withdraw to your public address you're gonna just select the withdraw tab I mean without uh without the UI is there a way to call that on solidity or yes or it's uh not possible to call it directly on solidity since in order to withdraw the user must generate the stack proof so the solidity on its own cannot uh can generate the snack proof so right now the only option is to use the UI for generating these proofs so we have like a more low level for like this wasam Library which is responsible for this proof generation necessary SDK so maybe we're going to build some widgets which gonna help to integrate this into some other external uis in some time in the future but yeah anyway so there is this lower level Library which is responsible for proof generation and this probably gonna be the only way the person is able to initiate and submit their withdrawal but I think is the Bob swap deployed on any Testament in now any testing like Glory or separia I think no unfortunately but probably we can deploy it some no problem so yeah it's deployed on polygon optimism and all other networks yeah integrated with one inch but yeah if you wanted to to happen on yearly or simple yeah we can definitely do that no problem not right now but yeah maybe within this hackathon yeah I'll try my best yeah how strict is the deposit screening like with a wallet freshly funded from tornado be um sanctioned well I think you can try I'm not sure it will be immediately flagged but so we are using the trm for now is our screening provider so it's we kind of do not screen ourselves so we don't don't uh not 100 sure what uh the quality policies with ethereum how this score factoring uh depends on the different sources on the amounts and how you like and the different timings but uh I think it obviously marks very obvious use cases when someone launderers hundreds of millions of dollars yeah definitely gonna Mark those definitely not gonna Mark you know casual wallets of simple users who are like transferring you know value of below 1000 but what happens in the middle it's really hard to tell usually and uh yeah it all depends on how this ethereum provider behaves and they do not actively disclose what are their politics and how they uh calculate these score factors what was the name of the the people in charge of the sanctioning again uh trm Labs tiro trm or yeah thanks for stopping by thanks a lot foreign
Automatic transcript — names and jargon may be misspelled.