Skip to content

VitalR/elastic-restaking-engine

Repository files navigation

Elastic Restaking Engine

Built with Foundry Paper: arXiv 2503.00170 License: MIT

Programmable on-chain shared-security infrastructure inspired by Elastic Restaking Networks

Elastic Restaking Engine is a CLI-first, research-to-product prototype for shared-security networks.

Validators deposit real stake and assign nominal allocations across multiple services. Because total nominal allocation can exceed real stake, the validator operates at an explicit restaking degree. When a slash event occurs, the remaining stake continues to support services through an elastic re-backing rule that recomputes effective backing from the remaining collateral.

This project does not claim to reproduce the full research paper. It implements the mechanism layer as executable on-chain infrastructure and exposes policy and preview surfaces that make the tradeoffs inspectable.

Quick StartDemo PhilosophyScenario CoverageDocumentationReferences


TL;DR

Elastic Restaking Engine demonstrates:

  • real stake vs nominal allocations
  • over-allocation / restaking degree
  • post-slash elastic re-backing
  • protocol-level and service-level policy controls
  • preview / planning views for safe and unsafe allocation changes
  • a deterministic CLI walkthrough for researchers and protocol engineers

The result is a shared-security engine, not just a paper demo and not yet a production network.


Why this matters

Shared-security systems improve capital efficiency, but they also introduce correlated risk:

  • the same collateral can support multiple services
  • slash events can reduce support across several services at once
  • many systems do not make post-loss backing clearly visible
  • operators and services need policy and observability, not only raw allocation

Elastic Restaking Engine focuses on that missing layer: a programmable security-allocation engine with explicit degree, explicit backing, and previewable policy outcomes.


What the prototype implements

Core mechanism

  • validator stake deposits
  • nominal allocations across multiple services
  • total nominal allocation and restaking degree
  • slash events that reduce real stake
  • recomputed effective backing after slash events

Product-shaped layer

  • protocol-level degree policy
  • service-level policy controls
  • preview helpers for allocation changes and slash outcomes
  • scenario-driven CLI walkthrough
  • protocol-agnostic design for future adapters and tooling

What it does not claim

V1 is intentionally not:

  • a full reproduction of the paper’s analytical environment
  • an optimizer or equilibrium solver
  • a robustness / attack-search engine
  • a production-ready shared-security network
  • a live integration with EigenLayer, Symbiotic, or Babylon

Those are valid future directions, but not the claim of this prototype.


Quick start (local demo)

Requirements

Clone

git clone https://github.com/VitalR/elastic-restaking-engine
cd elastic-restaking-engine

Install dependencies

make install

Build and test

make build
make test

Configure local demo

cp .env.example .env

The default .env.example is already configured for local demo mode using public Anvil test keys.

Run

Open two terminals.

Terminal A

anvil

Terminal B

make demo-local-full

This runs the primary local CLI walkthrough in fresh mode.

Optional focused inspection

For a single scenario with more verbose Foundry output:

make demo-local-one-inspect SCENARIO=3

Demo philosophy

The demo is intentionally CLI-first.

This is not because a UI is missing; it is because the project is best presented as a deterministic mechanism walkthrough for researchers and protocol engineers.

A CLI demo makes it easier to:

  • reproduce the same scenario flows locally
  • inspect degree, allocation, and backing changes directly
  • validate exact boundary conditions
  • examine optional verbose execution logs when deeper inspection is useful

The polished main path is the readable CLI walkthrough. Optional inspection mode exists for readers who want more detailed Foundry output.

See docs/DEMO.md for the scenario guide and demo commands.


Scenario coverage

The demo currently covers:

  • Scenario 0 — Setup Overview
  • Scenario 1 — Efficient Stretch
  • Scenario 2 — Policy-Aware Limits
  • Scenario 3 — Elastic Slash
  • Scenario 4 — Service Policy Difference
  • Scenario 5 — Stress / Repeated Loss
  • Scenario 6 — Preview / Planning Replay
  • Scenario 7 — Network Degree Constraint

Together these scenarios make the mechanism, policy layer, and preview surfaces visible in practice.


Repo structure

elastic-restaking-engine/
├─ src/
│  ├─ ElasticRestakingEngine.sol
│  └─ mocks/
├─ test/
│  ├─ ElasticRestakingEngine.t.sol
│  └─ ElasticRestakingSlashing.t.sol
├─ script/
│  ├─ Deploy.s.sol
│  ├─ Demo.s.sol
│  ├─ demo.sh
│  └─ utils/
├─ docs/
│  ├─ DEMO.md
│  ├─ PAPER_COVERAGE.md
│  ├─ PAPER_TO_CODE.md
│  └─ PRODUCT_VISION.md
├─ .env.example
├─ LICENSE
├─ Makefile
└─ README.md

Documentation

Start here

Additional technical / product docs


Positioning relative to live ecosystems

This project should be understood as:

  • a research-to-product prototype
  • a mechanism-level infrastructure component
  • a protocol-agnostic shared-security foundation

It is adjacent to live shared-security ecosystems, but it is not presented as a drop-in replacement for them.

The distinctive focus here is:

  • explicit elastic re-backing
  • degree-aware policy
  • previewable shared-security state

Why this can become a real product

The prototype already provides:

  • a credible mechanism
  • a clear policy surface
  • inspectable state transitions
  • integration-minded read APIs
  • a deterministic research/demo harness

That makes it a plausible foundation for future:

  • operator tooling
  • service dashboards
  • off-chain optimization companions
  • ecosystem adapters
  • richer policy and strategy layers

References


License

MIT — see the repository's LICENSE


Built for

Shape Rotator Virtual Hackathon
Build Proofs of Concept and Prototypes from Groundbreaking IC3 Research

About

Programmable on-chain shared-security engine for elastic restaking, with explicit degree, post-slash backing, and policy-aware preview surfaces.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors