> ## Documentation Index
> Fetch the complete documentation index at: https://docs.theblockchainlibrary.com/llms.txt
> Use this file to discover all available pages before exploring further.

# On-chain Governance

> On-chain governance refers to a system where voting results and protocol changes are encoded directly into the blockchain protocol. When a vote succeeds, the smart contract automatically implements the update, bypassing the need for manual developer intervention. This approach pr

# On-chain Governance

On-chain governance refers to a system where voting results and protocol changes are encoded directly into the blockchain protocol. When a vote succeeds, the smart contract automatically implements the update, bypassing the need for manual developer intervention. This approach provides a high degree of transparency and security, as the code itself becomes the source of truth for all governance actions. On-chain governance minimizes the risk of human error or censorship, ensuring the protocol strictly follows the outcomes determined by its decentralized community.

## Definition

On-chain governance refers to a system where voting results and protocol changes are encoded directly into the blockchain protocol. When a vote succeeds, the smart contract automatically implements the update, bypassing the need for manual developer intervention. This approach provides a high degree of transparency and security, as the code itself becomes the source of truth for all governance actions. On-chain governance minimizes the risk of human error or censorship, ensuring the protocol strictly follows the outcomes determined by its decentralized community.

## Simple explanation

On-chain governance means the computer does the work for you. If a vote wins, the blockchain code updates itself immediately. It’s like a vending machine that automatically changes its prices once a majority of customers select the new settings, rather than waiting for an employee to come and do it manually.

## Why it matters

It eliminates the 'human element' in implementation, making the network more robust against corruption or neglect. It provides absolute certainty that if a vote passes, the changes will actually happen.

## How it works

Voting is performed through a specific smart contract. When the voting period closes, the contract tallies the votes. If the threshold is met, the contract automatically calls the functions to modify the protocol parameters without external input.

## Real-world example

The Compound protocol uses on-chain governance to upgrade its smart contracts directly on the Ethereum network.

## Advantages

* Automatic implementation
* High security and trust
* Immutable records
* Censorship resistant

## Limitations

* High gas costs
* Fixed and rigid processes
* Vulnerability to bugs

## Common misconceptions

* Some think on-chain governance is always better, but it is less flexible than off-chain methods. People assume it is perfectly secure, yet smart contract bugs can still lead to disastrous outcomes.

## Related knowledge

* [Blockchain](https://docs.theblockchainlibrary.com/categories/blockchain) — term
* [DAO](https://docs.theblockchainlibrary.com/generated/v2/glossary/dao) — term
* [DeFi](https://docs.theblockchainlibrary.com/categories/defi) — term
* [Governance Proposal](https://docs.theblockchainlibrary.com/generated/v2/glossary/governance-proposal) — term
* [Smart Contracts](https://docs.theblockchainlibrary.com/categories/smart-contracts) — term

***

**Canonical knowledge ID:** `glossary:on-chain-governance`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.