Sample data. Built from the compile survey; nothing on this site is deployed or attested yet.
hyperdriveregistry

ENS

ETHRegistrarController

buildsinfra

ENS .eth name registration.

Ethereum
0x253553366Da8546fC250F225fe3d25d0C782303b
Starknet Sepolia
Not deployed yet
Same code, not same state. The Starknet contract runs the same code as the Ethereum one, but it starts empty: balances, positions, owners and settings on Ethereum do not carry over.

What is different on Starknet#

hyperdrive check reports every place this contract depends on the EVM, at its Solidity line. Exact counts operations; the other tiers count findings. About tiers.

exact1,262

proved equivalent, no assumption

mapped24

equivalent under a recorded assumption

divergent3

behaves differently on Starknet

blocked0

cannot be preserved; the source must change

divergent 3 findings

HD0151block.timestamp / block.number follow Starknet block cadencecontracts/ethregistrar/ETHRegistrarController.sol:83
if (_maxCommitmentAge > block.timestamp) {

acknowledge if your logic uses wall-clock windows, not block counts

Acknowledged: survey: auto-acknowledged to measure the build

HD0151block.timestamp / block.number follow Starknet block cadencecontracts/ethregistrar/ETHRegistrarController.sol:142
if (commitments[commitment] + maxCommitmentAge >= block.timestamp) {

acknowledge if your logic uses wall-clock windows, not block counts

Acknowledged: survey: auto-acknowledged to measure the build

HD0151block.timestamp / block.number follow Starknet block cadencecontracts/ethregistrar/ETHRegistrarController.sol:249
if (commitments[commitment] + minCommitmentAge > block.timestamp) {

acknowledge if your logic uses wall-clock windows, not block counts

Acknowledged: survey: auto-acknowledged to measure the build

mapped Mapped: equivalent under the assumptions below

HD0160external call routed through the alias registry13

target addresses resolve through aliases or link symbols in hyperdrive.toml

contracts/ethregistrar/ETHRegistrarController.sol:100price = prices.price(name, base.nameExpires(uint256(label)), duration);
contracts/ethregistrar/ETHRegistrarController.sol:100price = prices.price(name, base.nameExpires(uint256(label)), duration);
contracts/ethregistrar/ETHRegistrarController.sol:109return valid(name) && base.available(uint256(label));
contracts/ethregistrar/ETHRegistrarController.sol:178uint256 expires = nameWrapper.registerAndWrapETH2LD(
contracts/ethregistrar/ETHRegistrarController.sol:204payable(msg.sender).transfer(
contracts/ethregistrar/ETHRegistrarController.sol:220uint256 expires = nameWrapper.renew(tokenId, duration);
contracts/ethregistrar/ETHRegistrarController.sol:223payable(msg.sender).transfer(msg.value - price.base);
contracts/ethregistrar/ETHRegistrarController.sol:230payable(owner()).transfer(address(this).balance);
contracts/ethregistrar/ETHRegistrarController.sol:276resolver.multicallWithNodeCheck(nodehash, data);
contracts/ethregistrar/ETHRegistrarController.sol:284reverseRegistrar.setNameForAddr(
contracts/reverseRegistrar/ReverseClaimer.sol:13ens.owner(ADDR_REVERSE_NODE)
contracts/reverseRegistrar/ReverseClaimer.sol:15reverseRegistrar.claim(claimant);
contracts/utils/ERC20Recoverable.sol:24IERC20(_token).transfer(_to, _amount);
HD0101msg.sender is the caller's 160-bit alias5

no action needed; Ethereum-key accounts keep their Ethereum address

@openzeppelin/contracts/utils/Context.sol:18return msg.sender;
contracts/ethregistrar/ETHRegistrarController.sol:78) ReverseClaimer(_ens, msg.sender) {
contracts/ethregistrar/ETHRegistrarController.sol:191_setReverseRecord(name, resolver, msg.sender);
contracts/ethregistrar/ETHRegistrarController.sol:204payable(msg.sender).transfer(
contracts/ethregistrar/ETHRegistrarController.sol:223payable(msg.sender).transfer(msg.value - price.base);
HD0130EVM log emitted as a Starknet event3

indexers read topics from event keys and data from event data

@openzeppelin/contracts/access/Ownable.sol:81emit OwnershipTransferred(oldOwner, newOwner);
contracts/ethregistrar/ETHRegistrarController.sol:194emit NameRegistered(
contracts/ethregistrar/ETHRegistrarController.sol:226emit NameRenewed(name, labelhash, msg.value, expires);
HD0110msg.value is an amount of the network's value token2

no action needed; the registry admin sets the value token (ETH or STRK) once per network

contracts/ethregistrar/ETHRegistrarController.sol:159if (msg.value < price.base + price.premium) {
contracts/ethregistrar/ETHRegistrarController.sol:217if (msg.value < price.base) {
HD0111balance reads the value token balance1

no action needed

contracts/ethregistrar/ETHRegistrarController.sol:230payable(owner()).transfer(address(this).balance);

The other 1,262 operations translate exactly: proved equivalent, with no assumption.

Assumptions#

From the build's certificate: what this contract's equivalence rests on, beyond the Lean proof. What these mean.

  • A-STORAGE-HASHhyperdrive's Poseidon hashes have no collisions on reachable inputs: storage slots (HD0120), keccak256 cache keys and Poseidon slot hashes (HD0123).
  • A-ALIASContracts are registered with the HdRegistry passed to their constructor, and an unregistered account's low 160 bits are not a registered alias. Registered addresses never share an alias (proved: RegistryProof.alias_injective).
  • A-SLOT-MODECode compiled with Poseidon slots and code with keccak256 slots never share storage. The constructor records slot mode keccak in this contract's storage and every delegatecall frame running this code checks the storage owner's mode (reverting with "hyperdrive: storage slot mode mismatch"). Not checked: an upgrade with replace_class must keep the slot mode of the class it replaces (both builds' ASSUMPTIONS.md name it).

Tested against the EVM#

The same calls run on the compiled Cairo and on revm, compared on return data, reverts, events, storage and balances.

Differential runs: not yet measured.

Cost#

EVM gas on Ethereum next to Starknet L2 gas for the same call. They are different units with different prices, so compare contracts, not the two columns. Raw is the EVM calldata entry point; typed is the Starknet ABI entry point. About costs.

Per-call cost: not yet measured.

Classes#

Starknet limits a class to 81,920 CASM felts. A larger contract is split by function selector into classes that call each other by library call.

ClassClass hashCASM felts of 81,920
ETHRegistrarControllernot declared
75,704

Build time: 6.8 s (wall time, depends on the compile cache).

Reproduce#

Rebuild from the Sourcify source and compare class hashes with the deployed ones. Nothing here needs trusting the registry.

hyperdrive verify 0x253553366Da8546fC250F225fe3d25d0C782303b
solc (deployed)
0.8.17
Optimizer runs
1,300
Via IR (deployed)
no
Compilation target
contracts/ethregistrar/ETHRegistrarController.sol:ETHRegistrarController
Sourcify match
full

Attestations#

Each attestation is an on-chain record that someone rebuilt this contract and got the deployed class hashes. Anyone who runs hyperdrive verify can add one.

No attestations yet.