Synq
Skip to content
[ synq / docs ]Synq home

Smart contracts

The Solidity contracts behind Synq vaults, escrow, mandates and risk attestations.

Synq's contracts live in contracts/src (Solidity 0.8.28, built and tested with Foundry through corepack pnpm test:contracts). Money only moves through them, or through a wallet the user controls. The server, the agents and the Kernel can propose and authorize, but the chain enforces.

Two generations#

GenerationContractsUsed for
Arc vault stack (contracts/src/arc)SynqArcVaultFactory, SynqArcVaultPolicy, SynqArcFallbackHandler, SynqMilestoneEscrowCurrent business and group vaults, scoped operator payments, client escrow
Mandate stack (contracts/src/*.sol)SynqGroupFactory and SynqSafeModuleSetup, MandateRegistry, ExecutionModule, RiskAttestationRegistryQuorum-signed execution grants within mandate envelopes, and the risk gate

The Safe vault#

A Synq vault is a Safe v1.4.1 account (the canonical SafeL2 singleton and proxy factory). Its owners keep custody: transfers need an M-of-N EIP-712 owner signature, as for any Safe. The factory adds a policy contract that acts as the Safe's transaction guard and as an enabled module, and a stricter fallback handler.

                 owner quorum (M-of-N signatures)
                          |
                          v
   +-----------------------------------------------+
   |  Safe proxy (SafeL2 v1.4.1)                    |
   |   guard           = SynqArcVaultPolicy         |
   |   module          = SynqArcVaultPolicy         |
   |   fallback handler= SynqArcFallbackHandler     |
   +-----------------------------------------------+
        ^                    ^                  ^
        |                    |                  |
   checkTransaction     pay(recipient,       isValidSignature
   (timelock, pause,    amount, ref)         (only Safe-approved
    atomic txs)         scoped operator       messages, never
                        within caps           while paused)

What the policy adds on top of plain Safe custody:

  • Governance timelock: owner-initiated governance (owner or threshold changes, module and guard changes, DELEGATECALL, operator scope expansion) must be queued, wait the vault's delay (1 hour to 30 days), then execute once inside a 14-day grace window.
  • Scoped operator: one address may pay allowlisted recipients, in one token, under a per-payment cap and a rolling 24-hour cap. It cannot change governance.
  • Guardian pause: a guardian can freeze outflows for at most 7 days, then must wait 2 days before pausing again. It cannot move funds.
  • Atomic transactions: Safe gas refunds and non-zero safeTxGas are rejected.

The factory creates all of this in one transaction and verifies the result (module enabled, guard and fallback handler slots, threshold) before it returns, otherwise it reverts with SetupVerificationFailed.

Deployed Arc testnet addresses#

These come from the contract list in sources/arc_registry.json, which packages/chain-registry loads and validates (including pinned code hashes). The registry is the only place addresses live; if this table and the registry differ, the registry is right.

ContractRegistry kindAddress
SynqArcVaultFactorySYNQ_ARC_VAULT_FACTORY0x883f80e404b4122084F9a877790A502b3d7f621c
SynqArcVaultSetup (helper)SYNQ_ARC_VAULT_SETUP0x85742244b0F439EE28ce5e9f412eC73AD38eD7Cf
SynqArcFallbackHandlerSYNQ_ARC_FALLBACK_HANDLER0x925B2C16FfF6a0912F02327384df25903054dB0c
SynqMilestoneEscrowSYNQ_MILESTONE_ESCROW0xB9894B4224CCD0EaECC7637fc40AEdD600783b7D
Example vault Safe (proxy)SYNQ_ARC_VAULT_SAFE0x4aD226BDc7964B8B54802436C3D961942b2d58e1
Example vault policySYNQ_ARC_VAULT_POLICY0xaD1C4188379001939Fb94d999556292574D1e86c

The mandate stack (SynqGroupFactory, MandateRegistry, ExecutionModule, RiskAttestationRegistry) has no entry in the Arc registry; it is deployed per environment by deployment records read by the execution worker and read model, not by fixed registry entries.

The Arc USDC ERC-20 interface used by the vault stack is a 6-decimal view of Arc's native USDC (18-decimal native units), with one balance and two interfaces. The registry converts between them with arcNativeToUsdc and usdcToArcNativeWei.

Common properties#

  • No Synq contract has an owner, an admin key or a proxy, except RiskAttestationRegistry, which has a two-step owner that can only rotate the forwarder and workflow checks. Each contract exposes UPGRADE_AUTHORITY() where it applies, and tests check that the statement does not drift.
  • Contracts use a simple reentrancy lock and update state before every token transfer.
  • Tests: corepack pnpm test:contracts runs forge build and forge test offline in contracts.

Edit this page on GitHub