> For the complete documentation index, see [llms.txt](https://docs.nomad.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nomad.xyz/the-nomad-protocol/smart-contracts/replica.md).

# 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.nomad.xyz/the-nomad-protocol/smart-contracts/replica.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
