Aleph March'25 Interoperability Summit - ZK Chains Showcase
Aleph March 2025 · 21 Apr 2025 · 35:37
Members of ZK Amigos and Moonsong Labs introduce the ZKsync elastic network and show how to launch a custom ZK chain with the ZK Stack. The session first explains why account abstraction and interoperability make chains feel invisible to users, with examples such as Lens, Abstract and Sophon. A live walkthrough then covers choosing a prover, rollup or validium mode, the base token, system contracts and a block explorer. It closes with a single sign-on system that uses passkeys and zero-knowledge proofs through a modular smart account.
Topics
From Aleph March 2025, hosted by Crecimiento.
Transcript
Forevelopch. blockchain security blockchain. Okay.
blockchain. Networks. [Music] Cynet. chain blockchain.
I guess right presentation still on on on but we can do it on English either way. Basically where comes elastic from the concept of elasticity and it's actually basing on the more demand for user comes to network the more the expansion that the chain will have. This make us sure to still cover all the information that is coming to the chain.
And you can think it with a little example that is for example a computer. You don't need to connect hardware, SSD. No, you can just use Google Drive, Outcloud, Dropbox and start putting content there. Elasticity magic, right? Uh about user experience UX Cync focus on two principal concepts that I absolutely love that are accountraction and interoperability. My concept about blockchain the future and casing concept is that we can only use one device for example my laptop my phone we can use face ID biometrics to sign in create our own wallets no need
to download extensions no need to sign transactions no need to pay gas fees uh we can use different cate chains different applications in those chains without even know that we are actually using other chains without breaching interacting with other users, uploading documents. We can all do that thanks to intervability and that's actually about uh what CK sync elastic networks are doing. Imagine, I don't know, having uh $1,000 on Sik Singera, putting them on a start making Jill and using that liquidity, I don't know, maybe on Lens network and start collecting post from other creators on other chain. You can completely do that thanks to the
interrupt update that is coming to elastic networks. Uh about account abstraction, if you don't know that abstraction is natively from CCN. So hey that's a blast to for actually uh building on CK sync and a contest fraction is a general concept that has different things. The guys will probably go deeper on that later on on their part but basically we have smart wallet so you don't need to download an extension. You just create a new wallet based on your email basing on your bomatrix and even for app developers you can set spending rules. So for example a user can't spend more than $1,000 in 24 hours. That's a good security metric for on boarding new user for sure. Easy
login again biometrics. Boom you are inside the wallet. That's a simplex UX and concept that I really love is account recovery mostly for social apps. For example, Farcastaster is one of the biggest protocols out there today on on blockchain and they are using social recovery. So if you lost your keys that's not a problem anymore. Uh so elastic network a little recap of what we just talked but basically it's um some is a different chains different cate chains bas building inter building on the elastic chain that are interoperable between all of them um interoperability is natively there's no friction and most importantly sec uses secroof for security measures some
examples about my favorite um chains in the elastic chains less network uh it's more focusly on content creators. It's basically they are building like a social decentralized social graph. So you can post content there. And if we are thinking about social media, think of about a Twitter like you're posting tweets every minute. I'm I'm not sure about the metrics but probably millions of tweets every minute. So imagine that on blockchain we need hyperscalability. So second chain is for that. Also about a traction imagine using a social media and needing to sign transactions using a wallet. That's a real problem. So again, account abraction is super useful because the smart wallet, pay master, etc. Another example that is super trending right now is abstract chain.
Abstract chain again is most focally on consumer crypto. It's a hub from creators. You can tip other creators. They are using a global wallet and that's amazing because you have a contraction. You can create smart wallet but it's only focus on one app. So one app, one smart wallet, another app, another smart wallet. a global wallet. What it does is that you always use the same smart wallet for every app but in the same chain and that's pretty innovative actually. you can tip other creators. Super useful. And the last one, the last example is Sophon that they are actually doing CK TLS. For those that don't know, they are basically bringing creators online onchain. That's a great phrase actually.
But they are, for example, if you are a YouTuber or you have a channel on Spotify and you have like a lot of earnings, a lot of followers, you can easily put that information on chain without needing to map your wallet with your social account. And that's pretty interesting and pretty useful to create different data endpoints for any other app building on CK chains. So yeah, that's all for my part. I hope you enjoy it and guys, I will give you the roll. Go hang out.
directly. Almost there. Almost there. No. No. Don't change origin. No. Great. Well, thank you everyone for
being here. Thank you for having us. We work at Mun Labs. We work in particular in the field developing solution for CD sync. My name is Morte and I'm Juan Ria and the talk we're going to do today is every chain every user all at once. I know it sounds familiar from a famous movie. It's not. It's just coincidence. And I'm sorry in advance that I'm extra extra not funny on English and I will try to do my best. So let's start. The first uh thing I want to talk is about well has been talking just a moment ago about like this different chains these different chains build on elastic ecosystem that
they offer different properties and well basically this morning I just woke up and I said hey I want to have my own chain but then I started feel frustration because that is so hard and you need to do a lot of things you need like your own validator You need your own economics. You need to to develop wallets. And that's frustrated with me. Mia, you don't know to know you don't have to know anything about that. You just have to have a minute to discuss CK St with us. C is this new framework developed by CK Sync. And what it allows you is to create your own CK chain, fully customizable, and with every parameter you want, every configuration
you want. If you go for gaming, if you go for defi, swampy talked a little bit about son. There are other use case and you can customize your own and it's as simple as just using zik stack. Yeah. And what you can do to achieve this I don't know nfd focus app or social focus chain is to change parameters on the deep level of how the chain works. So for instance, here is us creating a single chain I think yesterday. This is a little bit with the magic of the cinema because it's going to be a little bit faster than normal. But here you are just installing C stack and also a requirement for C stack is to install
foundry not normal foundry but found sync because we are going to be deploying a lot of contracts. So here we are doing C stack ecosystem create. We have to keep in mind that Sikstack differentiates e ecosystem from chains. In an ecosystem, you can have multiple chains. So it's like a way to group different chains. For instance, here we are creating an ecosystem called lumen. I don't know if you watch severance. Severance fans here anyone really good TV show we are cloning Sincera we are creating a chain called cold harbor and the chain ID 271. And M if you want to elaborate a little bit on the Yeah, totally. Uh so here is asking us to
provide no proofs for CPU. Basically our chain is going to leave as a second layer of some of that chain. Yeah. So this option is to calculate zero proof for this execution in our chain and send it to the to the base chain. And this is to me one of those crazy things because as soon as you choose GPU we are not going to use GPU right now but if you choose GPU basically this is going to spawn approver for you a prover using question is a created by matabas basically sync that is basically all the bus that you can choose all together like it uses the starts it uses snaps it like super optimized to run in like
normal grade CPUs basically if your computer can run Call of Duty, it can run motion and it's there. So you just need to click that that thing in there to select CPU and you have like a triple a zero knowledge technology running in your computer for you. Yeah. Which by the way is open source. It's totally well documented. So I totally recommended to try it just even to learn how how it works. And the next thing that is going to ask us is about like it's about if we want O here if we want to our chain is going to have some state and we might want to send the the how we
build a state to the base layer that is usually called a rollup or we can decide not to send the state differences and that is usually called palidium. Do you choose one or you choose the other one? You have different properties on your chain. Both are valid options. But here selecting that that is again a lot of infrastructure is shows an option in this wizard. Yeah. And also here you can choose even the base token like of course in the chain there are going to be fees and user are going to pay fees but you can check you can change in what like token you pay the fees. For instance I think in soft they use soft as a base token. Here we are just going to use it but if not you can pass any
ERC20 and the user will pay the fees in that ERC20. After that of course we are going to select it some more configuration and finally it's ask us hey do you want to start a containers because under the hood these are just modular components in docker containers. So there's no like black magic here happening. Yeah. And is this like the same like and under the hood is the same infrastructure that is securing like basically everything that is that is like the internet and everything that requires security right and also the same technologies that we use to deploy other apps. So you are familiar with web development or with any kind of development you can go in
here and understand what is going on because this is just docker at this point. Yeah. Now is it initializing chain? It's deploying the system contracts. So we are going to see a lot of broadcasting happening now and also compilation with CC and S. We are just initializing the chain. H as Mika said this is like the same thing as Cera you have in here in your SQL chain. It's not like you are not missing out on anything. Cera has the same properties as your secret chain. Here we are broadcasting a lot of things because for instance we are deploying the system contract. We take take care of the balances, the nonses. If you want to deploy something, you go through a system contract. Also, this is another like the system contracts are another
cool part of this like part of the design of the chains is that a lot of the important parts that happen inside the the the consensus of the protocol happen in these system contracts that as you can see we are deploying them here. Yeah. Which means that you can even go and change stuff on there and since as for example the balances of the accounts or how you handle the nonsenses or basically a lot of the core parts of the of the of the chain are in those contracts that you can go and personalize and put whatever behavior you consider is right for your specific use case. Here we we already have the chain going like we started the server.
Here you can see we are extending things even to L1. But this is pretty boring just looking at this. So the next thing we're going to do and the next thing that SK stack allows you to do is to create a explorer for you to to be able to see what is happening. The explorer consists on two things like a pretty web normal app. It's the front end and the back end. So we are going to start by initialating the explorer. Here we are going to do stack explorer in it. Just this basic configuration. So you can point the explorer to your chain because you can have a multiple chains. So with multiple explorers. Next we are going to start the back end of the explorer which is pretty boring itself.
And then we're going to start the front end of the explorer. Docker doing docker things. And finally we are going to start the front end and go to the front end like this. And you get the same exact explorer you get for sync era or for for main for sepia. You get the exact same thing with the exact same features you wanted to ask something. No. Well, the same thing because this is open source. Even again you want to change it. You want to customize it. You are invited to because it's open there for anyone to do whatever customization they want. We see that the chain is already started. We have some blocks. We have trans some transactions. And we have our network as the main network in explorer. Next thing we want, we have the explorer, we have the chain, we want
to interact with the chain, we need balance, we need funds. So we are going to start something CI calls the portal which is just a tab that allows user to bridge funds and to also see the transaction history and send funds to another person. This is the portal. You don't have to do pretty much anything. Just start the portal and just touch whatever and miss the whole presentation here. Okay, so we're going to start the portal. This is the portal and we're going to bridge some funds from our base layer which is ref in this case because we choose local host. So after doing this we're going to send us some balance and yeah you can no same thing as before
this is the portal used in production right in a familiar experience to what people are used to see in bridges in in the chain right like in production environment and again it's one command and you have it all together working we're reaching and that's it and if we go to our account we are now rich luckily And also if you go to explorer we can see our transaction. This is my account with only one transaction that is this funding we did with this obscene amount of it. Well okay so what we did with this command for creating our own ecosystem chain is deploy our chain that is not a
monetary system instead is a series of services working together. We have for example the prover that is in charge of this question that I mentioned before this algorithm to the cate proof of every transaction execution. We have our ckm. We have our portal and explorer the two front ends that one should show the server. This is basically which is in charge of taking all the transaction and do them in the right order and it's like the the core of the situation. the spark code that we use and well you can go there and if you do when you run this you can do like docker ps you're able to see the list of processes and it's the same like it's totally familiar for whoever has some experience working
with any kind of application and also the other amazing thing is that okay we develop our chain we created our chain but the chain is not isolated the chain is part of the elastic network ecosystem. So now just by being there we are compatible with a lot of stuff. We are compatible with sharing. We're compatible with every technology that points to the elastic network. And that again make us start from a lot upper point right yeah and also the system is not alone and and you as a developer are not alone also because well batteries are included. That means like there are
a lot of tools that you can use that are already working. There's a lot of contracts that are plug and play. You can use like deploy unis swap. You can deploy a and you have tools you already know like car for instance or sorry for the self reference but you can use found sync also which we are the team behind sync. If you have issues, you can raise them to to me. But and well, so just to do a small recap at this moment, we have our own chain which all the components and all the basic things are needed like an explorer or portal. H we have apps, we have like a script that you have in our
in our chain and it's like open source. We can use it. We have tooling for our developers to work in our chain. The only thing that will be awesome now is also make the interactions of the users with our chain as smooth and as easy as possible. So here we go to this second chapter every user. So honey, you told me that these things were useless. No, no, no, no. I never told you that. These are public keys for me. They are not users. User don't exist. That is the classical distribution between like UX and blockchain, right? Like for the reason we keep thinking that a user is an
address and a user is not an address. Analyst is a hash of a public key and that's not that's not enough to represent the complexity of a user interaction. So if we start think a little bit deeper maybe what we can start like finding the difference between signing which is what we always say like we sign a transaction we sign that's the word that we use but maybe what we start what we want thinking is in authorizing what we want is authorized interactions. Yeah. Yeah. Even if you go to a shop and you pay for something like behind the scenes you are authorizing that amount of money to go from your pocket to the shop for instance. So we want to abstract a
little bit from the implementation term of signing to a more authorization because you can authorize using your credit card cash you have a lot of methods to do it. So we want to abstract a little bit from signing to authorization and then we want to think on this case style. Yes. Imagine that we have a wallet and that wallet is shared between two people. So what we want is to ensure that those two people have to both provide authorization in order for the transaction to go through. So the way that they're going to implement this like this is like the client of the sh code. We are going to show code in this talk. I hope that everyone is
comfortable. H but the idea here is pretty straightforward. When we create our wallet, we are using two private keys. These are going to be the two users that are going to like be part of this interaction. And last then when we want to address the transaction, we want to just get the two signatures and send them together and use that to authorize the transaction. So how do we make this work on the other side right like that was a client they want this to work on our chain so for that we're going to use this concept of account abraction and we're going to try to explain how is this implemented by see sync in the elastic in the elastic
ecosystem basically there is like these three main methods validate transaction execute transaction and pay for transaction and there is like a little plus that is check if a signature is valid that is also another thing that I user might want to do, right? Maybe you are not exactly a transaction, but you have something offchain that you want to check that you were the so of course. So, this is kind of how it works. What our chain is going to do for this transaction is first take the account and ask it, hey, this transaction is valid for you like are you agreeing with me executing this transaction? And if the is the the accounts, no, well, there is an error.
the transaction is not executed and that's it. But if this returns true then it's going to ask for the account to execute the transaction and lastly of course I pay pay the fees right so that is basically what the system is going to do but what we have to do from the solidity side well it's pretty similar to what we showed in JavaScript but for instance this is a two user multic contract that implements this trait as Mika mentioned with the functions we need validate transaction, execute transaction and pay for transaction and it's implementing I account which includes these three methods. So the
same applies here we have two addresses like let's say it's a wallet between me and Mig. So Mig's account is the owner one and I am the owner two. For instance, the constructor pretty self-explanatory is mainly the same. But we see here in the real implementation that we are calling this valet transaction which is the same function me explaining the pseudo code we we saw earlier that here it's interesting because we can see a little bit into the implementation or the inside of of sync because for instance here we have we increase the nons we always like hear this like hey when you start the transaction increase the nons okay here we see how the nons is incremented it's
not like magic we We are calling a system contract which knows the nonses of the accounts and we say hey please increase this nons and also we are checking something obvious that we have balance to do the transaction and after that we are checking also the signature mig if you want to yeah so well eventually we verify the signature is another method of the same contract and again this is just like validations on the structure of the signature And eventually two ECDSA like specify a signature using a elastic using sorry elic and well what you can expect right
we should verify the two signatures and check that both of them are true and what I love about this is that eventually the the the implementation match pretty well with what we expected it to be right yeah So we validate now if everything is fine we need to execute the transaction. This also gives us a clue about what's happening behind the scenes. We have a special case there which is the first if that if the two you are sending to is the deployer system contract. H this is a difference between like for instance in EVM to deploy contract here you need to call a system contract which is this the contract deployer and you need to pass in the factory dependency the bite
code we don't have to go into that but this is a special case of a transaction and so if it's a deployment you call the system contract employer but if not you do a normal call that's it there's no like any other magic here and lastly you pay for the transaction which is the last method you can yeah just a comment all the snippets were taken from the like if you go to the account abstraction page on the CC inbox we're taken from there and there is even deeper explanation there regarding like more comments in the code and stuff and it's super interesting every every example on the repo is something very nice to understand how everything works under so this is the idea of a construction and to me it's a little bit like the sky
is the limit right you can implement whatever kind of interaction for the user that you want like to validate the identity like as soon as you can code it you can implement it and not only that like you just if you start thinking that you can just code whatever you want you can you can start doing like things like okay in this situation validate transaction in this way and this situation is use this other way you can think in a web tool this could be something like normally you validate you identity your password you forget your password you validate by proving that you have certain email addresses, right? And not only that, people start thinking, okay, if you have like modules that I can take in and out, right? And I have like an account that I
can like build with different parts. And this is the idea of the modular accounts and the amazing things of the modular accounts is that they are already built for us ready for our new SQ. So the last uh chapter right now what we want to do is take what we have in our in our new chain take this idea of the construction and match it up together and if you have a second another second I always talk about keys because if we are going to integrate with our web true experience in our chain we should not take the web true experience of the past that will be passwords right password have all sort of problems people lose them people lose
them, people lose them again and then after that hackers take like control over the passwords and hack people's account. So the solution that the industry got to this are basis baskets are W3C standard that basically allows devices and browsers and oss to generate keys for the users and those keys are scoped per domain. So is there is no possibility of fishing in in that in that case. So me you're saying to me that we can have security transparency decentralization and also web two UX like my mom can use this. I'm not telling telling you that.
I tell you that it's already there and it exists and it's ready for us to use and it's called SSO the smart sign up and I we're going to show you in a second this already working on sepoleia we're going to show the CCA version and this is public anyone can try it and you're going to see that what is happening right now that pan browser is recording for authentication using his fingerprint and that just created an account on Cas in Seolia using this this this contract the SSO and this is Spanish address and you search for the address the address is a contract and we can even like if you go to the contract
we can even I mean it's not verified so we are going to see source code but this is the code of the contract and well this is already using this idea of the account abstraction and it allows you like it's a modular account anyone can develop more modules and add them. So this is there and it's ready and it's open source and actually if we go this camera with us and we go back to the awesome again this is open source so you can go to the repo and check by yourself how it's implemented. There is a few a few parts I want to highlight. This is a function that puts the pass key signature into a
transaction. This is VM. Before in the previous example, we use ethers. Those are the most common tools and sh to work in with ethereum or with with EDM. Both are available for elastic chain final foundry. So the main the most powerful tooling is there. And if you see this function, this is like first this is requesting the browser, hey please sign using the user pass key and use the hash of the transaction as a challenge to sign as a thing to to to sign. And lastly, this function just formats everything in the way that smart contracts expected. H this is the contract side.
As you can see, this is basically valid transaction and it calls web verify sending the signature and the web verify to mean is another super interesting story because it does virtual validations like it checks at the cross origin. We summarize a little bit this this method that there is more virtual authentication at this part. And lastly, it finishes doing a P256 verifier. This is a cool is a different the human one use materium but it's still a little it's the same kind of cryptography and I mean it ends up ironing in a in a terrain that is well known you just need to implement and you can use fast inside your context so yes
we can have both we can have both so yeah just to end up we wanted to like make a quick recap of three points uh like you saw creating a secret chain is easy you can do it yourself, you can do it now, you can fully customize all it's super super easy. And not only that, so all these components that the C is using are open source and I'm ready there for you to go and as go as deep as you want and learn how the how the worker interact together. Then well accountaction is native in the protocol. It's just a extremely powerful tool that brings a lot of possibilities.
on the table to for everyone to try. Yeah. Yeah. Not not only for everyone to try and to tinker with, but also to try to think a little bit different about how we think about users like they are not just addresses, they are users, they people that want to use our chain or want to use the protocol etc. So this account abstraction enables us to start thinking that way and well SSO is kind of one example of the powerful and the versatility that you get when you use these kind of technologies. So I believe that in certain ways it's always for sure let's use it or not but those is an invitation
to explore what other things can be done with this technologies. Yeah. So this was every chain, every user all at once. Thank you. [Applause]
