Skip to content

XMTP protocol overview

XMTP is a decentralized messaging protocol that enables secure, end-to-end encrypted communication between blockchain addresses. This section covers the technical foundations and implementation details of how XMTP works under the hood.

Architecture fundamentals

With XMTP, messages are routed through topics, which are unique addresses that identify conversation channels. Messages are packaged as envelope types that contain the actual message data plus metadata for routing and processing.

The protocol prioritizes security through advanced cryptographic techniques, delivering end-to-end encryption for both 1:1 and group conversations. To learn more, see XMTP's security properties and how wallet signatures authenticate users.

Group messaging mechanics

For group conversations, XMTP introduces sophisticated state management:

  • Epochs represent the cryptographic state of a group at any point in time. Each group operation (like adding members) creates a new epoch with fresh encryption keys. This concept comes from Messaging Layer Security, which XMTP builds upon.

  • Intents provide reliable state management through an internal bookkeeping system that handles retries, crashes, and race conditions when applying group changes.

  • Cursors enable efficient message synchronization by tracking where each client left off when fetching new messages.

Key concepts

ConceptPurposeKey benefit
SecurityEnd-to-end encryptionPrivacy and message integrity
TopicsMessage routing and addressingEfficient pub/sub architecture
Envelope typesMessage format and structureStandardized communication protocol
EpochsGroup cryptographic stateKey rotation and post-compromise security
IntentsReliable group operationsConsistency despite network issues
CursorsMessage synchronizationEfficient incremental updates
Wallet signaturesAuthenticationVerified sender identity

Protocol evolution

XMTP evolves through XMTP Improvement Proposals (XIPs), which are design documents that propose new features and improvements. This governance process ensures systematic and decentralized protocol development.

Additional resources

For a broader vision of XMTP's approach to core concepts, see the following topics on xmtp.org:

Who should read these docs

The protocol documentation is designed for:

  • Protocol contributors working on XMTP's core implementation
  • Security researchers auditing XMTP's cryptographic design
  • Anyone curious about the technical details behind XMTP's messaging

For most developers, the Build chat apps and Build agents sections provide the practical guidance needed to build with XMTP.