# EigenLayer and Restaking — A Developer's Perspective
Restaking is the idea of reusing staked ETH to secure additional services beyond Ethereum consensus. Instead of requiring every protocol to bootstrap its own validator set, they can tap into Ethereum's existing security.
EigenLayer is the protocol making this possible. Here is what developers need to know about building Actively Validated Services (AVS).
What is Restaking?
Validators stake ETH to secure Ethereum. Restaking lets them opt-in to additional services and earn extra rewards — but also take on additional slashing risk.
interface IEigenLayerAVS {
function registerOperator(address operator, bytes calldata signature) external;
function submitTask(Task calldata task) external;
function respondToTask(uint32 taskIndex, bytes calldata response) external;
}
Validators (called operators in EigenLayer) register with an AVS, perform off-chain work (like running a DA layer or oracle network), and submit proofs on-chain. If they fail or misbehave, they get slashed.
AVS Architecture
An AVS has three core contracts:
contract SimpleAVS {
IStakeRegistry public stakeRegistry;
ISlasher public slasher;
mapping(uint32 => Task) public tasks;
uint32 public nextTaskId;
struct Task {
bytes32 dataHash;
address submitter;
uint256 timestamp;
bool completed;
}
function submitTask(bytes32 dataHash) external {
tasks[nextTaskId++] = Task({
dataHash: dataHash,
submitter: msg.sender,
timestamp: block.timestamp,
completed: false
});
}
function respondToTask(uint32 taskId, bytes calldata proof) external {
require(stakeRegistry.isOperator(msg.sender), "Not operator");
// Verify proof logic here
tasks[taskId].completed = true;
}
}
Operators listen for TaskSubmitted events, perform the work off-chain, then call respondToTask with a proof.
Operator Slashing Conditions
Each AVS defines its own slashing conditions. Common patterns:
- Liveness failure — operator does not respond within X blocks
- Invalid response — operator submits incorrect data
- Double-signing — operator signs conflicting statements
function slashOperator(address operator, uint256 amount, string calldata reason) external {
require(msg.sender == address(slasher), "Only slasher");
stakeRegistry.slash(operator, amount);
emit OperatorSlashed(operator, amount, reason);
}
Slashing is initiated by the AVS contract and executed by the EigenLayer Slasher.
Building a Simple AVS
Here is a minimal data availability AVS:
contract SimpleDA is ServiceManager {
struct Blob {
bytes32 commitment;
uint256 timestamp;
bool available;
}
mapping(uint256 => Blob) public blobs;
uint256 public blobCount;
function submitBlob(bytes32 commitment) external returns (uint256) {
uint256 blobId = blobCount++;
blobs[blobId] = Blob({
commitment: commitment,
timestamp: block.timestamp,
available: false
});
emit BlobSubmitted(blobId, commitment);
return blobId;
}
function attestAvailability(uint256 blobId, bytes calldata proof) external {
require(stakeRegistry.isOperator(msg.sender), "Not operator");
// Verify KZG proof or other DA proof here
blobs[blobId].available = true;
}
}
Operators run DA nodes, store the blob data, and submit availability proofs on-chain.
Risks
Restaking is not free security:
- Correlated slashing — if Ethereum consensus fails, all restaked services fail too
- LRT depeg — Liquid Restaking Tokens can lose their peg if slashing cascades
- Operator centralization — large operators dominate multiple AVSs
Real Examples
- EigenDA — data availability layer for L2s
- AltLayer — restaked rollups with fast finality
- Omni — cross-chain messaging secured by restaking
EigenLayer is not theoretical. These AVSs are live in production.
Summary
Restaking unlocks programmable security. Developers can build services with Ethereum-grade economic security without bootstrapping a validator set from scratch. But slashing is real — design your AVS carefully.