How the zkVM works
One program, from source to a verified proof, the way the terminal and the circuits it pins (41d64acd, constraint set 11) really do it. Every number here comes from their code or a recorded run.
Step 1 of 10
Source
A Solidity contract: the ERC-20 sample, whose transfer this page follows.
Nothing about the program is built into the prover. The proof will say only that some program with commitment hc ran on some inputs and produced these outputs.
ERC20.sol
function _transfer(address from, address to, uint256 amount) internal {
require(to != address(0), "ERC20: transfer to the zero address");
uint256 b = _balances[from];
require(b >= amount, "ERC20: transfer amount exceeds balance");
_balances[from] = b - amount;
_balances[to] += amount;
emit Transfer(from, to, amount);
}