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

ether.fi

LiquidityPool

buildsrestaking

Ether.fi deposit pool behind eETH.

Ethereum
0x17A16747D03006c9754548AC0d0afF48783A4a45

Implementation behind proxy 0x3088…F216

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.

exact3,459

proved equivalent, no assumption

mapped120

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 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 registry38

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/LiquidityPool.sol:155? uint128(priorityWithdrawalQueue.ethAmountLockedForPriorityWithdrawal())
src/core/LiquidityPool.sol:226blacklister.nonBlacklisted(_recipient);
src/core/LiquidityPool.sol:242blacklister.nonBlacklisted(_user);
src/core/LiquidityPool.sol:266if (eETH.balanceOf(msg.sender) < _amount) revert InsufficientLiquidity();
src/core/LiquidityPool.sol:270eETH.burnShares(msg.sender, share);
src/core/LiquidityPool.sol:304eETH.burnShares(msg.sender, _share);
src/core/LiquidityPool.sol:315blacklister.nonBlacklisted(recipient);
src/core/LiquidityPool.sol:334try eETH.permit(msg.sender, address(this), _permit.value, _permit.deadline, _permit.v, _permit.r, _permit.s) {} catch {}
src/core/LiquidityPool.sol:376stakingManager.registerBeaconValidators(_depositData, _bidIds, _etherFiNode);
src/core/LiquidityPool.sol:392uint256 outboundEthAmountFromLp = stakingManager.INITIAL_DEPOSIT_AMOUNT() * _bidIds.length;
src/core/LiquidityPool.sol:393stakingManager.createBeaconValidators{value: outboundEthAmountFromLp}(_depositData, _bidIds, _etherFiNode);
src/core/LiquidityPool.sol:412if (msg.sender != address(etherFiAdminContract)) roleRegistry.onlyOracleOperations(msg.sender);
src/core/LiquidityPool.sol:416uint256 remainingEthPerValidator = _validatorSizeWei - stakingManager.INITIAL_DEPOSIT_AMOUNT();
src/core/LiquidityPool.sol:419stakingManager.confirmAndFundBeaconValidators{value: outboundEthAmountFromLp}(_depositData, _validatorSizeWei);
src/core/LiquidityPool.sol:471emit Rebase(getTotalPooledEther(), eETH.totalShares());
src/core/LiquidityPool.sol:506eETH.burnShares(msg.sender, shares);
src/core/LiquidityPool.sol:525eETH.burnShares(msg.sender, _amountSharesToBurn);
src/core/LiquidityPool.sol:592eETH.mintShares(_recipient, share);
src/core/LiquidityPool.sol:609requestId = withdrawRequestNFT.requestWithdraw(uint96(amount), uint96(share), recipient);
src/core/LiquidityPool.sol:623return Math.mulDiv(_depositAmount, eETH.totalShares(), totalPooledEther, Math.Rounding.Down);
src/core/LiquidityPool.sol:633(bool sent, ) = _recipient.call{value: _amount}("");
src/core/LiquidityPool.sol:679S = eETH.totalShares();
src/core/LiquidityPool.sol:698if (_validatorSizeWei < stakingManager.MIN_VALIDATOR_SIZE_WEI() || _validatorSizeWei > stakingManager.MAX_VALIDATOR_SIZE_WEI()) revert InvalidValidatorSize();
src/core/LiquidityPool.sol:698if (_validatorSizeWei < stakingManager.MIN_VALIDATOR_SIZE_WEI() || _validatorSizeWei > stakingManager.MAX_VALIDATOR_SIZE_WEI()) revert InvalidValidatorSize();
src/core/LiquidityPool.sol:718uint256 totalShares = eETH.totalShares();
src/core/LiquidityPool.sol:720staked = Math.mulDiv(getTotalPooledEther(), eETH.shares(_user), totalShares, Math.Rounding.Down);
src/core/LiquidityPool.sol:743return Math.mulDiv(_amount, eETH.totalShares(), totalPooledEther, Math.Rounding.Down);
src/core/LiquidityPool.sol:759return Math.mulDiv(_amount, eETH.totalShares(), totalPooledEther, Math.Rounding.Up);
src/core/LiquidityPool.sol:768uint256 totalShares = eETH.totalShares();
src/core/LiquidityPool.sol:786uint256 totalShares = eETH.totalShares();
src/core/LiquidityPool.sol:805blacklister.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:67roleRegistry.onlyGuardian(msg.sender);
src/governance/utils/RolesLibrary.sol:76roleRegistry.onlyOracleOperations(msg.sender);
HD0101msg.sender is the caller's 160-bit alias20

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

