> For the complete documentation index, see [llms.txt](https://docs.geode.fi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.geode.fi/key-concepts/portal/limited-upgradability.md).

# Limited Upgradability

## Global Trustlessness

Geode Finance cannot upgrade the source code of it's contract infrastructure without the approval of their users.&#x20;

This creates a more secure implementation and prevents any harmful events that can be caused by a Governance Token, thus removes the trust between users and the developers.

{% hint style="success" %}

#### <mark style="color:green;">Limited Upgradability is used within both Portal and Withdrawal Contract.</mark>

{% endhint %}

### Upgrading the Portal

1. A new implementation address is proposed by Governance.
2. Proposal can be approved by Senate.
3. Upgrade is now allowed.

### Upgrading Withdrawal Contracts

1. New Withdrawal Contract is proposed by the Governance with the TYPE of `WITHDRAWAL_CONTRACT_UPGRADE`
2. Senate Approves the new Withdrawal Contract. From now on Portal references to the new implementation address
3. Then, anyone can call `fetchUpgradeProposal`:
   1. `fetchUpgradeProposal,` notifies the Portal.
   2. Portal proposes a new implementation on Withdrawal Contract with the TYPE of `UPGRADE`.
   3. Withdrawal Contracts pointing the old implementation enters into **Recovery Mode.**
   4. Owners can approve the proposal and migrate to a new implementation, exiting from the Recovery Mode.

{% hint style="success" %}
If the `fetchUpgradeProposal` **is called by the Owner, the proposal is also automatically approved.**
{% endhint %}


---

# 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.geode.fi/key-concepts/portal/limited-upgradability.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.
