# Energy Web Chain

The Energy Web Chain (EWC) is an open-source, [Proof-of-Authority](https://app.gitbook.com/s/YWg48ihcKhfciND26AxD/ewc-governance/proof-of-authority-consensus-mechanism) public blockchain [derived from Ethereum](https://docs-launchpad.energyweb.org/core-concepts/ethereum) blockchain technology. It is the foundational trust and persistence layer of EW-DOS.

The blockchain performs three key functions in EW-DOS:

1. Provides the smart contract mechanism to store [decentralized identities](https://docs-launchpad.energyweb.org/core-concepts/decentralized-identifiers-dids) (DIDS)
2. Facilitates on-chain verification and transactions between parties
3. Executes smart contracts that are used by EW-DOS's decentralized applications, SDKs and utility packages.‌

<figure><img src="https://energy-web-foundation.gitbook.io/~gitbook/image?url=https%3A%2F%2F2400236058-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F-M_pXALj14Egb-5Bal_p%252Fuploads%252FY2Jt87waiIIPHkHv0h2a%252FEnergy%2520Web%2520Decentralized%2520Operating%2520System_1.jpg%3Falt%3Dmedia%26token%3D150ce9a6-0755-4413-8050-09d545256f98&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=fe0379a4&#x26;sv=1" alt=""><figcaption></figcaption></figure>

You can read more about the Proof-of-Authority consensus mechanism [here](https://app.gitbook.com/s/YWg48ihcKhfciND26AxD/ewc-governance/proof-of-authority-consensus-mechanism).

The blockchain **provides trust** in several ways that allow for a decentralized system that is self-executing and without central authority or oversight of on-chain transactions:

1. **The data in each block is immutable and unchangeable.** Each [block in a blockchain](https://ethereum.org/en/developers/docs/blocks/) is linked to the previous block by a cryptographically created hash. If one block is tampered with, the hash of every subsequent block in the chain would be need to be updated. Because Validators' consensus is required to create new blocks, a block with an alternative transaction history would be rejected by Validators.
2. **Smart contracts provide automated logic for on-chain actions.** Transactions on the chain are governed by code called [smart contracts](https://ethereum.org/en/developers/docs/smart-contracts/) that contain explicit logic and requirements for actions to occur. When specific conditions are met, the code will self-execute. Once a smart contract is deployed on the blockchain, it cannot be changed or reversed, removing the risk that anyone can update the logic of the contract for personal gain.
3. **Cryptographic verification is required for** [**on-chain transactions**](https://ethereum.org/en/developers/docs/transactions/#whats-a-transaction)**.** In order for an individual to verify any on-chain transaction, they must sign the transaction using their private key. This makes it impossible to perform a transaction unless you have the private key.

#### Persistence on the Energy Web Chain <a href="#persistence-on-the-energy-web-chain" id="persistence-on-the-energy-web-chain"></a>

The Energy Web Chain stores the following information:

* Smart contracts for [Decentralized Identities (DIDs) ](https://docs-launchpad.energyweb.org/core-concepts/decentralized-identifiers-dids)that are created through EW-DOS's identity and access management library.
* Smart contracts that govern validator consensus behavior and remuneration. These are known as [system contracts](https://energy-web-foundation.gitbook.io/energy-web-documentation/legacy-documentation/ew-dos-technology-components-2023/trust-layer-energy-web-chain/system-architecture/system-contracts).
* Smart contracts that implement other Ethereum network protocols, such as permissioning and [the OpenEthereum client](https://energy-web-foundation.gitbook.io/energy-web-documentation/legacy-documentation/ew-dos-technology-components-2023/trust-layer-energy-web-chain/system-architecture/system-contracts#implementing-client-protocol) protocols.
* Smart contracts that contain logic and functionality specific to applications deployed on the Energy Web Chain and the utility packages that connect them and their users to the Energy Web Chain.

If you're not familiar with Smart Contracts, you can read Ethereum's introduction to smart contracts [here](https://ethereum.org/en/developers/docs/smart-contracts/).

You can see a list of repositories containing EW-DOS smart contracts [here](https://energy-web-foundation.gitbook.io/energy-web-documentation/legacy-documentation/ew-dos-technology-components-2023/trust-layer-energy-web-chain/ewc-guides-and-tutorials/interacting-with-a-smart-contract#ew-dos-smart-contracts).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs-launchpad.energyweb.org/ewc-ecosystem/energy-web-chain.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
