# Upgrade Model

Glacis infrastructure contracts are all immutable. The main reasons that allow the implementation of this approach are:

* The highly modular structure of Glacis (adapters can be updated and re-registered at any time)
* Most of the infrastructure components are stateless, or at least stateful for a short period of time (Ex while a message is still not delivered some message information can be stored in router)
* There is no locked value in any contract. At the same time, new features or fixes may need to be added as Glacis cannot control the GMP protocols that it adapts to, so some sort of an upgrade model is desired.\
  Glacis' upgrade model consists of component redeployment while maintaining backward compatibility. That means that if a user is working with current Glacis Infrastructure V1 and a version V2 is deployed, users can opt to update their smart contracts' stored router and mediators addresses to the new ones if they want to leverage new features/fixes.

This table details the upgrade model for each component:

| Component      | Contract Type                             | Upgrade Model                                                                                                                                                                                                                                                                                                                  |
| -------------- | ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Adapters       | <p>Immutable</p><p>Deployed By Glacis</p> | An adapter can be unregistered and re-registered at any time with a new deployed contract. Clients do not have to be updated                                                                                                                                                                                                   |
| Router         | Immutable                                 | A new version can be deployed at any time.Previous adapters must be re-registered.\nIf there are changes in the interface a new version of the Client and Token Client must be deployed                                                                                                                                        |
| Token Mediator | Immutable                                 | A new version must be deployed if a new version of the Router is deployed with changes in the interface. A new version can be deployed at anytime. Users need to re-deploy their Token Client contracts with the new Token Mediator. If there are changes in the interface a new version of the Token Client must be deployed. |
| Message Client | Deployed by User                          | A new version must be deployed if a new version of the Router with changes in interface is deployed                                                                                                                                                                                                                            |
| Token Client   | Deployed by User                          | A new version must be deployed if a new version of the Token Mediator with changes in interface is deployed                                                                                                                                                                                                                    |


---

# 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.glacislabs.com/glacis-core/concepts/upgrade-model.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.
