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

ether.fi

WeETH

buildsrestaking

Ether.fi wrapped eETH, a top liquid restaking token.

Ethereum
0xA6Ca0607190d03CF16fe6F2865Cf40c3D160ccf3

Implementation behind proxy 0xCd5f…b7ee

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.

exact2,478

proved equivalent, no assumption

mapped75

equivalent under a recorded assumption

divergent4

behaves differently on Starknet

blocked0

cannot be preserved; the source must change

divergent 4 findings

HD0151block.timestamp / block.number follow Starknet block cadencelib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/extensions/draft-ERC20PermitUpgradeable.sol:65
require(block.timestamp <= deadline, "ERC20Permit: expired deadline");

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 cadencesrc/governance/utils/PausableUntil.sol:98
if (_pausedUntil >= block.timestamp) revert ContractPausedUntil(_pausedUntil);

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 cadencesrc/governance/utils/PausableUntil.sol:106
if (_pausedUntil < block.timestamp) revert ContractNotPausedUntil();

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 cadencesrc/governance/utils/PausableUntil.sol:123
if ($.lastPauseTimestamp[msg.sender] + _pauseUntilDuration + PAUSER_UNTIL_COOLDOWN > block.timestamp) revert PauserCooldownStillActive();

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 registry19

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

lib/openzeppelin-contracts-upgradeable/contracts/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:98try IERC1822ProxiableUpgradeable(newImplementation).proxiableUUID() returns (bytes32 slot) {
lib/openzeppelin-contracts/contracts/utils/Address.sol:135(bool success, bytes memory returndata) = target.call{value: value}(data);
src/core/WeETH.sol:100uint256 weEthAmount = liquidityPool.sharesForAmount(_eETHAmount);
src/core/WeETH.sol:116try eETH.permit(msg.sender, address(this), _permit.value, _permit.deadline, _permit.v, _permit.r, _permit.s) {} catch {}
src/core/WeETH.sol:127uint256 eETHAmount = liquidityPool.amountForShare(_weETHAmount);
src/core/WeETH.sol:199blacklister.nonBlacklisted(from);
src/core/WeETH.sol:200blacklister.nonBlacklisted(to);
src/core/WeETH.sol:201blacklister.nonBlacklisted(msg.sender);
src/core/WeETH.sol:232uint256 proxyShares = eETH.shares(address(this));
src/core/WeETH.sol:253return liquidityPool.sharesForAmount(_eETHAmount);
src/core/WeETH.sol:262return liquidityPool.amountForShare(_weETHAmount);
src/governance/utils/RolesLibrary.sol:31roleRegistry.onlyUpgradeTimelock(msg.sender);
src/governance/utils/RolesLibrary.sol:40roleRegistry.onlyOperatingTimelock(msg.sender);
src/governance/utils/RolesLibrary.sol:49roleRegistry.onlyOperatingMultisig(msg.sender);
src/governance/utils/RolesLibrary.sol:58roleRegistry.onlySuperGuardian(msg.sender);
src/utils/AssetRecovery.sol:76(bool success, ) = to.call{value: amount}("");
src/utils/AssetRecovery.sol:90if (amount > IERC20(token).balanceOf(address(this))) revert InsufficientBalance();
src/utils/AssetRecovery.sol:105if (IERC721(token).ownerOf(tokenId) != address(this)) revert ContractIsNotOwnerOfERC721Token();
src/utils/AssetRecovery.sol:107IERC721(token).safeTransferFrom(address(this), to, tokenId);
HD0130EVM log emitted as a Starknet event15

indexers read topics from event keys and data from event data

lib/openzeppelin-contracts-upgradeable/contracts/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:63emit Upgraded(newImplementation);
lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:96emit Initialized(1);
lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:148emit Initialized(type(uint8).max);
lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/ERC20Upgradeable.sol:250emit Transfer(from, to, amount);
lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/ERC20Upgradeable.sol:274emit Transfer(address(0), account, amount);
lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/ERC20Upgradeable.sol:303emit Transfer(account, address(0), amount);
lib/openzeppelin-contracts-upgradeable/contracts/token/ERC20/ERC20Upgradeable.sol:330emit Approval(owner, spender, amount);
src/governance/utils/Pausable.sol:56emit Paused(msg.sender);
src/governance/utils/Pausable.sol:67emit Unpaused(msg.sender);
src/governance/utils/PausableUntil.sol:67emit UnpausedUntil();
src/governance/utils/PausableUntil.sol:77emit PauseUntilDurationSet(_pauseUntilDuration);
src/governance/utils/PausableUntil.sol:126emit PausedUntil($.pausedUntil);
src/utils/AssetRecovery.sol:79emit ETHRecovered(to, amount);
src/utils/AssetRecovery.sol:94emit ERC20Recovered(token, to, amount);
src/utils/AssetRecovery.sol:109emit ERC721Recovered(token, to, tokenId);
HD0102address(this) is this contract's 160-bit alias12

no action needed

lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/Initializable.sol:86(isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/UUPSUpgradeable.sol:29address private immutable __self = address(this);
lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/UUPSUpgradeable.sol:39require(address(this) != __self, "Function must be called through delegatecall");
lib/openzeppelin-contracts-upgradeable/contracts/proxy/utils/UUPSUpgradeable.sol:49require(address(this) == __self, "UUPSUpgradeable: must not be called through delegatecall");
lib/openzeppelin-contracts-upgradeable/contracts/utils/cryptography/EIP712Upgradeable.sol:73return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));
lib/solady/src/utils/ReentrancyGuardTransient.sol:36assembly {
lib/solady/src/utils/ReentrancyGuardTransient.sol:45assembly {
src/core/WeETH.sol:101IERC20(address(eETH)).safeTransferFrom(msg.sender, address(this), _eETHAmount);
src/core/WeETH.sol:116try eETH.permit(msg.sender, address(this), _permit.value, _permit.deadline, _permit.v, _permit.r, _permit.s) {} catch {}
src/core/WeETH.sol:232uint256 proxyShares = eETH.shares(address(this));
src/utils/AssetRecovery.sol:90if (amount > IERC20(token).balanceOf(address(this))) revert InsufficientBalance();
src/utils/AssetRecovery.sol:105if (IERC721(token).ownerOf(tokenId) != address(this)) revert ContractIsNotOwnerOfERC721Token();
HD0140code size check means 'is deployed' on Starknet10

every Starknet account is a contract: code-length checks on users are always true

lib/openzeppelin-contracts-upgradeable/contracts/utils/AddressUpgradeable.sol:41return account.code.length > 0;
src/core/WeETH.sol:116try eETH.permit(msg.sender, address(this), _permit.value, _permit.deadline, _permit.v, _permit.r, _permit.s) {} catch {}
src/core/WeETH.sol:199blacklister.nonBlacklisted(from);
src/core/WeETH.sol:200blacklister.nonBlacklisted(to);
src/core/WeETH.sol:201blacklister.nonBlacklisted(msg.sender);
src/governance/utils/RolesLibrary.sol:31roleRegistry.onlyUpgradeTimelock(msg.sender);
src/governance/utils/RolesLibrary.sol:40roleRegistry.onlyOperatingTimelock(msg.sender);
src/governance/utils/RolesLibrary.sol:49roleRegistry.onlyOperatingMultisig(msg.sender);
src/governance/utils/RolesLibrary.sol:58roleRegistry.onlySuperGuardian(msg.sender);
src/utils/AssetRecovery.sol:107IERC721(token).safeTransferFrom(address(this), to, tokenId);
HD0101msg.sender is the caller's 160-bit alias9

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

lib/openzeppelin-contracts-upgradeable/contracts/utils/ContextUpgradeable.sol:24return msg.sender;
src/core/WeETH.sol:101IERC20(address(eETH)).safeTransferFrom(msg.sender, address(this), _eETHAmount);
src/core/WeETH.sol:116try eETH.permit(msg.sender, address(this), _permit.value, _permit.deadline, _permit.v, _permit.r, _permit.s) {} catch {}
src/core/WeETH.sol:128_burn(msg.sender, _weETHAmount);
src/core/WeETH.sol:201blacklister.nonBlacklisted(msg.sender);
src/governance/utils/RolesLibrary.sol:31roleRegistry.onlyUpgradeTimelock(msg.sender);
src/governance/utils/RolesLibrary.sol:40roleRegistry.onlyOperatingTimelock(msg.sender);
src/governance/utils/RolesLibrary.sol:49roleRegistry.onlyOperatingMultisig(msg.sender);
src/governance/utils/RolesLibrary.sol:58roleRegistry.onlySuperGuardian(msg.sender);
HD0161a failing external call returns false with its revert data (Starknet v0.13.4 or later)3

no action needed; deploy to a network running Starknet v0.13.4 or later

lib/openzeppelin-contracts-upgradeable/contracts/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:98try IERC1822ProxiableUpgradeable(newImplementation).proxiableUUID() returns (bytes32 slot) {
lib/openzeppelin-contracts/contracts/utils/Address.sol:135(bool success, bytes memory returndata) = target.call{value: value}(data);
src/core/WeETH.sol:116try eETH.permit(msg.sender, address(this), _permit.value, _permit.deadline, _permit.v, _permit.r, _permit.s) {} catch {}
HD0121transient storage is scoped by transaction hash2

no action needed

lib/solady/src/utils/ReentrancyGuardTransient.sol:36assembly {
lib/solady/src/utils/ReentrancyGuardTransient.sol:68assembly {
HD0152block.chainid is the Starknet chain id2

no action needed; EIP-712 domains will use the Starknet chain id

lib/openzeppelin-contracts-upgradeable/contracts/utils/cryptography/EIP712Upgradeable.sol:73return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));
lib/solady/src/utils/ReentrancyGuardTransient.sol:34if (block.chainid == 1) {
HD0111balance reads the value token balance1

no action needed

src/utils/AssetRecovery.sol:74if (amount > address(this).balance) revert InsufficientBalance();
HD0123mapping and array slots are hashed with Poseidon instead of keccak2561
src/core/WeETH.sol:18contract WeETH is ERC20Upgradeable, UUPSUpgradeable, DeprecatedOZOwnable, PausableUntil, ERC20PermitUpgradeable, IRateProvider, AssetRecovery {
HD0162delegatecall runs the target's class on this contract's storage (library call)1

no action needed

lib/openzeppelin-contracts-upgradeable/contracts/proxy/ERC1967/ERC1967UpgradeUpgradeable.sol:202(bool success, bytes memory returndata) = target.delegatecall(data);

The other 2,478 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-HASH20 keccak256 storage slot computation(s) use Poseidon (HD0123): neither keccak256 nor rt::ctx::slot_hash collides on reachable slot preimages, no constant slot of the contract lies within 2^64 slots above a hashed slot, and offsets added to a hashed slot stay below 2^64 (solc's layout: array lengths capped at 2^64, bounds-checked indices). Proved under it: SlotsProof.slot_hashing_preserves_storage. Storage holds the EVM's words at renamed slots, so off-chain tools that compute a mapping entry's EVM slot number must use hyperdrive's slot function.
  • A-SLOT-MODECode compiled with Poseidon slots and code with keccak256 slots never share storage. The constructor records slot mode poseidon 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).
  • A-SPLITThe contract is split into several classes (split.json). A library call runs the part class with this contract's storage, caller and address, and its revert data reaches the caller unchanged; the part classes declared on the network are the ones whose class hashes are embedded here.

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
WeETHnot declared
75,267
WeETH_Ctornot declared
12,148
WeETH_P1not declared
64,276

Build time: 2.1 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 0xA6Ca0607190d03CF16fe6F2865Cf40c3D160ccf3
solc (deployed)
0.8.27
Optimizer runs
1,500
Via IR (deployed)
no
Compilation target
src/core/WeETH.sol:WeETH
Sourcify match
partial

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.