Introducing Solidity “2 0” with vlayer - ETHGlobal Bangkok 2024
ETHGlobal·Thu, Oct 9, 2025, 12:00 AM
Join us for a workshop with Mark Kirejczyk from vLayer Labs titled, "Introducing Solidity “2 0” with vlayer." Experience Solidity like never before with vlayer's smart contract superpowers, including: - Time Travel - Teleport - Web Proofs - Email Proofs The new execution model not only extends Solidity, but transforms it. Imagine complex computations running off-chain, unlocking privacy and custom functionalities beyond traditional EVM limits. Discover Solidity reimagined - Solidity “2.0.” ETHGlobal Bangkok 2024 was a 3-day hackathon that took place November 15 to 17, 2024, and brought together the most skilled web3 developers, designers and product builders from all around the globe for a weekend-long adventure to advance the Ethereum ecosystem! ----------------- Follow us: https://x.com/ethglobal Check us out: https://ethglobal.com/ Email us at: hello@ethglobal.com
Transcript
[Music] so let's talk about vayer who heard about vayer before oh just one person excellent oh boy oh boy oh boy all right so you're going to be really excited who's a solidity developer Who develops everyone EXC almost everyone awesome so guys vayer is bringing four new features to solidity not one not two not three not well four so time travel teleport web proofs and email proofs all right so before we go into the features let me explain you new execution model so if you familiar with ZK or you know blockchains like Mina or maybe like Alo that already might look familiar to you so we have a two new smart one two three that's okay uh just Che now but now can you hear me they say they can't hear me I'm getting extra two minutes for those sound issues all right I can go awesome so prover is a smart contract solidity smart cont like any other smart contract but you executed offchain verifier on the other hand is a normal solid smart contract that you execute onchain and whatever you calculate in prover you can take the results and put into verifier so that you can use those results results on chain let me explain so ah yeah and the important thing about prover it has all the superpowers so this is aover looks like normal smart contract it inherits from the base contract called prover and you can see it's using set chain IDE and I'm going to explain in a few slides what it means but you can think about it as uh yeah that's actually just teleport feature so we teleport into ethereum to block 1229 2922 and then we check the balance the next call after that we're going to check the balance of the nft in this case this is uh board Yak eight club nft and we can see and we can see what the owner whether the whether the whether this person was the owner of the nft but I want to draw your attention to what we returning here and what we returning here is a per we return a proof of execution and we're returning address of the owner and then we go to verifier and verifier is a smart like any other it inherits from verifier and it takes two arguments proof and address so those are exactly the same arguments that was returned by the prover and it has this magical modifier only verified which makes sure that the two arguments that it takes are the result of the execution of the prover and that's pretty much everything you need to know about prover and verifier so now we can go to the super powers and we're going to Ty with time travel and already you get a sneak peek of it so we have this function called set block it has a single parameter which is the number of the block you want to time travel to and the next call after this specific set block going to be executed in the context of the chain as it was at a specific block does that make sense to everyone easy peasy right so here's an example let's say I want to prove on train that someone is a holder I time travel to to a very old block I'm time travel again to another block that is old but not as old as the first one I take the balance off at both of those blocks and I return the minimum and that is considered the hle amount yeah the second superpow is a Teleport very similar to time travel but now I can teleport to another chain and I do it with a set chain function set chain function has two parameters chain ID and block number I want to teleport to and the following uh and the following call after set chain going to be executed in the context of this specific chain of this specific block so this is even so precise that it runs different hard Forks if I if I teleport to or time travel to a specific hard Fork right so here is an example of a method what it does is I can calculate the balance of an account across multiple chains right so in this case I'm aggregating the balance from optimism base for a specific account all right two more to go so web proofs and let me start with an example because it's a little less intuitive to to think about the web proofs so web proofs are like private oracles so you can get a private data onto the solidity smart contract and here's an example let's say you are a real world asset manager and you want to issue token maybe it's a you know gold token or maybe it's a stable coin so if I want to generate if I want to issue mint a new token I first need to prove go to my bank and there is a special extension involved so you go with this extension you go to your bank you get your balance on the account and you hit that generate proof button and when you do the proof is generated you go back to your application you hold your proof in your hand and now you can submit an issue toen does that make sense of course someone can have a million dollar on the account issue a lot of token and then spend the money so you probably want to do it periodically and realware assets will never going to be fully permissionless but with this technology we can make them much more close to trust minimize Solutions versus what we have today which is you know you have to trust the manager of the token that he's honest and another interesting examples are web to web free markets where you can use web free code when you can use Smart contacts to trade things in the real world and and one example one very specific example I'm going to explain is building an onramp when you basically trading uh tokens for Fiat money and the way you could build it and there is a team that already innovated on it called ZK P2P so what you do is you're going to you you start your transaction you go to a bank you actually do the transaction in the bank you send the money to a specific bank account and you generate a proof that the money was transferred and after that you go back to the you go back to your D app and inside your D up you can claim your tokens that were stored in the smart contracts does that make sense easy peasy yeah so here is an example example code for the web proof so this specific code what it does um it basically allows you to mean an nft with your Twitter name so this is in solidity you get the web proof the the content of the page in this specific context we would like to go to um Twitter account to the settings where it starts your handle and then you can using special special pre compiles for Bon you can get the username from that and that way you can prove your own specific Twitter account boom as simple as it is so yeah so web proofs allows you to do private aration or you can think it as a private Oracle uh there is a Json pre-compile for parsing Json some other promiles might be coming for uh for HTML whatever else and there is a web browser extension uh that you can use to obtain so you configure the web extension you tell the web extension what you want to get and you go through all the steps and here is how you do it you simply create a web proof you put your own logo there in the in the extension and then you can just tell this is the starting page we want to start with this is what you expect user to do and then when the user is in the right place the proof going to be generated automatically does that all make sense to you all right so let's go to the last super power the last superow are is email proofs so that's very similar to web proofs in a sense that you can uh take your data from the email and use it onchain so here's the first example wallet email recovery so let's say you want to recover you lost your private key and you want to recover your wallet you probably need to use account abstraction for it or uh you need another type of smart wallet but what you can do what you can build with them that is you can have this website where you go and you say hey I want to recover my wallet this is the address of my wallet this is the new address I would like to have control over my wallet you hit that confirm button it sends you an email by the wallet recovery service and this email has specific structure in much specific template and all you need to do is reply yes you reply yes to this email and everything happens under the hood in solidity you can verify the authentic of the email and you can and you can and you can recover this wallet permissionless yeah and I'm going to also go back to real world asset example to give you a little bit of a comparison what are the differences and similarities between web proofs and email proofs so uh let's say you're uh let's say you want to issue a gold token that is a stable token um tied to gold right so it happens that in many countries you need to a custodian and custodian needs to send you updates about what is your state of your custody so and most of the time they do it with emails so this time you're going to need a plugin for the for the for the email so you go to the admin panel you go to your inbox you find around email and you need this special button inside your uh inside your uh email uh client you hit that button generate approve and you know the rest of the game so how does it look from the code perspective well it's very simple you just provide unverified email there is a special method called verify that allows to verify authenticity of the email it's fairly simple because all the emails are designed by the mail servers so we just verify if the signature is correct and yeah and then off you go you can start parsing those fields of the email whether it's from subject body and we give you regular expression pre-compile so you can do it easily inside C all right so uh yeah it's very easy to install you just install vay you just download V layer app you install it with v layer app and then you can V layer in it minus minus template and we have a template for web proof email proof time travel and teleport so you don't need to build it from scratch you can start from the example you don't need to do the photos the only photos you need to do is of this address book. vayer doxyz so so this is where the documentation is we have getting started every single feature explained in detail including all the parsing stuff for Json and R Expressions all the different nuances you need to know and I pay your want to just draw your attention to chapter four which has all the information about how to use it from JavaScript how to run proving how to run browser extension and all that stuff yeah and verify data is not our new original idea you might have seen some verified data like ZK TLS ZK email or uh co-processors so I want to mention all the things I ain't going to be talking about today so this is all the things you don't need to know and care about when you're using vayer so you don't need to know cryptography you don't need to know what our Prime fields and elliptic curves are you don't need to know learn new languages and what circuits are what guest IDs are and all that stuff you don't need to know what the records are you don't need to know what the storage proofs are and Mal mountain ranges you don't even need to really deeply understand how the ethereum works in a sense you know what are the headers what are the slots calculation maybe some of you were on one of those presentation when people doing cross chain stuff and you know there is a 10 minutes presentation explaining how it works and then another 30 just on the slot calculation so you don't need even to know how to do AI whatever prover is returning you're just flashing to the verifier and it's done that's all the ZK knowledge you need to know and you don't need to know fancy you don't need to study fancy architecture diagrams so if you've been in the space for a while and you might stumble upon one of those diagrams each of the diagram is taken from the beginner section or installation sections or how it works sections this is not Advanced diagrams in the architecture chapters so this is our architecture diagram for comparison and how we doing with time we still have 5 minutes so we're talking about the most important thing of the day which is the bounties we have we have 10,000 in bounties uh 4,000 this is new technology a lot of new possibilities people are discussing what you can build with that but we think we're only scratching the surface and there's going to be so much more to build that we didn't even think about so the biggest Bounty $4,000 is for most inspiring use of vill superpowers and there is also 2,000 for the best use of web proofs 2,000 for the best use of email proofs and 2,000 for the best use either time travel or teleport all righty and we have merge B Bounty so polygon is one so there is a super exciting stuff that polygon is doing and we're super excited about all the different ideas how it can be used on polygon so take a look at that uh we love polygon guys hope they love they love us and yeah so there here are some ideas here is more ideas how you can how you can use V layer with a polygon and how you can uh grab those merge bounties and we also have merge bounties with circle We Love Circle you can see in our examples we use usdc all the time so there is two bounties we think they're going to be especially interesting for doing merch bounties with v um yeah thank you and we're ahead of time three minutes maybe there are questions yeah let's talk about web proofs I'm going to repeat a question sir no worry so there so the web proofs let me go yeah so there are significant limitations and things you need to be aware when you build it's all in the documentation but I'm going to mention it specifically so first of all your web proof you want it to be small 1 kilobyte is great 10 kilobyte is fine everything over few dozens of kilobytes is probably too big because there is a huge overhead there is a multi-party computation algorith in under the hood and it has 1,000 overhead so it means for every kilobyte you want to prove you need to send one megabyte of data over the network uh this is getting better uh early next year we should be a we should be having 100 times overhead so 10 times faster but it's never going to be super fast because it's Advanced cryptography and it's going to take time to optimize and it's never going to be you know one time so that's one thing to know about uh second thing to know about we provide Json pre-compiled for parsing Json so in theory you can parse HTML you can parse XML whatever else it just the Json is that we support initially as the most popular and important format to to use so you probably want to use for those Json related things or for those pull requests for those sorry not pull requests but those uh Json those call those ajx calls that returns data in Json so most often times when you have single page applications that's where you get this data fairly easily right under the hood there are some put requests and one thing to remember there's a lot of confusion if I think about web proofs you can think it about it as a private Oracle so when you have an oracle it allows you to get data from the public sources the innovation of the big innovation of the web proofs is you can take this data from your bank account without risking your private data right so for example there is a special way to reduct security sensitive data like uh session keys right so this is the power of the web proofs uh you still need to trust like you need to trust Oracle you need to trust a notary which is basically a private uh Oracle so that's something to keep in mind of course you can run your network of notaries and um we are building uh people are building we are building that so that's going to happen but yeah this is the security trust assumptions that's important to remember about one last very quick question very fast question I have a question you want to build you want to get some those sweet bounties from V yes woo thank you very much guys see you on the judging [Music]
Automatic transcript — names and jargon may be misspelled.