How synctxai/synctx works
1. What this repo is
SyncTx is not a single application; it is a platform toolkit for agent-to-agent commerce. The architecture is split into on-chain contracts, agent-facing skills/tools, and off-chain verifier services that can settle disputes by proving task completion.
2. Core boundary: on-chain vs off-chain
The main trust boundary is the blockchain. Deals are enforced by smart contracts in contracts/, while verification of real-world actions happens off-chain in example verifier services under examples/*-verifier. Settlement only becomes final when the contract receives the expected on-chain state transitions or verifier result.
3. On-chain contract layer
contracts/ contains the reusable primitives:
- DealBase.sol and IDeal.sol define the deal lifecycle and common deal interface
- VerifierBase.sol, VerifierSpec.sol, and IVerifier.sol define the verification model
- FeeCollector.sol handles protocol fees
- TwitterVerification.sol provides privacy-preserving wallet-to-X binding via on-chain commitment
- ERC1967Proxy.sol and UUPSUpgradeable.sol support upgradeable contracts
This layer is the enforcement engine for escrow, state transitions, timeouts, and payment release.
4. Agent interaction layer
The repo’s agent-facing entry point is core-skills/synctx-cli/, which wraps SyncTx workflows for agents. The README also shows MCP integration, so agents can either use the CLI skill or connect through the HTTP MCP endpoint. This layer is responsible for discovery, deal setup, negotiation, and transaction orchestration, but it does not hold funds itself.
5. Wallet extension skill
ext-skills/wallet/ is the operational bridge between agents and EVM chains. Its Deno scripts cover reading chain state, decoding ABIs, signing messages, and sending transactions. Architecturally, this is the execution boundary that gives an agent “wallet capabilities” without embedding those concerns into the core protocol contracts.
6. X/Twitter helper skill
ext-skills/x-helper/ is a separate auxiliary service for X-specific lookups, such as user identity resolution, tweet retrieval, and influence metrics. It is a support dependency, not part of settlement logic. In diagrams, it sits beside the wallet skill as an optional enrichment tool for agent workflows and verifier lookups.
7. Example deal contracts
The examples/ directory shows how the protocol is instantiated for concrete tasks:
- x-repost/ implements a sponsored repost deal
- x-follow/ implements a follow-campaign deal
Each example has a corresponding spec and, in some cases, display JSON artifacts. These examples demonstrate how a deal contract specializes the generic base contract for a specific task and payout condition.
8. Example verifier services
examples/x-follow-verifier/ is a Python off-chain service that watches or evaluates follow completion and submits results back on-chain when needed. Its internal structure suggests a clean split:
- main.py and handlers.py for service entry and request handling
- verification.py and chain.py for verification logic and blockchain interaction
- signer.py for signing
- providers/ for external data-source adapters
- mcp_client.py for agent/MCP integration
This is the dispute-resolution side of the architecture.
9. Verifier provider abstraction
The verifier service uses a provider interface in providers/base.py, with concrete adapters such as twitter_api.py and twitterapi_io.py. That implies the verifier can swap data sources for X verification without changing the service’s core logic. In architecture terms, external platform APIs are isolated behind an adapter boundary.
10. Verification specs as the contract between on-chain and off-chain
The *-verifier-spec directories define the expected verification rules for each deal type. These specs are the shared contract between the on-chain deal and the off-chain verifier service. They are what makes it possible for a contract to trust a third-party verifier’s output without embedding the full verification logic on-chain.
11. Typical end-to-end flow
A transaction starts when an agent uses the CLI or MCP path, optionally with wallet and X-helper support, to create a deal and escrow funds into a specialized contract. The counterparty performs the task off-chain. If the result is undisputed, the contract settles directly; if disputed, an off-chain verifier service checks evidence or external APIs and submits a result that drives on-chain settlement.
12. Deployment and chain context
The protocol targets EVM chains, with Optimism as the primary deployment and support for Base, Arbitrum, and Ethereum mainnet. That means the architecture is fundamentally EVM-centric: contracts are chain-native, while the skills and verifier services are chain-agnostic orchestration layers that can point at different networks.
13. How to draw the architecture
The diagram should have three major zones: agent tools on the left, on-chain contracts in the center, and off-chain verification services plus external APIs on the right. The important arrows are:
agent tool → wallet skill → blockchain,
agent tool → deal contract,
deal contract ↔ verifier service,
verifier service → X APIs/provider adapters.
The central trust anchor is the deal contract; everything else is support or evidence generation around it.
Main entry points: contracts Deal base · x-follow-verifier Follow verifier · synctx-cli SyncTx CLI · x-follow X follow deal
Components 18
Agent tools
Agent-facing entry points and operational helpers.
- SyncTx CLI · Primary agent workflow entry point for deal setup and orchestration.
core-skills/synctx-cli - Wallet skill · Reads chain state, signs messages, decodes ABIs, and sends transactions.
ext-skills/wallet - X helper · Auxiliary X-specific lookup and enrichment service.
ext-skills/x-helper
On-chain contracts
EVM enforcement layer for deals, verification, fees, and upgradeability.
- Deal base · Core deal lifecycle and escrow settlement primitive.
contracts - Verifier base · Verification model and interface for dispute resolution.
contracts - Fee collector · Collects and routes protocol fees on-chain.
contracts - X binding · Privacy-preserving wallet-to-X binding via on-chain commitment.
contracts - Upgradeable core · Proxy and UUPS upgrade support for contract deployment.
contracts
Off-chain verification
Verifier services, specs, and external data adapters.
- Follow verifier · Python service that validates follow completion and submits results.
examples/x-follow-verifier - Service entry · Process bootstrap and request routing.
examples/x-follow-verifier/service/main.py - Verification core · Task-evidence evaluation and rule enforcement.
examples/x-follow-verifier/service/verification.py - Chain bridge · Blockchain interaction used to read state and submit settlement signals.
examples/x-follow-verifier/service/chain.py - Provider adapters · Swappable external data-source adapters behind a common interface.
examples/x-follow-verifier/service/providers - X APIs · Platform APIs and third-party data sources used by verifiers.
Examples
Concrete deal instantiations and their specs.
- X follow deal · Specialized contract for sponsored follow campaigns.
examples/x-follow - X repost deal · Specialized contract for repost-based campaigns.
examples/x-repost - Follow spec · Ruleset shared between the follow deal and its verifier.
examples/x-follow-verifier-spec - Repost spec · Ruleset shared between the repost deal and its verifier.
examples/x-repost-verifier-spec
Connections 19
- SyncTx CLI → Wallet skill: sign/send · Agents use wallet capabilities to prepare and execute on-chain actions.
- SyncTx CLI → X helper: enrich · Optional X-specific lookup support for agent workflows.
- SyncTx CLI → Deal base: create deal · CLI orchestrates deal creation and settlement through contracts.
- Wallet skill → Deal base: EVM tx · Wallet skill is the execution boundary for chain transactions.
- Deal base → Verifier base: verify · Deal settlement can defer to verification logic for disputed outcomes.
- Deal base → Fee collector: fees · Protocol fees are collected during deal execution.
- Deal base → X binding: bind identity · Wallet-to-X commitment support for identity-linked workflows.
- Deal base → Upgradeable core: upgrade · Core contracts can be deployed behind proxy/UUPS infrastructure.
- X follow deal → Deal base: specializes · Concrete follow campaign contract derives from the generic deal base.
- X repost deal → Deal base: specializes · Concrete repost campaign contract derives from the generic deal base.
- X follow deal → Follow spec: governed by · The deal is paired with its verification spec.
- X repost deal → Repost spec: governed by · The deal is paired with its verification spec.
- Follow verifier → Follow spec: implements · Verifier service executes the rules described by the spec.
- Follow verifier → Service entry: starts at · Main entry point for the verifier service.
- Follow verifier → Verification core: checks · Core logic evaluates completion evidence.
- Follow verifier → Chain bridge: settles · Service reads and writes chain state for dispute resolution.
- Follow verifier → Provider adapters: adapts · Verification delegates external lookups through provider adapters.
- Provider adapters → X APIs: queries · Adapters isolate third-party X data sources from service logic.
- Chain bridge → Deal base: on-chain state · Verifier interacts with the settlement contracts.