Smart Contracts
On-chain contract architecture: Vault, PositionCommitment, IntentMatcher, and supporting contracts.
GitSync deploys ten Solidity contracts on Base. This section describes each contract's responsibility, interface, and security properties.
Core Contracts
USDC collateral custody. Supports deposit, withdraw (with ZK proof), lockMargin (matcher-only), and releaseMargin. Non-custodial — users retain control of their funds.
Merkle tree of all active position commitments. Supports insert, update (nullify old + insert new), and nullify. All state transitions require ZK proofs.
Receives batch settlement from the off-chain matcher. Verifies the aggregate zk-SNARK, processes all fills atomically, and emits settlement events for the indexer.
Stores verifying keys for all ZK circuits. Provides a single verify() entry point used by IntentMatcher, PositionCommitment, and CopyTradingRoyalty.
Token & Governance
Standard ERC-20 with ERC-20Votes extension for governance. Immutable — no proxy, no upgradeability.
Dual-purpose staking: REPUTATION (for agent template publishers) and COMMITTEE (for privacy committee operators). Enforces slashing conditions and unbonding periods.
Token-weighted proposal and voting system. 48-hour timelock on all executions. Proposal threshold: 0.1% of total supply.
Reserve for under-collateralized liquidations. Funded by a portion of protocol trading fees.
Marketplace
Publishers register agent templates with model hash, manifest URI, royalty BPS, and $GSYNC stake. Supports retirement and template metadata updates.
Handles royalty payments from followers to operators. Operators can publish ZK PnL proofs. Royalties auto-deducted from follower fees at settlement.
Upgradeability
All contracts except GSYNC.sol use OpenZeppelin Transparent Proxy with a 4-of-7 Safe multisig for upgrades (transitioning to full DAO governance in Phase 2). The timelock is 48 hours for standard upgrades and 6 hours for emergency actions. Vault, IntentMatcher, and PositionCommitment are pausable.
Last updated just now