> For the complete documentation index, see [llms.txt](https://docs.maple.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.maple.finance/technical-resources/syrup/upgradability.md).

# Upgradability

The SYRUP contract includes a simple upgradability mechanism to provide a safeguard for unknown future use cases. The chosen pattern for upgradability is the [NonTransparentProxy](https://github.com/maple-labs/non-transparent-proxy) pattern, which has already been audited and used by the existing Globals contract. Due to the contained nature of SYRUP a decision was made to not import the NTP directly, but rather just copy the functions over, most of them without functionality changes.

Notable changes from the NTP for the `MapleTokenProxy` are:

* The updated constructor logic.
* The use of a `GLOBALS_SLOT` in place of an `ADMIN_SLOT` because to change the implementation of the NTP a call needs to be scheduled in the MapleGlobals contract.

## Proxied Changes

In order to use the existing ERC20 as an implementation for a proxied contract, some small changes were made to it:

* **Constructor removal**\
  Having a constructor in an implementation contract doesn't make much sense as the actual storage used will be the proxy's one.
* **Immutable modifier**\
  Since the constructor was removed, the next step needed was to change the `decimals` variable from an `immutable` to a editable storage variable, to ensure that the proxied contracts could correctly reference it.
* **Making it abstract**\
  The resulting contract was marked as abstract, to make signify that it's incomplete and inheriting contracts need to implement functions to correctly return `name`, `symbol` and `decimal`.

The gist of the difference between the two version of the token can be seen [here](https://www.diffchecker.com/tbN1DhN8/)


---

# 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.maple.finance/technical-resources/syrup/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.
