# Replica

The Replica [(contract code)](https://github.com/nomad-xyz/monorepo/blob/main/packages/contracts-core/contracts/Replica.sol) is the core contract deployed on all chains that wish to *receive* inbound messages. It serves as the "inbox" for all messages sent from a specific [Home contract](/the-nomad-protocol/smart-contracts/home.md). For example, the [uni-directional channel](/the-nomad-protocol/cross-chain-messaging.md) from Ethereum to Moonbeam is generated by deploying a Home on Ethereum, and an Ethereum Replica on Moonbeam.

### Updates on the Replica

Before accepting an update, a Replica places it into a queue of pending updates. Each update must wait for some time parameter ([the optimistic dispute window](/the-nomad-protocol/security/root-of-trust/fraud/optimistic-timeout-period.md)) before being accepted. While a Replica cannot know that an update is certainly valid, the dispute window guarantees that fraud is publicly visible on the Home before being accepted by the Replica.

In other words, the security guarantee of the system is that all fraud may be detected by any participant and published via a proof on-chain during the window to react. Therefore updates that are not flagged by [Watchers](/the-nomad-protocol/off-chain-agents/watchers.md) are sufficiently trustworthy for the Replica to accept.


---

# 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.nomad.xyz/the-nomad-protocol/smart-contracts/replica.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.
