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

EigenLayer

StrategyManager

buildsrestaking

EigenLayer deposits into strategies.

Ethereum
0xa7536C85898dC424c6BFe8592F983661f830656A

Implementation behind proxy 0x8586…075A

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,624

proved equivalent, no assumption

mapped46

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 cadencesrc/contracts/core/StrategyManager.sol:162
uint32 resolutionBlock = uint32(block.number) + SLASH_RESOLUTION_DELAY_BLOCKS;

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/contracts/core/StrategyManager.sol:176
require(block.number > _slashResolutionBlock[operatorSet.key()][slashId], SlashResolutionDelayNotElapsed());

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/contracts/core/StrategyManager.sol:202
require(block.number > _slashResolutionBlock[operatorSet.key()][slashId], SlashResolutionDelayNotElapsed());

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/contracts/mixins/SignatureUtilsMixin.sol:80
require(expiry >= block.timestamp, SignatureExpired());

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 registry15

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

lib/openzeppelin-contracts-upgradeable-v4.9.0/contracts/utils/cryptography/SignatureCheckerUpgradeable.sol:43(bool success, bytes memory result) = signer.staticcall(
lib/openzeppelin-contracts-v4.9.0/contracts/utils/Address.sol:135(bool success, bytes memory returndata) = target.call{value: value}(data);
src/contracts/core/StrategyManager.sol:139strategy.withdraw(staker, token, shares);
src/contracts/core/StrategyManager.sol:189recipient: allocationManager.getRedistributionRecipient(operatorSet)
src/contracts/core/StrategyManager.sol:207recipient: allocationManager.getRedistributionRecipient(operatorSet)
src/contracts/core/StrategyManager.sol:222strategy.withdraw(DEFAULT_BURN_ADDRESS, strategy.underlyingToken(), sharesToBurn);
src/contracts/core/StrategyManager.sol:222strategy.withdraw(DEFAULT_BURN_ADDRESS, strategy.underlyingToken(), sharesToBurn);
src/contracts/core/StrategyManager.sol:280strategy.beforeAddShares(staker, shares);
src/contracts/core/StrategyManager.sol:314shares = strategy.deposit(token, amount);
src/contracts/core/StrategyManager.sol:320delegation.increaseDelegatedShares({
src/contracts/core/StrategyManager.sol:353strategy.beforeRemoveShares(staker, depositSharesToRemove);
src/contracts/core/StrategyManager.sol:413amountOut = IStrategy(strategy)
src/contracts/core/StrategyManager.sol:416token: IStrategy(strategy).underlyingToken(),
src/contracts/permissions/Pausable.sol:66require(pauserRegistry.isPauser(msg.sender), OnlyPauser());
src/contracts/permissions/Pausable.sol:70require(msg.sender == pauserRegistry.unpauser(), OnlyUnpauser());
HD0130EVM log emitted as a Starknet event13

indexers read topics from event keys and data from event data

lib/openzeppelin-contracts-upgradeable-v4.9.0/contracts/access/OwnableUpgradeable.sol:86emit OwnershipTransferred(oldOwner, newOwner);
lib/openzeppelin-contracts-upgradeable-v4.9.0/contracts/proxy/utils/Initializable.sol:97emit Initialized(1);
lib/openzeppelin-contracts-upgradeable-v4.9.0/contracts/proxy/utils/Initializable.sol:149emit Initialized(type(uint8).max);
src/contracts/core/StrategyManager.sol:164emit SlashResolutionBlockSet(operatorSet, slashId, resolutionBlock);
src/contracts/core/StrategyManager.sol:167emit BurnOrRedistributableSharesIncreased(operatorSet, slashId, strategy, sharesToBurn);
src/contracts/core/StrategyManager.sol:217emit BurnableSharesDecreased(strategy, sharesToBurn);
src/contracts/core/StrategyManager.sol:242emit StrategyAddedToDepositWhitelist(strategiesToWhitelist[i]);
src/contracts/core/StrategyManager.sol:256emit StrategyRemovedFromDepositWhitelist(strategiesToRemoveFromWhitelist[i]);
src/contracts/core/StrategyManager.sol:293emit Deposit(staker, strategy, shares);
src/contracts/core/StrategyManager.sol:421emit BurnOrRedistributableSharesDecreased(operatorSet, slashId, strategy, sharesToRemove);
src/contracts/core/StrategyManager.sol:447emit StrategyWhitelisterChanged(strategyWhitelister, newStrategyWhitelister);
src/contracts/permissions/Pausable.sol:115emit Unpaused(msg.sender, newPausedStatus);
src/contracts/permissions/Pausable.sol:136emit Paused(msg.sender, pausedStatus);
HD0101msg.sender is the caller's 160-bit alias8

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

lib/openzeppelin-contracts-upgradeable-v4.9.0/contracts/utils/ContextUpgradeable.sol:24return msg.sender;
src/contracts/core/StrategyManager.sol:37require(msg.sender == strategyWhitelister, OnlyStrategyWhitelister());
src/contracts/core/StrategyManager.sol:49require(msg.sender == address(delegation), OnlyDelegationManager());
src/contracts/core/StrategyManager.sol:85depositShares = _depositIntoStrategy(msg.sender, strategy, token, amount);
src/contracts/core/StrategyManager.sol:311token.safeTransferFrom(msg.sender, address(strategy), amount);
src/contracts/permissions/Pausable.sol:66require(pauserRegistry.isPauser(msg.sender), OnlyPauser());
src/contracts/permissions/Pausable.sol:70require(msg.sender == pauserRegistry.unpauser(), OnlyUnpauser());
src/contracts/permissions/Pausable.sol:136emit Paused(msg.sender, pausedStatus);
HD0140code size check means 'is deployed' on Starknet4

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

lib/openzeppelin-contracts-upgradeable-v4.9.0/contracts/utils/AddressUpgradeable.sol:45return account.code.length > 0;
src/contracts/core/StrategyManager.sol:280strategy.beforeAddShares(staker, shares);
src/contracts/core/StrategyManager.sol:320delegation.increaseDelegatedShares({
src/contracts/core/StrategyManager.sol:353strategy.beforeRemoveShares(staker, depositSharesToRemove);
HD0102address(this) is this contract's 160-bit alias2

no action needed

lib/openzeppelin-contracts-upgradeable-v4.9.0/contracts/proxy/utils/Initializable.sol:87(isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
src/contracts/mixins/SignatureUtilsMixin.sol:44address(this)
HD0161a failing external call returns false with its revert data (Starknet v0.13.4 or later)2

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

lib/openzeppelin-contracts-upgradeable-v4.9.0/contracts/utils/cryptography/SignatureCheckerUpgradeable.sol:43(bool success, bytes memory result) = signer.staticcall(
lib/openzeppelin-contracts-v4.9.0/contracts/utils/Address.sol:135(bool success, bytes memory returndata) = target.call{value: value}(data);
HD0123mapping and array slots are hashed with Poseidon instead of keccak2561
src/contracts/core/StrategyManager.sol:21contract StrategyManager is
HD0152block.chainid is the Starknet chain id1

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

src/contracts/mixins/SignatureUtilsMixin.sol:43block.chainid,

The other 2,624 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-HASH84 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
StrategyManagernot declared
78,120
StrategyManager_Ctornot declared
14,847
StrategyManager_P1not declared
69,767
StrategyManager_P2not declared
29,906

Build time: 1.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 0xa7536C85898dC424c6BFe8592F983661f830656A
solc (deployed)
0.8.30
Optimizer runs
200
Via IR (deployed)
no
Compilation target
src/contracts/core/StrategyManager.sol:StrategyManager
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.