# Network and Contracts

HermesTrade runs on the Monad blockchain — an EVM-compatible Layer 1 with native token MON.

{% hint style="info" %}
The current chain configuration and contract addresses are always available at runtime by calling `GET /public-info` on the Gamma API. The response includes `chain` (array of chain config objects with chain ID, RPC URL, and explorer URL) and `contracts` (object with all on-chain contract addresses). Use this endpoint to fetch authoritative values rather than hardcoding them.
{% endhint %}

***

## Network configuration

| Parameter      | Value                                                    |
| -------------- | -------------------------------------------------------- |
| Chain          | Monad                                                    |
| Native token   | MON                                                      |
| EVM compatible | Yes                                                      |
| Chain ID       | Retrieve from `GET /public-info` → `chain[].chainId`     |
| RPC URL        | Retrieve from `GET /public-info` → `chain[].rpcUrl`      |
| Block explorer | Retrieve from `GET /public-info` → `chain[].explorerUrl` |

To fetch the current values:

```
GET https://gamma-api.hermestrade.xyz/public-info
```

The `publicInfoResponse.chain` array contains the chain configuration. Look for the object matching the network you are connecting to.

***

## Adding Monad to MetaMask

1. Open MetaMask and go to **Settings → Networks → Add a network**.
2. Enter the values from `GET /public-info`:
   * **Network name:** Monad
   * **New RPC URL:** value from `chain[].rpcUrl`
   * **Chain ID:** value from `chain[].chainId`
   * **Currency symbol:** MON
   * **Block explorer URL:** value from `chain[].explorerUrl`
3. Save and switch to the Monad network.

***

## Smart contract addresses

Contract addresses are returned by `GET /public-info` in the `contracts` field. The key contracts are:

| Contract                          | Description                                                | Address                                        |
| --------------------------------- | ---------------------------------------------------------- | ---------------------------------------------- |
| Conditional Token Framework (CTF) | ERC1155 contract that creates and settles outcome shares   | Retrieve from `GET /public-info` → `contracts` |
| CLOB Exchange                     | The on-chain exchange contract that settles matched orders | Retrieve from `GET /public-info` → `contracts` |
| USDW (collateral token)           | Wrapped USD used for all trading and settlement            | `0xb7bD080Df56FA76ce6CA4fA737d47815f7F8e746`   |
| Safe factory                      | Factory contract used to deploy proxy wallets              | Retrieve from `GET /public-info` → `contracts` |

{% hint style="warning" %}
Contract addresses are chain-specific. Always retrieve them from `GET /public-info` at application startup rather than hardcoding values that may change between networks or deployments.
{% endhint %}

***

## Token model

HermesTrade outcome shares are ERC1155 tokens managed by the CTF contract, not ERC20 tokens.

* Each market has two token IDs: one for YES shares, one for NO shares.
* These IDs are returned as `clobTokenIds: string[]` on the Gamma API `Market` object — index 0 is YES, index 1 is NO.
* `clobTokenIds` are ERC1155 token IDs (large uint256 integers), not ERC20 contract addresses.
* Use these token IDs as the `token_id` parameter in CLOB API calls.

***

## Collateral token

HermesTrade uses **USDW** (USD Wrapped) as its collateral token — the asset you deposit to fund trades and receive back at market resolution.

| Parameter        | Value                                        |
| ---------------- | -------------------------------------------- |
| Symbol           | USDW                                         |
| Contract address | `0xb7bD080Df56FA76ce6CA4fA737d47815f7F8e746` |
| Network          | Monad                                        |
| Standard         | ERC-20                                       |
| Decimals         | 6                                            |

{% content-ref url="/pages/qfaUnYf88Hy8Jtj3uhJu" %}
[USDW](/core-concepts/usdw.md)
{% endcontent-ref %}


---

# 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.hermestrade.xyz/reference/network-contracts.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.
