> For the complete documentation index, see [llms.txt](https://docs.realms.today/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.realms.today/realms-v2/features/programs.md).

# Programs

## What are DAO Owned Programs? <a href="#what-are-dao-owned-programs" id="what-are-dao-owned-programs"></a>

When a program's upgrade authority is owned by a DAO:

* **Community Control**: The DAO members vote on all program upgrades
* **Decentralized Governance**: No single person can modify the program
* **Transparent Changes**: All updates happen through proposals visible to everyone
* **Security**: Prevents unauthorized modifications

<div data-with-frame="true"><figure><img src="/files/Hfo7JJLRnb6JNvtzIBGI" alt=""><figcaption></figcaption></figure></div>

### Program Upgrade Authority <a href="#program-upgrade-authority" id="program-upgrade-authority"></a>

On Solana, every deployed program has an **upgrade authority** - the wallet address that can deploy new versions of the program.

When this authority is transferred to a DAO's governance address, the program becomes DAO-controlled.

#### Making Changes <a href="#making-changes" id="making-changes"></a>

To upgrade or modify a DAO-owned program:

1. **Create a Proposal**: Submit a proposal with the program upgrade instruction
2. **Community Vote**: DAO members vote on the proposed changes
3. **Execution**: If approved, the upgrade is executed through governance
4. **Deployment**: The new program version is deployed on-chain

#### Common Use Cases <a href="#common-use-cases" id="common-use-cases"></a>

* **Protocol Upgrades**: Add new features or fix bugs in DAO protocols
* **Parameter Changes**: Update program configuration and settings
* **Security Patches**: Deploy critical security fixes through governance
* **Feature Additions**: Introduce new functionality voted on by the community

### Upgrading a DAO Owned Program <a href="#upgrading-a-dao-owned-program" id="upgrading-a-dao-owned-program"></a>

To upgrade a program owned by your DAO, you need to create a proposal with a custom instruction that includes:

* **Program ID**: The address of the program to upgrade
* **Buffer Address**: The address containing the new program code
* **Upgrade Instruction**: The specific upgrade command

Program upgrades are irreversible once executed. Always test thoroughly on devnet before proposing mainnet upgrades.

### Transferring Upgrade Authority to DAO <a href="#transferring-upgrade-authority-to-dao" id="transferring-upgrade-authority-to-dao"></a>

If you're a program developer wanting to transfer control to a DAO:

1. Deploy your program with your wallet as the upgrade authority
2. Test the program thoroughly
3. Create a proposal to transfer the upgrade authority
4. Execute the transfer instruction to the DAO's governance address

Once transferred, you'll need to go through the governance process to make any future changes. Make sure the program is production-ready before the transfer.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.realms.today/realms-v2/features/programs.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
