> ## Documentation Index
> Fetch the complete documentation index at: https://mantrachain.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Epoch Manager

> Epoch clock contract used by MANTRA DEX (MANTRA Swap)

The Epoch Manager acts as a clock for other contracts (notably the Farm Manager) by defining epochs that are derived from a genesis epoch and a duration.

An **epoch** is a period of time defined by `EpochConfig.duration`.

## Instantiate

```json theme={null}
{
  "owner": "mantra1...",
  "epoch_config": {
    "duration": "86400",
    "genesis_epoch": "1571797"
  }
}
```

| Key | Type | Description |
| - | - | - |
| `owner` | String | Contract owner. |
| `epoch_config` | EpochConfig | Epoch configuration. |

## ExecuteMsg

### UpdateConfig

```json theme={null}
{
  "update_config": {
    "epoch_config": {
      "duration": "86400",
      "genesis_epoch": "1571797"
    }
  }
}
```

### UpdateOwnership (::cw\_ownable)

> [!TIP]
>
> This is a `cw_ownable` message.

## QueryMsg

### Config

```json theme={null}
{ "config": {} }
```

### CurrentEpoch

```json theme={null}
{ "current_epoch": {} }
```

### Epoch

```json theme={null}
{ "epoch": { "id": 100 } }
```

### Ownership (::cw\_ownable)

> [!TIP]
>
> This is a `cw_ownable` query.

```json theme={null}
{ "ownership": {} }
```

## MigrateMsg

```json theme={null}
{}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.