EigenLayer
StrategyManager
buildsrestakingEigenLayer deposits into strategies.
Implementation behind proxy 0x8586…075A
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.
proved equivalent, no assumption
equivalent under a recorded assumption
behaves differently on Starknet
cannot be preserved; the source must change
divergent 4 findings
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
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
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
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
HD0130EVM log emitted as a Starknet event13
indexers read topics from event keys and data from event data
HD0101msg.sender is the caller's 160-bit alias8
no action needed; Ethereum-key accounts keep their Ethereum address
HD0140code size check means 'is deployed' on Starknet4
every Starknet account is a contract: code-length checks on users are always true
HD0102address(this) is this contract's 160-bit alias2
no action needed
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
HD0123mapping and array slots are hashed with Poseidon instead of keccak2561
HD0152block.chainid is the Starknet chain id1
no action needed; EIP-712 domains will use the Starknet chain id
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
poseidonin 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.
| Class | Class hash | CASM felts of 81,920 |
|---|---|---|
| StrategyManager | not declared | 78,120 |
| StrategyManager_Ctor | not declared | 14,847 |
| StrategyManager_P1 | not declared | 69,767 |
| StrategyManager_P2 | not 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.