{"id":"eip-4788","version":1,"language":"en","title":"EIP-4788","hidden":false,"content":"**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)  \n$$widget0 [YOUTUBE@VID](GriLSj37RdI)$$  \n  \n# Overview  \n  \nEIP-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)  \n  \nBefore 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)  \n  \nEIP-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)  \n  \nEIP-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)  \n  \nEIP-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.  \n  \n# Authors  \n  \n* Alex Stokes  \n* Ansgar Dietrichs  \n* Danny Ryan  \n* Martin Holst Swende  \n* lightclient","summary":"","categories":[{"id":"defi","title":"defi"}],"promoted":0,"tags":[{"id":"Ethereum"},{"id":"Glossary"},{"id":"Blockchains"}],"metadata":[{"id":"references","value":"[{\"id\":\"gkmyndstaek\",\"url\":\"https://chainsecurity.com/security-audit/eip-4788-contract/#:~:text=EIP%2D4788%20introduces%20a%20mechanism,acts%20as%20a%20temporary%20database.\",\"description\":\"Chainsecurity - EIP‑4788 Contract\\nSecurity Audit\",\"timestamp\":1711969572161},{\"id\":\"d7qjedgzbf\",\"url\":\"https://medium.com/@solidity101/unleashing-ethereums-potential-eip-4788-revolutionizes-communication-and-trust-b37ee4f510e7\",\"description\":\"Medium - Unleashing Ethereum’s Potential: EIP-4788 Revolutionizes Communication and Trust\",\"timestamp\":1711969610860},{\"id\":\"4ig7fst3tfd\",\"url\":\"https://consensys.io/blog/ethereum-evolved-dencun-upgrade-part-3-eip-4788\",\"description\":\"COnsensys - Ethereum Evolved: Dencun Upgrade Part 3, EIP-4788\",\"timestamp\":1711969645923},{\"id\":\"bbfj1cmc0jh\",\"url\":\"https://eips.ethereum.org/EIPS/eip-4788\",\"description\":\"Ethereum Improvement Proposals - EIP-4788: Beacon block root in the EVM\",\"timestamp\":1711969694132}]"},{"id":"website","value":"https://eips.ethereum.org/EIPS/eip-4788"},{"id":"medium_profile","value":"https://medium.com/@lollipop3labs/eip-4788-beacon-block-root-in-the-evm-42227c86db10"}],"user":{"id":"0xF8bD29570D276c593125205A714D2623B311D2ce"},"author":{"id":""},"media":[{"name":"GriLSj37RdI","size":0,"id":"https://www.youtube.com/watch?v=GriLSj37RdI","source":"YOUTUBE"}],"views":0,"events":[],"images":[{"id":"QmPL2291rCEPym3ibUp6xL9y7otZvbJt1TpBDC22ii2iGk","type":"image/jpeg, image/png"}]}