# Safety Tools

<figure><img src="https://1024955971-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FucapM7ajIRHbhMUaNv7T%2Fuploads%2FKkIXmMkrg8X5RNBjboUr%2Fsafety.png?alt=media&#x26;token=49a1f4d3-f365-4a2b-9898-f7c5190eacd4" alt=""><figcaption><p>Safety Tools</p></figcaption></figure>

**Disable timekeeper** : If you no longer wish to use your Timekeeper, you can disable it and return to 24-7. The [open/closed module](https://woken-exchange.gitbook.io/wokenexchange/swap-open-closed#dynamic-open-closed-module) on the swap page will also indicate that your pair's timekeeper is no longer active.

<details>

<summary><mark style="color:blue;">function setEnable</mark></summary>

{% code title="WokenFactory.sol" overflow="wrap" %}

```solidity
function setEnable(address _pair, bool _enable) public isPairAdmin(_pair) {
        isTimekeeperEnabledLP[_pair] = _enable;
        emit TimekeeperEnable(_pair);
```

{% endcode %}

</details>

{% hint style="success" %}
The timekeeper remembers your settings, so if you decide to reactivate it later, you'll find your old settings. Which you can, of course, change again if you wish.
{% endhint %}

***

**Transfer Ownership** : if you want to transfer the ownership of your Timekeeper to a new address.

<details>

<summary><mark style="color:blue;">function setPairAdmin</mark></summary>

{% code title="WokenFactory.sol" overflow="wrap" %}

```solidity
function setPairAdmin(address _addr, address _pair) public isPairAdmin(_pair){
        address temp = pairAdmin[_pair];
        pairAdmin[_pair] = _addr;
        emit PairAdminChanged(temp, _addr);
    }
```

{% endcode %}

</details>

{% hint style="warning" %}
If you transfer the Timekeeper ownership to a new address, you will no longer be able to edit it with the old one. Use with caution.
{% endhint %}

***

{% hint style="danger" %}
**Security ForceOpen feature for DexAdmin**

If a PairAdmin's wallet is hacked and the hacker decides to close his pair for lifetime, users' funds will be locked forever as the Timekeeper blocks the swap, burn, and mint functions. &#x20;

**ForceOpen acts as a safety valve if such a situation should arise.** &#x20;

If a pair is permanently closed due to a hack of PairAdmin's wallet, and if the situation has been verified (large-scale notification from the project community + verification of the admin's address from the backend), the DexAdmin has the possibility to force-open the pair, enabling users to recover their funds. &#x20;

&#x20;&#x20;

The ForceOpen feature has also a 48h timelock protection before getting activated by the DexAdmin.

```solidity

//security option for DexAdmin to avoid closed pair for lifetime
    function setForceOpenTimelock(address _pair, bool _enable) public isDexAdmin {
        require (isTKEnabled(_pair), "Timekeeper is Disabled, market is already open");
        timelock[_pair] = block.timestamp + 172800; // 48h timelock
        isForceOpenTimelock[_pair] = _enable;
        emit ForceOpenTimelock(_pair, _enable);
    }

    function setForceOpen(address _pair) public isDexAdmin {
        require(block.timestamp >= timelock[_pair], "Timelock not yet expired");
        isForceOpen[_pair] = isForceOpenTimelock[_pair];
        emit ForceOpen(_pair);
    }
```

{% endhint %}
