# Securing Your Withdrawal Contract

#### Learn More About the Withdrawal Contracts:

{% content-ref url="/pages/fajxkHebpiVLDHZHMN44" %}
[Withdrawal Contracts](/key-concepts/withdrawal-contracts.md)
{% endcontent-ref %}

As a pool owner, it is your responsibility to keep your Withdrawal Contract up to date, or your pool will immediately go under <mark style="color:red;">**Recovery Mode**</mark>.

### Checking for Upgrades

```javascript
// compare these 2 version IDs:

const lastVersion = await Portal.getWithdrawalContractVersion();
const currentVersion = await WithdrawalContract.getContractVersion();

const needs_upgrade = lastVersion != currentVersion ;
```

### Fetching an Upgrade Proposal

Anyone can fetch an upgrade proposal and force your Staking Pool into Recovery Mode.

However, only the Controller can approve this upgrade proposal to effectively change the code:

```javascript
await WithdrawalContract.fetchUpgradeProposal();
```

### Upgrade

```javascript
await WithdrawalContract.upgradeTo(newImplementation);
```

{% hint style="success" %} <mark style="color:green;">It is always best practice to be in touch with us, in order to be notified for potential upgrades:</mark>\
[*<mark style="color:blue;">**Join Geode's Discord**</mark>*](https://discord.com/invite/RC8fTTuJtm)
{% endhint %}


---

# 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.geode.fi/ethereum-guides/staking-pool-handbook/securing-your-withdrawal-contract.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.
