ZK Proofs 301: zkSync & other zkEVM
Table of Contents
Let us explain how zkEVMs work and why they are such an important innovation.
- A zero-knowledge (ZK) proof is a cryptographic technology that allows verifying that a user knows certain information without asking them to reveal that information.
- ZK proofs are the basis of one of the two types of blockchain rollups – scaling solutions that process transactions off-chain, roll the results up into a single transaction, and upload it to the main blockchain (usually Ethereum).
- Zk-rollups generate a zero-knowledge proof (SNARK) that verifies that all transactions in a batch are valid. The proof is very lightweight and cheap to post to the mainnet, but computing ZK proofs is resource-intensive.
- By contrast, optimistic rollups like Arbitrum and Optimism simply assume that all transactions are valid and don’t post any proof to the mainnet.
- Until recently, zk-rollups didn’t support smart contracts in Solidity and weren’t compatible with EVM. They could process a limited number of tasks, like swapping and sending tokens.
- ZkEVMs are a new generation of zk-rollups. They work like the Ethereum mainnet and support smart contracts and dApps created for Ethereum. Along the way, they generate ZK proofs.
- The best-known zkEVM projects include zkSync by Matter Labs, Polygon Hermez, and Scroll. Matter Labs was the first to launch a mainnet, zSync 1.0 (Lite), back in 2020, though it didn’t support smart contracts. The latest version is zkSync Era, or 2.0.
- A veritable race began in July 2022, when all three projects released important updates at the same time. There was another round of releases in October 2022.
- zkSync already has a live mainnet. Polygon Hermez and Scroll both have public testnets.
- You can try many live DeFi dApps and even NFT projects on zSync, as well as a few games on Scroll.
ZK Proofs and Rollups in a Nutshell
What is a Zero Knowledge Proof?
A zero knowledge (ZK) proof is a way to verify that a party (prover) knows some information without asking them to submit that information or any kind of sensitive data, like a password.
For example, how can you make sure that a user knows the location of a buried pirate treasure without them having to produce a map? Or check if the other person has more money than you in a bank without seeing their account balance?
A ZK proof would allow you to do that, although in reality this technology is mostly used for verifying blockchain data, like the ownership of a blockchain wallet. The term “zero-knowledge” comes from the fact that the other party (verifier) doesn’t need to know anything specific about the information you hold. This is crucial in the blockchain space, which is all about privacy.
For a detailed explanation of ZK proofs, see our new article.
ZK Rollups vs. Optimistic Rollups
In blockchain, a rollup is a type of scaling solution, or a Layer 2 network. A bunch of transactions are processed off the main blockchain and on a faster, cheaper secondary chain. Then, they are rolled up into a small package (just one transaction) and sent back to the main blockchain (Layer 1). This reduces the load on Layer 1, as well as gas fees.
Most rollups are built on top of Ethereum, since it’s always struggled with scaling. A rollup can have its own thriving ecosystem with dApps, exchanges, NFTs, etc. You’ve probably heard of Arbitrum and Optimism, the two biggest Ethereum rollup chains.
The major problem that every rollup has to solve is how to prove to the main chain that the transactions they’ve processed are valid. Depending on how they solve this, rollups come in two flavors: optimistic and ZK.
Optimistic Rollups (Arbitrum, Optimism, Metis, Boba)
An optimistic rollup assumes that all the transactions it gets off the mainnet are valid – so it simply confirms them all without double-checking. If anyone thinks that a transaction is fraudulent, they can contest it. The network then checks the fraud proofs, cancels the transaction and re-executes it on the mainnet, and punishes whoever sent it if it’s found to be invalid.
Optimism and Arbitrum give users 7 days to dispute a transaction. Because of this, sending crypto from the rollup back to Ethereum takes a week.
From the end user point of view, using an optimistic rollup is easy. You add Arbitrum or Optimism to MetaMask and bridge crypto (say, ETH) from the mainnet to the rollup. Then you transact with the tokens as usual: send them to other addresses, swap, farm, etc. Once you are done and want your tokens back on Ethereum, you bridge them again – only this time you have to wait seven days.
A ZK rollup uses zero-knowledge proofs to check that a transaction is valid without having to know what’s in it. The rolled-up package is accompanied by something called a Succinct Non-Interactive Argument of Knowledge (SNARK). This proof is very lightweight, making ZK rollups faster and more efficient than optimistic ones, which port the whole body of transaction data to the mainnet.
Another advantage is that you don’t need a window of time for people to contest transactions. Users can send funds back to Ethereum right away.
The downside to ZK rollups is their technical complexity. ZK proofs, first proposed in 1985, weren’t designed for blockchain or dApps. Earlier-generation ZK protocols have a few disadvantages:
- Proofs take a lot of resources to compute → scalability issues
- They weren’t designed to be trustless and decentralized → security risks
- No support for smart contracts → can’t run dApps. A pre-2021 zero-knowledge rollup could do only one thing, like swap or transfer tokens.
However, each STARK proof is up to 100 times larger than a SNARK proof, leading to higher gas costs. On top of that, StarkNet uses a different coding language (Cairo vs. Solidity), so it’s not directly EVM-compatible.
In 2023, however, we should see the arrival of a brand-new generation of ZK solutions: full-scale, ZK-powered Ethereum-compatible virtual machines, or zkEVMs.
What is a Zero-Knowledge EVM and How Does it Differ from a Rollup?
A zero-knowledge EVM (zkEVM) is an implementation of Ethereum Virtual Machine that is compatible with ZK proofs. Let’s unpack this definition.
A blockchain virtual machine (VM) is a sandbox-type environment for running smart contracts. It translates human-readable contract code into so-called bytecode, which machines can understand. Ethereum’s bytecode “vocabulary” consists of 140 short opcodes (commands), such as “STOP”, “SUBTRACT”, “GASPRICE”, etc.
A virtual machine also protects dApps from any damage that can happen to the physical server, as well as from each other. Moreover, EVM acts as a state machine: it determines how the state of the blockchain changes in reaction to every new input.
We have an in-depth article on virtual machines and EVM here.
Ethereum Virtual Machine (EVM) is the most famous of blockchain virtual machines. Every full Ethereum node runs an instance of EVM; a node wouldn’t be able to execute smart contracts without it. You can picture Ethereum’s layered architecture this way:
Hardware (server machines) → Nodes → EVM → Smart contracts and dApps.
A zkEVM vs. a Simple ZK Rollup
In layman’s terms, a zkEVM is a zero-knowledge rollup that can do everything that Ethereum mainnet does. It compiles human-readable code in Solidity or Vyper into bytecode, executes smart contracts, and updates the blockchain state. ZkEVM opcode sets can be different from those in Ethereum, or mostly the same: for example, Matter Labs’ zkSync 2.0 doesn’t support the “SELFDESTRUCT” command, as it can cause damage to the blockchain.
Along the way, a zkEVM constantly generates zero-knowledge proofs to verify that smart contract code has been loaded and executed in the right way; that transactions are valid; and that state transitions are correct.
The breakthrough here is that you can run any dApp built for Ethereum on a zkEVM chain – quickly and at a fraction of the mainnet’s cost, but still keep the same level of security. The privacy of ZK proofs is combined with the power and variety of the Ethereum ecosystem.
Compatible or Equivalent?
As pointed out by senior researcher at Scroll, Toghrul Maharramov, we have to distinguish between three different things:
- EVM compatibility – translating smart contract code in Solidity into the VM bytecode specific to a ZK rollup
- EVM equivalence – translating EVM bytecode into whatever bytecode a ZK rollup’s VM uses
- Full zkEVM – being able to prove that EVM code execution is valid within the rollup
Based on these very technical distinctions, one can debate if a certain zkEVM is a “real” zkEVM or not. For example, Maharramov himself argued that Polygon’s Hermez (positioned as “a complete EVM-equivalent L2”) isn’t really EVM-equivalent, because it uses different bytecode from EVM.
It’s not our task to nit-pick definitions – and there isn’t a single industry-wide definition of a zkEVM anyways. For the purpose of this article, a zkEVM is a zk rollup that can run Ethereum dApps without having to re-write the code.
Advantages of a zkEVM
- Supports all Ethereum dApps & smart contracts without having to rewrite the code
- Supports Ethereum tooling: MetaMask, Truffle, Remix, Ganache, code libraries, etc.
- The validity of all transactions is guaranteed → security, no need for dispute resolution
- Transactions are finalized on the mainnet as soon as the ZK proof is submitted → fast bridging back to Ethereum
- Only short ZK proofs are posted on the mainnet (vs. full transaction data) → lower gas costs for users
- No need to replicate Ethereum’s clunky consensus process (where all full nodes have to perform the same computations) → scalability and performance
These advantages come at a price. Like we said, generating zero-knowledge proofs requires a lot of resources. Moreover, a large body of new code has to be written, as not everything in EVM is compatible with the ZK technology out of the box. As a result, you need serious investor backing to build a zkEVM. For example, Matter Labs raised over $450 million for its zkSync.
As Vitalik Buterin explained in this excellent blog post, zkEVM developers can choose to prioritize full Ethereum compatibility, or the speed with which ZK proofs are computed. The more a ZK network looks and feels like Ethereum and EVM, the slower the proof generation. As we’ll see, the main projects – zkSync, Polygon Hermez, and Scroll – are increasingly moving towards Ethereum compatibility with each new release.
Interaction with Ethereum: 2 Approaches
As explained by zkSync CEO Alex Gluchowski in a recent interview, there are two ways that ZK layer-2’s can interact with the Layer 1.
1) Aggregation. The ZK solution acts mostly as a rollup. It aggregates similar transactions (swaps for the same currency pair, NFT mints, etc.) until it has enough for a batch, then confirms it on the mainnet. The downside is that it can take hours to aggregate enough operations, and user experience suffers.
2) Native functionality. dApps migrate to the layer-2 and run natively there. Mainnet finality still takes time, but users don’t care, because within the layer-2 ecosystem, transactions are almost instant. The downside is that you have to convince a lot of dApps to migrate to the rollup. This is the approach taken by zkSync.
The Race to a Product-Ready zkEVM
Over the course of two days in July 2022, three companies posted important updates on their zkEVMs.
The second was Matter Labs, a Berlin-based development studio that was founded in 2018 by Alex Gluchowski and Alexandr Vlasov. Its zkSync 1.0 was launched in 2020, but without smart contract support. The new zkSync 2.0 would have true EVM compatibility, and in its “100 Days to Mainnet” blog post, the studio boldly called it “the first EVM-compatible zk rollup.”
The third contender in the race was Polygon, a true giant of the blockchain space. On the same day (July 20) it unveiled Polygon Hermez zkEVM and released the source code for the ZK proving system. The company called it “the first EVM-equivalent ZK L2” and promised much faster ZK proof generation.
With two major blockchain teams both using the term “first”, the race was on. The next round took place in October 2022:
- on the 10th, Polygon Hermez released the public testnet
- also on the 10th, Scroll enabled smart contracts on the Pre-Alpha testnet; on the 28th, Matter Labs launched the closed alpha of the zkSync 2.0 mainnet.
For us end users, it probably doesn’t matter who wins the race, because the progress of EVM-compatible ZK solutions is a big victory for the industry as a whole. So we’ll just examine the main zkEVMs, how they work, and what you can already do with them.
ZkSync (Matter Labs)
zkSync is the only zkEVM that already has a mainnet with Solidity smart contract support and a functioning ecosystem. The mainnet is open only to selected partners, but regular users can try the testnet – further down we’ll show you how.
Although zkSync is much cheaper than Ethereum, it’s still not free. Gas prices depend on two factors:
- the cost of computing ZK proofs
- the current Ethereum gas price
As of March 2023, a token transfer costs $0.05 in gas fees, and swaps at $0.11 on zkSync 1.0 mainnet (vs. Ethereum’s $0.8 and $4, respectively). Withdrawals to Ethereum mainnet take between 15 minutes and 3 hours: the higher the level of activity in zkSync, the faster the finality. This is because it takes less time to collect enough similar transactions to make a batch.
ZkSync Lite (1.0)
zkSync 1.0 went live on mainnet in June 2020 and is still working under the new name of zkSync Lite. It doesn’t support smart contracts, but it enables crypto payments, swaps, and NFT minting. Gitcoin’s grant platform uses zkSync 1.0 for almost all of its transactions.
As of March 2023, the network’s TVL was almost $59M with 1.3 million transactions in 30 days.
zkSync 2.0 was released on testnet in May 2021 and on private mainnet in October 2022 (Baby Alpha launch). In February 2023, it was renamed to zkSync Era and opened to registered ecosystem partners (Fair Onboarding Alpha launch).
The platform is fully open-source, so developers can build their own zkEVM implementation based on Matter Labs’ code.
The main innovation compared to 1.0 is added support for most Ethereum opcodes. The system can now compile Solidity smart contracts into zkEVM bytecode.
To achieve this, contract code in Solidity is translated into an intermediate language called Yul. The result is passed through the LLVM compiler – a framework that can “translate” human-readable code in different languages coming from the front end into various kinds of bytecode, in this case zkEVM opcodes. LLVM is a global open-source initiative that started in 2000 at the University of Illinois.
In addition to Solidity, Matter Labs developed a new smart contract language: Zinc. It’s safe and optimized for zero-knowledge proof technology. Zinc is based on Rust, just like Aptos’ Move. The team has also built a front-end for its LLVM compiler to turn Zinc code into zkEVM opcodes.
Third-party developers will be able to add compiler front-ends for other coding languages in order to write dApps for zkSync in the language they feel most comfortable with (Rust, Java, etc.). For now, the team is focusing on Solidity support.
ZkSync Public Mainnet Launch and TVL
ZkSync Ero mainnet opened to selected partners in February 2023 and to everyone else on March 24. In a few weeks, the chain reached $170 million in TVL and over 5.6 million transactions.
Note that zkSync doesn’t have a token and hasn’t announced any token launch date yet. If anyone tries to sell you zkSync or ZKS tokens, it’s a scam.
As of March 2023, over 300 projects have already committed to deploying on zkSync, including Uniswap, Aave, 1inch, Curve, Sushi, and Chainlink.
As you can see, saying that zkSync is just a layer 2 for Ethereum is a gross understatement. Upon the public mainnet launch, it may be the biggest L2 ecosystem around.
Try zkSync Era and its Ecosystem
Warning no.1: block delay
Era’s mainnet is still in Alpha and very much experimental. To keep the system secure, the team introduced a temporary limitation: a 24-hour block delay. Every block on Era is committed to Ethereum only 24 hours after it’s finalized on zkSync itself, so that the team has time to check for bugs, suspicious withdrawals, etc.
For you as a user this means that any withdrawals of funds to Ethereum will take a bit more than 24 hours. The delay will be gradually reduced.
Warning no.2: gas fees
Swapping tokens or depositing liquidity on Era will cost you $0.5-2. Of course, it’s much lower than the $15-20 you’d pay on Uniswap, but probably more than you’d expect. The reason is that on zkSync, fees become lower as usage grows. Generating one proof costs the same amount of gas, so the more transactions are bundled into it, the less each user pays.
Now that Era is still new and doesn’t have many active users, the fees are high compared to Arbitrum or Optimism. The good news is that the main swapping dApps on Era (SyncSwap, Mute) will refund you all or most of the gas.
Warning no.3: risk of bugs
Technical issues can and will happen on Era: that’s why it’s called an Alpha release. For example, when GemholicECO launched its IDO on zkSync, the $1.7 million in ETH that it raised got stuck. The reason was that the IDO smart contract misused the .transfer() function.
Matter Labs managed to solve the issue, but it could have been prevented had GemholicECO deployed the contract on the testnet first. Morale of the story: be prepared for things to go wrong and don’t deposit any funds that you can’t afford to lose.
- Add zkSync Era mainnet to MetaMask manually using the following parameters:
Network name: ZkSync Era Mainnet
Network URL: https://zksync2-mainnet.zksync.io
Chain ID: 324
Currency symbol: ETH
Block explorer URL: https://explorer.zksync.io
- Bridge ETH to zkSync mainnet. Connect MetaMask on the zkSync Era bridge page, enter an amount in ETH, and confirm. Expect to pay around $4-10 in gas fees. Don’t panic: on zkSync itself, the fees will be far lower.
Your MetaMask balance should be updated within a minute. Your MetaMask address in zkSync will be the same as in Ethereum and any other EVM chain. Congrats - you’re all set to use dApps on zkSync Era!
Interact with zkSync Era dApps
Mute is a DEX with a couple of interesting features:
- Amplifier pools: these are basically yield farms - they earn you “amplified APY” compared to just depositing liquidity in swapping pools. MUTE token holders will be able to get an extra APY bonus - similar to how 7Pontem Space Pirate NFT holders get an APY boost in Liquidswap farms.
- Bonds: exchange LP tokens for MUTE bonds with a discount, then collect your MUTE 7 days later. You’ll earn the difference between the bond price and the full MUTE price.
As of the time of writing, Amplifier pools and bonds aren’t live yet, but you can do some swaps or add liquidity. You can swap WETH for USDC, MUTE, ZKDOGE, ZFLOKI, and a few other tokens. By the way, all these pools have over $50k in liquidity, and WETH-USDC has $11+ million. This shows strong interest in the zkSync ecosystem.
A swap takes barely a second to process, and the gas fee is around $2. Mute refunds gas fees, however - at least for the time being.
Make sure to import the token you are swapping for into MetaMask, otherwise you won’t see it on the balance. Some of the useful contract addresses can be found here. You can also view all the balances on the Era Portal.
The nicest part is that Mute refunds gas fees - at least for the time being.
Next, you can deposit MUTE and ETH in the liquidity pool that yields around 69% APY as of early April 2023. The gas fee should be between $2 and $3 - but once again, Mute will refund it.
SyncSwap is also a DEX, but with a few interesting features of its own:
- Classic and Stable pools: a system similar to Liquidswap on Aptos, where pools for stablecoins and correlated assets use a different liquidity curve formula to minimize price impact;
- Pool wizard: a tool that helps you pick the best pools;
- Launchpad (the first launch pools should be coming soon);
- Portfolio manager (note that it shows only those tokens that are whitelisted on SyncSwap);
- Built-in bridge widgets (zkSync Era, Orbiter Finance, Celer, Multichain).
The list of available tokens and pools on SyncSwap differs from Mute: for example, you won’t find MUTE or zkDOGE here, but there are bridged AVAX and BNB, as well as OT (Onchain Trade, another DEX on Era) and USD+ (Overnight.fi). The protocol will refund you any unused gas.
The APY in pools is generally lower than on Mute (the maximum is 48%), though this can change quickly depending on the level of trading activity and the amount of liquidity.
A few more dApps to try on zkSync Era mainnet
- Velocore - a DEX that uses technology introduced by Fantom’s Solidly (voting escrow, bribes for liquidity providers) and seeks to minimize slippage.
- SpaceFi - active on zkSync Era and Evmos, this is the first cross-chain platform to link Ethereum Layer2 with the Cosmos ecosystem. It features a DEX, yield farms, a launchpad, and even NFTs that allow you to boost the rewards.
- GemSwap - an AMM that currently supports ETH, USDC, WETH, and its own GEM token (we’ve already mentioned it in relation to the $1.7 million stuck in the IDO contract).
- Nexon Finance - a lending protocol on zkSync than currently supports ETH and USDC.
- Onchain Trade - an AMM with nice price charts and upcoming leverage trading support. You can even borrow ETH and USDC.
Try zkSync Era on testnet
The testnet version of Era is still available, so if you’d like to bridge some ETH and try swaps without paying any real gas fees, this is a good option.
1) Switch MetaMask to Ethereum Goerli testnet. If you don’t see Goerli in the network list, toggle on “show test networks.”
3) Add zkSync testnet to MetaMask using the following parameters:
Network name: ZkSync Testnet - Goerli
Network URL: https://zksync2-testnet.zksync.dev
Chain ID: 280
Currency symbol: ETH
Block explorer URL: https://zksync2-testnet.zkscan.io/
You can also add the network automatically by connecting at https://goerli.portal.zksync.io/
4) Bridge ETH from Ethereum Goerli to zkSync Goerli. Connect with MetaMask on https://goerli.portal.zksync.io/ and go to Bridge. If the gas fee seems too high (over 0.01 ETH), consider waiting for a bit. Bridging itself takes around 5 minutes and requires up to 0.02 ETH in gas in addition to the amount you transfer.
5) Get free DAI, LINK, and other tokens from the zkSync Era faucet. If that doesn’t work, you can simply swap ETH for another token on a testnet DEX (see below).
6) Interact with zkSync Era dApps
A few dApps are already live on zkSync Era testnet, and now you are primed to interact with them. Make sure you have enough testnet ETH to pay for gas, though. Also, note that testnet liquidity in DeFi dApps is shallow, so be prepared for very improbable swapping rates and difficulties swapping many pairs.
Testnet dApps include:
- SyncSwap: swap ETH to USDC, WETH, WBTC, DAI, USDT, or LINK. You can also claim free TEST tokens from a built-in faucet
- Mute.io – another AMM on zkSync
- MUX - leverage trading with isolated margin
- Mint Square - mint your own NFTs
Originally built as an Ethereum scaling sidechain, Polygon is now the 5th-largest L1 chain by DeFi TVL (over $1.1 billion). In August 2021, the company allocated $1 billion out of its Treasury to develop ZK solutions and purchased the blockchain startup Hermez Network, which was building its own ZK rollup. This was the origin of Polygon Hermez.
As we mentioned before, the source code for the new zkEVM was uploaded to GitHub in July 2022. On October 10, Polygon announced the public testnet – not quite fully EVM-equivalent yet and with limited capacity, but open to outside developers and testers.
Interact with Polygon Hermez and dApps
1) Add Hermez to MetaMask:
Network Name: Polygon zkEVM Testnet
RPC URL: https://rpc.public.zkevm-test.net
Chain ID: 1442
Currency Symbol: ETH
Block Explorer URL: https://explorer.public.zkevm-test.net
2) Get some Goerli ETH from a faucet (see the zkSync tutorial above).
3) Bridge ETH from Goerli to the Polygon Hermez testnet.
4) Interact with dApps: so far there isn’t much to interact with, but we will update this section once more dApps go live. Uniswap and Aave have already committed to deploying on Hermez. If you know of any working DEXes, NFT projects, etc. on the testnet, please let us know in the comments.
Scroll zkEVM is being developed in collaboration with the Ethereum Foundation’s Privacy and Scaling Explorations group. This body studies proposals for ZK solutions, distributes grants, and actively creates new zero-knowledge tech.
At the center of the L2’s architecture are Scroll nodes. The Sequencer part of a node takes transactions from the rollup mempool, confirms them, and forms new Scroll blocks. Then another part of the node, Coordinator, sends information about the block (execution trace) to a Roller – a node that specializes in generating ZK proofs. Once the proof is ready, the Relayer module of the Scroll node makes sure it is posted to the L1.
The Pre-Alpha Testnet was released in August 2022 and processed over 15 million transactions by February 2023. On February 27, Scroll launched its Alpha Testnet, which you can join here. There are around 250k daily transactions on the testnet.
On March 6, Scroll announced a new $50 million funding round led by Polychain Capital, IOSG Ventures, Sequoia Capital, and other VC funds. This brings the project’s valuation to an impressive $1.8 billion.
The procedure is the same as for zkSync and Hermez: add Scroll to MetaMask, bridge some Goerli ETH, and try some dApps.
There’s a handy button on the site to add the network to MetaMask automatically, but here are the parameters:
Network name: Scroll Alpha Testnet
Network URL: https://alpha-rpc.scroll.io/l2
Chain ID: 534353
Currency symbol: ETH
Block explorer URL: https://blockscout.scroll.io
Scroll’s block explorer allows you to check that your transactions are verified with ZK proofs and submitted to Ethereum mainnet.
Alpha Testnet launched very recently, and so far (March 2023) doesn’t have active DEXs or DeFI apps. Still, there are some fun things you can do with Scroll:
- Play Tictactoe, courtesy of the prominent Solidity developer Gaurang Torvekar. All moves are stored on-chain
- Talk to a chatbot – it uses OpenAI’s tech and knows all sorts of things about Scroll;
- Play Scroll Guardians – an adventure game where you can kill a monster with your friends to save the Metaverse.
- Play Scroll Kingdoms – a staking RPG.
Scroll has already submitted an integration proposal to the Uniswap community – so far for a temperature check and not for voting. The proposal was warmly received, so perhaps we can expect to see Uniswap deploy on Scroll in the near future – and other DeFi dApps may follow.
zkEVMs could become one of the most interesting blockchain niches of 2023, so we’ll keep reporting on this trend. Join us on Twitter, Telegram, and Discord and stay tuned!
Pontem Network is a product studio building foundational dApps for Aptos. Our products include: Pontem Wallet, Liquidswap (the first DEX/AMM for Aptos), Move Playground, a Move browser code editor, the Move IntelliJ IDE plugin for developers, and the ByteBabel Solidity-Move code translator -- the first implementation of the Ethereum Virtual Machine for Aptos.