> For the complete documentation index, see [llms.txt](https://woken-exchange.gitbook.io/wokenexchange/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://woken-exchange.gitbook.io/wokenexchange/woken-v1-our-solution/timekeeper.md).

# Timekeeper

When a project owner creates his liquidity pair on Woken, **it is by default tradable 24-7**, as on any AMM.

Timekeeper is an option that a Project Owner/Builder (PairAdmin) enable/disable if he wants to customize the trading hours of his pair on the DEX, according to his needs.

<details>

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

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

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

{% endcode %}

</details>

<figure><img src="/files/x25RC6mgM421tb84YGan" alt=""><figcaption><p>Timekeeper Page : Timekeeper is not enabled for this pair</p></figcaption></figure>

Once enabled\*, he can switch from 24-7 to custom trading hours for his pair. \
Timekeeper management is facilitated by a dedicated, intuitive and easy-to-use interface.

<figure><img src="/files/7HeQeCOiGDQmCkU2qNFq" alt=""><figcaption><p>Timekeeper Page : Timekeeper is enabled for this pair</p></figcaption></figure>

{% hint style="info" %}
When the PairAdmin enables his pair's Timekeeper for the very first time, the default settings is: open every day from Monday to Friday without interruption, closed from Saturday at 00:00 UTC 0 and Sunday before reopening the following Monday at 00:00 UTC 0 (24h/Day option enabled).

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

```solidity
TimekeeperPerLp[pair]= pairTimekeeper(0, 0, 23, 59, [0,0,0,0,0,1,1], 0, true);
```

{% endcode %}
{% endhint %}

***

## How Timekeeper works?

Timekeeper is the smart contract that controls the LPs trading hours.&#x20;

Whenever a user initiates a transfer, LP will request the Timekeeper for the current trading status. The Timekeeper retrieves the actual time from the blockchain, computes the status of the transactions and sends it back.

<figure><img src="/files/C7uI66Lko6ir2mKUTa8w" alt="" width="563"><figcaption><p>Timekeeper</p></figcaption></figure>

{% embed url="<https://github.com/WokenExchange/Contracts/blob/master/Timekeeper.sol>" %}
