# EIP-4788

> EIP-4788 is an Ethereum Improvement Proposal introducing a mechanism for the execution layer of Ethereum mainnet to access the beacon roots of the consensus lay...

- Canonical URL: https://iq.wiki/wiki/eip-4788
- Categories: Projects & Protocols
- Tags: Layer 1, DeFi
- Created: 2024-04-01T11:47:12.719Z
- Last updated: 2024-04-01T11:47:12.719Z
- Source: IQ.wiki — the world's largest blockchain and crypto encyclopedia (https://iq.wiki)

---

**EIP-4788** is an [Ethereum Improvement Proposal](https://iq.wiki/wiki/ethereum-improvement-proposal-eip) introducing a mechanism for the execution layer of Ethereum [mainnet](https://iq.wiki/wiki/mainnet) to access the beacon roots of the consensus layer. This access is provided through a regular [smart contract](https://iq.wiki/wiki/smart-contract) which acts as a temporary database.[\[1\]](#cite-id-gkmyndstaek)  
  
  
# Overview  
  
EIP-4788 introduces an unconventional change to the Ethereum Virtual Machine (EVM) by embedding the parent beacon block root directly into each execution block. The beacon block root-containing contract will allow any [mainnet](https://iq.wiki/wiki/mainnet)-deployed [smart contract](https://iq.wiki/wiki/smart-contract) to query and gain information about Ethereum’s consensus state in a trust-minimized manner. A ring buffer is used to ensure that only a limited number of consensus state roots are stored, to avoid the contract’s state growing indefinitely. The EVM is the engine that powers [smart contracts](https://iq.wiki/wiki/smart-contract) on [Ethereum](https://iq.wiki/wiki/ethereum). Beacon chain, on the other hand, is the backbone of Ethereum's [Proof-of-Stake (PoS)](https://iq.wiki/wiki/proof-of-stake) [consensus mechanism](https://iq.wiki/wiki/consensus-mechanism), responsible for validating transactions and securing the network. The beacon block root acts as a cryptographic fingerprint of the latest state on the beacon chain.[\[1\]](#cite-id-gkmyndstaek)[\[3\]](#cite-id-4ig7fst3tfd)[\[4\]](#cite-id-bbfj1cmc0jh)  
  
Before EIP-4788, [smart contracts](https://iq.wiki/wiki/smart-contract) lacked a built-in mechanism to access the beacon chain's state. This posed a challenge for applications that required verification of events occurring on the consensus layer. EIP-4788 solves this by including the beacon block root within each block on the execution layer. Smart contracts can then cryptographically validate the root against a known beacon chain to ensure they are operating on the latest consensus state.[\[1\]](#cite-id-gkmyndstaek)  
  
EIP-4788 transforms the Ethereum Virtual Machine (EVM) into an oracle, providing trust-minimized access to Ethereum’s consensus state. And this enhancement commits the hash tree root of each parent beacon block in the execution block’s header. These roots are stored in a smart contract on Ethereum [mainnet](https://iq.wiki/wiki/mainnet), utilizing a ring buffer to manage storage efficiently. The parent beacon block roots enable any Ethereum contract to access recent consensus layer state in a trust-minimized way.[\[2\]](#cite-id-d7qjedgzbf)  
  
EIP-4788 eliminates the need for trusted [oracle](https://iq.wiki/wiki/oracle) solutions in gaining information about Ethereum’s consensus state. Once this EIP is merged, smart contracts and protocols deployed on Ethereum [mainnet](https://iq.wiki/wiki/mainnet) will no longer require a trusted oracle solution to gain information about Ethereum’s consensus state. Importantly, this consensus state information can be “unpacked”, and used to determine the status and balance of all Ethereum validators. [Liquid staking](https://iq.wiki/wiki/liquid-staking) pools, such as [Lido](https://iq.wiki/wiki/lido-dao) and [Rocket Pool](https://iq.wiki/wiki/rocket-pool), and re-staking applications like [EigenLayer](https://iq.wiki/wiki/eigenlayer), stand to benefit. This upgrade enhances the security, trustworthiness, and efficiency of these applications by providing cryptographically verifiable consensus state information.[\[2\]](#cite-id-d7qjedgzbf)[\[3\]](#cite-id-4ig7fst3tfd)  
  
EIP-4788 is a fundamental component of the [Dencun upgrade,](https://iq.wiki/wiki/dencun-upgrade) a significant step forward for [Ethereum](https://iq.wiki/wiki/ethereum). Dencun, which translates to "fragment" in Chinese, refers to a set of EIPs aimed at enhancing Ethereum's scalability and efficiency. EIP-4788 works in conjunction with other EIPs within Dencun, such as [EIP-4844](https://iq.wiki/wiki/eip-4844) (which introduces data [sharding](https://iq.wiki/wiki/sharding)), to create a more robust and scalable Ethereum network.  
  
# Authors  
  
* Alex Stokes  
* Ansgar Dietrichs  
* Danny Ryan  
* Martin Holst Swende  
* lightclient