src/core/LiquidityPool.sol:225if (msg.sender != address(liquifier) && msg.sender != address(etherFiAdminContract)) revert IncorrectCaller();
src/core/LiquidityPool.sol:241if (msg.sender != address(membershipManager)) revert IncorrectCaller();
src/core/LiquidityPool.sol:262if (msg.sender != address(membershipManager) && msg.sender != address(etherFiRedemptionManager)) {
src/core/LiquidityPool.sol:298if (msg.sender != address(withdrawRequestNFT) && msg.sender != address(priorityWithdrawalQueue)) {
src/core/LiquidityPool.sol:334try eETH.permit(msg.sender, address(this), _permit.value, _permit.deadline, _permit.v, _permit.r, _permit.s) {} catch {}
src/core/LiquidityPool.sol:347if (msg.sender != address(membershipManager)) revert IncorrectCaller();
src/core/LiquidityPool.sol:375if (!validatorSpawner[msg.sender].registered) revert IncorrectCaller();
src/core/LiquidityPool.sol:412if (msg.sender != address(etherFiAdminContract)) roleRegistry.onlyOracleOperations(msg.sender);
src/core/LiquidityPool.sol:456if (msg.sender != address(etherFiAdminContract)) revert IncorrectCaller();
src/core/LiquidityPool.sol:485if (msg.sender != address(etherFiAdminContract) && msg.sender != address(withdrawRequestNFT)) revert IncorrectCaller();
src/core/LiquidityPool.sol:495if (msg.sender != address(priorityWithdrawalQueue)) revert IncorrectCaller();
src/core/LiquidityPool.sol:505if (msg.sender != address(etherFiRedemptionManager) && msg.sender != address(withdrawRequestNFT) && msg.sender != address(priorityWithdrawalQueue)) revert Incor
src/core/LiquidityPool.sol:517if (msg.sender != address(etherFiRedemptionManager)) revert IncorrectCaller();
src/core/LiquidityPool.sol:608IERC20(address(eETH)).safeTransferFrom(msg.sender, address(withdrawRequestNFT), amount);
src/core/LiquidityPool.sol:805blacklister.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:67roleRegistry.onlyGuardian(msg.sender);
src/governance/utils/RolesLibrary.sol:76roleRegistry.onlyOracleOperations(msg.sender);
HD0130EVM log emitted as a Starknet event20

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);
src/core/LiquidityPool.sol:211emit Deposit(msg.sender, msg.value, SourceOfFunds.EETH, _referral);
src/core/LiquidityPool.sol:228emit Deposit(_recipient, _amount, SourceOfFunds.EETH, _referral);
src/core/LiquidityPool.sol:244emit Deposit(msg.sender, msg.value, SourceOfFunds.ETHER_FAN, _referral);
src/core/LiquidityPool.sol:432emit ValidatorSpawnerRegistered(_user);
src/core/LiquidityPool.sol:443emit ValidatorSpawnerUnregistered(_user);
src/core/LiquidityPool.sol:471emit Rebase(getTotalPooledEther(), eETH.totalShares());
src/core/LiquidityPool.sol:474emit ProtocolFeePaid(_protocolFees);
src/core/LiquidityPool.sol:526emit EEthSharesBurnedForNonETHWithdrawal(_amountSharesToBurn, _withdrawalValueInETH);
src/core/LiquidityPool.sol:551emit UpdatedFeeRecipient(_feeRecipient);
src/core/LiquidityPool.sol:562emit MinWithdrawAmountSet(_minWithdrawAmount);
src/core/LiquidityPool.sol:573emit MaxWithdrawAmountSet(_maxWithdrawAmount);
src/core/LiquidityPool.sol:610emit Withdraw(msg.sender, recipient, amount, source);
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);
HD0140code size check means 'is deployed' on Starknet20

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/LiquidityPool.sol:226blacklister.nonBlacklisted(_recipient);
src/core/LiquidityPool.sol:242blacklister.nonBlacklisted(_user);
src/core/LiquidityPool.sol:270eETH.burnShares(msg.sender, share);
src/core/LiquidityPool.sol:304eETH.burnShares(msg.sender, _share);
src/core/LiquidityPool.sol:315blacklister.nonBlacklisted(recipient);
src/core/LiquidityPool.sol:334try eETH.permit(msg.sender, address(this), _permit.value, _permit.deadline, _permit.v, _permit.r, _permit.s) {} catch {}
src/core/LiquidityPool.sol:376stakingManager.registerBeaconValidators(_depositData, _bidIds, _etherFiNode);
src/core/LiquidityPool.sol:393stakingManager.createBeaconValidators{value: outboundEthAmountFromLp}(_depositData, _bidIds, _etherFiNode);
src/core/LiquidityPool.sol:412if (msg.sender != address(etherFiAdminContract)) roleRegistry.onlyOracleOperations(msg.sender);
src/core/LiquidityPool.sol:419stakingManager.confirmAndFundBeaconValidators{value: outboundEthAmountFromLp}(_depositData, _validatorSizeWei);
src/core/LiquidityPool.sol:506eETH.burnShares(msg.sender, shares);
src/core/LiquidityPool.sol:525eETH.burnShares(msg.sender, _amountSharesToBurn);
src/core/LiquidityPool.sol:592eETH.mintShares(_recipient, share);
src/core/LiquidityPool.sol:805blacklister.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:67roleRegistry.onlyGuardian(msg.sender);
src/governance/utils/RolesLibrary.sol:76roleRegistry.onlyOracleOperations(msg.sender);
HD0102address(this) is this contract's 160-bit alias7

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/solady/src/utils/ReentrancyGuardTransient.sol:36assembly {
lib/solady/src/utils/ReentrancyGuardTransient.sol:45assembly {
src/core/LiquidityPool.sol:334try eETH.permit(msg.sender, address(this), _permit.value, _permit.deadline, _permit.v, _permit.r, _permit.s) {} catch {}
HD0161a failing external call returns false with its revert data (Starknet v0.13.4 or later)4

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/LiquidityPool.sol:334try eETH.permit(msg.sender, address(this), _permit.value, _permit.deadline, _permit.v, _permit.r, _permit.s) {} catch {}
src/core/LiquidityPool.sol:633(bool sent, ) = _recipient.call{value: _amount}("");
HD0110msg.value is an amount of the network's value token3

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

src/core/LiquidityPool.sol:186if (msg.value > type(uint128).max) revert InvalidAmount();
src/core/LiquidityPool.sol:211emit Deposit(msg.sender, msg.value, SourceOfFunds.EETH, _referral);
src/core/LiquidityPool.sol:244emit Deposit(msg.sender, msg.value, SourceOfFunds.ETHER_FAN, _referral);
HD0111balance reads the value token balance3

no action needed

src/core/LiquidityPool.sol:632uint256 balance = address(this).balance;
src/core/LiquidityPool.sol:634if (!sent || address(this).balance < balance - _amount) revert SendFail();
src/core/LiquidityPool.sol:669if (totalValueInLp > address(this).balance) revert InsufficientLiquidity();
HD0121transient storage is scoped by transaction hash2

no action needed

lib/solady/src/utils/ReentrancyGuardTransient.sol:36assembly {
lib/solady/src/utils/ReentrancyGuardTransient.sol:68assembly {
HD0123mapping and array slots are hashed with Poseidon instead of keccak2561
src/core/LiquidityPool.sol:23contract LiquidityPool is Initializable, DeprecatedOZOwnable, UUPSUpgradeable, ReentrancyGuardTransient, PausableUntil, ILiquidityPool {
HD0152block.chainid is the Starknet chain id1

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

lib/solady/src/utils/ReentrancyGuardTransient.sol:34if (block.chainid == 1) {
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 3,459 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-HASH7 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
LiquidityPoolnot declared
76,195
LiquidityPool_Ctornot declared
15,186
LiquidityPool_P1not declared
75,348
LiquidityPool_P2not declared
58,204

Build time: 2.4 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 0x17A16747D03006c9754548AC0d0afF48783A4a45
solc (deployed)
0.8.27
Optimizer runs
1,500
Via IR (deployed)
no
Compilation target
src/core/LiquidityPool.sol:LiquidityPool
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.