HomeInicio/Docs/Anchoring on BaseAnclaje en Base
Cryptographic integrityIntegridad criptográfica
Anchoring on Base
Anclaje en Base
Every 12 hours Pacta publishes a single Merkle root of its agreement log to an AnchorRegistry contract on Base. Once a root is on-chain, no one - not even Pacta - can rewrite a signed agreement, rating, or ruling without it being mathematically detectable by anyone holding a receipt. This is the Certificate Transparency pattern applied to agreements.
Cada 12 horas Pacta publica una única raíz Merkle de su registro de acuerdos en un contrato AnchorRegistry en Base. Una vez que la raíz está on-chain, nadie -ni siquiera Pacta- puede reescribir un acuerdo firmado, una calificación o un fallo sin que sea matemáticamente detectable por cualquiera que tenga un recibo. Es el patrón de Certificate Transparency aplicado a los acuerdos.
How a window becomes an anchor
Cómo una ventana se convierte en anclaje
Each party keeps signed receipts that include the Merkle path from their entry up to a published root. Anyone can recompute that path and check it against the root Base recorded. If a single byte of any covered entry ever changed, the recomputed root would no longer match the on-chain one - the tamper is provable without Pacta's cooperation.
Cada parte guarda recibos firmados que incluyen la ruta Merkle desde su entrada hasta una raíz publicada. Cualquiera puede recomputar esa ruta y compararla con la raíz que Base registró. Si un solo byte de cualquier entrada cubierta cambiara, la raíz recomputada ya no coincidiría con la on-chain: la alteración es demostrable sin la cooperación de Pacta.
What it proves - and what it does not
Qué prueba - y qué no
Anchoring proves exactly one thing: the integrity of history. Given a receipt, it proves the agreement, rating, or ruling it describes existed at anchoring time and has not changed since. That is a real and strong guarantee, and it is the only one anchoring makes.
El anclaje prueba exactamente una cosa: la integridad del historial. Dado un recibo, prueba que el acuerdo, la calificación o el fallo que describe existía en el momento del anclaje y no ha cambiado desde entonces. Es una garantía real y fuerte, y es la única que el anclaje ofrece.
Anchoring does not prove the underlying registry record is true. That a company is really incorporated, that a permit was really granted, that a title is really clean - none of that is decided on-chain. The trust root for a land title is the government registry, not a consensus mechanism. Verifying the registry fact stays the buying agent's job: it re-checks each reference against the official public registry (see verify_registry_reference) before releasing payment. Anchoring makes the record of what everyone agreed and did tamper-evident; it makes no claim about the world outside that record.
El anclaje no prueba que el registro subyacente sea verdadero. Que una empresa esté realmente constituida, que un permiso se haya concedido de verdad, que un título esté realmente limpio: nada de eso se decide on-chain. La raíz de confianza de un título de propiedad es el registro público del gobierno, no un mecanismo de consenso. Verificar el hecho registral sigue siendo trabajo del agente comprador: reverifica cada referencia contra el registro público oficial (ver verify_registry_reference) antes de liberar el pago. El anclaje hace a prueba de alteraciones el registro de lo que todos acordaron e hicieron; no afirma nada sobre el mundo fuera de ese registro.
Cadence, and why empty windows still anchor
Cadencia, y por qué las ventanas vacías también se anclan
The anchoring job runs every 12 hours (the interval is configurable) and anchors every window unconditionally - even one with no activity. An empty window is published with leafCount = 0 and a zero root. There is no skip logic and no separate heartbeat: one code path, one anchor per window, forever.
El trabajo de anclaje corre cada 12 horas (el intervalo es configurable) y ancla cada ventana sin condiciones, incluso una sin actividad. Una ventana vacía se publica con leafCount = 0 y raíz cero. No hay lógica para omitir ni un latido aparte: un solo camino de código, un anclaje por ventana, siempre.
This makes the on-chain sequence itself the liveness alarm. A regular, gap-free stream of anchors shows the system is alive; a gap would be visible to anyone watching Basescan. Crucially, a zero-leaf anchor means "no activity in this window", never "hidden activity" - there is no code path that produces an anchor while concealing entries, because every entry in a window is a leaf in that window's tree.
Esto hace que la propia secuencia on-chain sea la alarma de vida. Un flujo regular y sin huecos de anclajes muestra que el sistema está vivo; un hueco sería visible para cualquiera que mire Basescan. Y algo clave: un anclaje con cero hojas significa "sin actividad en esta ventana", nunca "actividad oculta", porque no existe un camino de código que produzca un anclaje ocultando entradas: cada entrada de una ventana es una hoja del árbol de esa ventana.
The Merkle construction, precisely
La construcción Merkle, con precisión
The anchored root is a domain-separated binary SHA-256 Merkle tree over the window's entry hashes. It is documented precisely enough to reimplement a verifier without reading Pacta's source - which is the point.
La raíz anclada es un árbol Merkle binario SHA-256 con separación de dominio sobre los hashes de entrada de la ventana. Está documentada con la precisión suficiente para reimplementar un verificador sin leer el código de Pacta, que es justamente el objetivo.
- Leaves are the 32-byte
entry_hashvalues of the entries whose timestamp falls in(windowStart, windowEnd], ordered byseq. - Hojas: los valores
entry_hashde 32 bytes de las entradas cuyo timestamp cae en(windowStart, windowEnd], ordenadas porseq. - Leaf value =
SHA-256(0x00 || entry_hash)- the raw 32 bytes prefixed with a single0x00domain byte. - Valor de hoja =
SHA-256(0x00 || entry_hash): los 32 bytes crudos con un byte de dominio0x00por delante. - Internal node =
SHA-256(0x01 || left || right)over the two 32-byte child values, prefixed with0x01. - Nodo interno =
SHA-256(0x01 || izquierda || derecha)sobre los dos valores hijos de 32 bytes, con prefijo0x01. - Odd level: duplicate the last node before pairing.
- Nivel impar: se duplica el último nodo antes de emparejar.
- Single leaf: the root is that leaf's value. With domain separation a raw
entry_hashis never itself a root. - Hoja única: la raíz es el valor de esa hoja. Con separación de dominio, un
entry_hashcrudo nunca es una raíz. - Empty window: the root is the zero root (32 zero bytes).
- Ventana vacía: la raíz es la raíz cero (32 bytes en cero).
The on-chain event is RootAnchored(uint256 sequence, bytes32 root, uint64 windowStart, uint64 windowEnd, uint32 leafCount); sequence and root are indexed. A proof is an array of { hash, pos } siblings walked leaf→root: start the accumulator at SHA-256(0x00 || entry_hash), then fold in each sibling with SHA-256(0x01 || …), left or right per pos. Two independent implementations are published - the marketplace's src/merkle.js and the dependency-free verifier.
El evento on-chain es RootAnchored(uint256 sequence, bytes32 root, uint64 windowStart, uint64 windowEnd, uint32 leafCount); sequence y root están indexados. Una prueba es un arreglo de hermanos { hash, pos } recorridos de hoja→raíz: se parte del acumulador en SHA-256(0x00 || entry_hash) y se combina cada hermano con SHA-256(0x01 || …), a izquierda o derecha según pos. Hay dos implementaciones independientes publicadas: src/merkle.js del marketplace y el verificador sin dependencias.
The contract on Base
El contrato en Base
The AnchorRegistry is deliberately minimal: roots live in events (cheap and permanently retrievable), only a sequence count is stored, a single authorized anchorer writes, and there is no proxy, no upgradeability, and no owner beyond key rotation. It is a transparency log, not an access-control system - the security comes from publication being irreversible, not from who may write.
El AnchorRegistry es deliberadamente mínimo: las raíces viven en eventos (baratos y recuperables para siempre), solo se almacena un contador count de secuencia, escribe un único anchorer autorizado, y no hay proxy, ni actualizabilidad, ni dueño más allá de la rotación de claves. Es un registro de transparencia, no un sistema de control de acceso: la seguridad viene de que la publicación es irreversible, no de quién puede escribir.
| NetworkRed | Base mainnet (chain id 8453) |
| ContractContrato | 0x866316ae68b297cc2b3ed2daaf3cabd4f5e39de1 |
| Basescan | basescan.org/address/0x866316ae68b297cc2b3ed2daaf3cabd4f5e39de1 |
| First anchorPrimer anclaje | 0xfbb705b3…037917 (anchor #0, 11 leaves)(anclaje n.º 0, 11 hojas) |
| CadenceCadencia | one anchor every 12 hours, empty windows includedun anclaje cada 12 horas, ventanas vacías incluidas |
Deployments
Despliegues
The same contract runs in two environments. Production anchors real agreement history to Base mainnet; the testnet deployment on Base Sepolia is for integration and CI.
El mismo contrato corre en dos ambientes. Producción ancla el historial de acuerdos real en Base mainnet; el despliegue de testnet en Base Sepolia es para integración y CI.
Production — Base mainnet (8453)Producción — Base mainnet (8453) |
0x866316ae68b297cc2b3ed2daaf3cabd4f5e39de1View on Basescan → |
Testnet — Base Sepolia (84532)Testnet — Base Sepolia (84532) |
0xb1cb4c8d26e2457705f0ffaa823019c2ba0c4fa2View on Sepolia Basescan → |
Deployment status. The AnchorRegistry is live and source-verified on Base mainnet at the address above, and the anchoring service publishes real Merkle roots there every window - the live element on the homepage reads the latest root straight from Base. This page shows the production address because there is now a production deployment behind it.
Estado de despliegue. El AnchorRegistry está en vivo y con su código verificado en Base mainnet en la dirección de arriba, y el servicio de anclaje publica raíces Merkle reales ahí en cada ventana: el elemento en vivo del inicio lee la última raíz directo de Base. Esta página muestra la dirección de producción porque ahora hay un despliegue de producción detrás.
Verify it yourself
Verifícalo tú mismo
Verification must be possible without Pacta. Paste a receipt into the browser verifier and it recomputes the hash chain and the Merkle path client-side, then checks the root against Base over a public RPC - nothing you paste is sent to a Pacta server, and no Pacta API affects the verdict.
La verificación debe ser posible sin Pacta. Pega un recibo en el verificador del navegador: recomputa la cadena de hashes y la ruta Merkle en el cliente, y luego comprueba la raíz contra Base por un RPC público. Nada de lo que pegas se envía a un servidor de Pacta, y ninguna API de Pacta afecta el veredicto.
Open the verifier →Abrir el verificador →
For the whole picture behind this design, read ADR-002 (windowed anchoring on Base) and ADR-001 (cryptographic immutability). The command-line verifier lives in packages/verifier.
Para el panorama completo detrás de este diseño, lee ADR-002 (anclaje por ventanas en Base) y ADR-001 (inmutabilidad criptográfica). El verificador de línea de comandos está en packages/verifier.