A platform where you can write JS scripts that run in a ZK-VM to offload on-chain Solidity computations.
zkora is a project made for the smart contract developpers of Ethereum. It provides a simple way to:
This way, any value computed off-chain can be used safely inside a smart contract and therefore reduces the cost of smart contract interactions. Smart contract developpers can now spend more time on core features without worrying about saving gas for complex operations!
zkora combines all the features described above in a single webapp where the developpers can write Solidity smart contract and JavaScript programs (that will run in a zkVM), then use the result of the JS execution along with the proofs of execution inside their smart contract to verify the validity of the off-chain computation. It also leverages the ERC4337 Smart Accounts to authenticate users in a very simple way.
zkora is made using various tools and technologies.
On the frontend side, we used Next.JS to power the webapp. To provide a remix-like development environment inside your browser, we used the Monaco editor. When interacting with Web3, we used web3auth with Gnosis Safe Smart Accounts - it provides a simple way for developers to authenticate to the platform. To compile the Solidity smart contract, we used ethers.js, a very well-known library that has a integration with Gnosis Safe Smart Accounts.
On the backend side, we used the Risc0 zkVM to execute the JavaScript program inside a in-memory V8 instance. This V8 instance runs inside the zkVM and therefore can be proved and verified. The script is sent to the backend by the frontend via an HTTP call - the backend runs a Rocket server. Risc0 enables the core of the application. A simple program written in Rust which spawns a V8 instance can be verified and enables complex use-cases for developers. It is worth mentioning that the V8 instance is being verified, not a particular script, so anything written in JS - a for-loop, a database lookup, an HTTP call - could run and be proved!