SAFE execution flows — escrow settlement + attestation signing (Phase D) #14
syntropicagent opened 2 weeks ago

Part of KI-12 SAFE Wallet integration — deferred from v1.2.

Phase D covers SAFE write-path execution flows (human-gated), building on the read-side module (Phases A/B) and farm provisioning (Phase C) already shipped in KI-12.

Scope

  1. Escrow settlement through SAFE — credit/marketplace sell/buy order settlement (services/credit_class/marketplace.py) executed via a SAFE multisig with n/m confirmation, replacing raw key-based escrow.
  2. Attestation signing through SAFE — the Core Team SAFE (0x03779B674CbCBfc0B801c4cAc9DFaC8aACbbD5c5) signs EAS attestations; services/attestation/signer_service.py proposes attestation txs to SAFE, signers approve via SAFE app/API, then execute.
  3. Farm treasury ops — propose → signers confirm → execute on deployed farm SAFEs (Phase C).

Constraints

  • Agents hold the SAFE "propose function role" only — they propose, never sign.
  • Humans are the approval gate (matches services/agents/safety.py invariant).
  • Official SAFE Factory + APIs; chain-agnostic (Gnosis/Celo/Ethereum + any SAFE-supported chain).
  • Write-path code must remain gated behind explicit human approval.

Depends on

  • KI-12 Phases A–C (PR KI-107) — read module + provisioning shipped.

Refs KI-12 · backlog

  • syntropicagent changed iterations 2 weeks ago
    Previous Value Current Value
    empty
    backlog
  • syntropicagent commented 2 weeks ago

    Deferred Phase D of KI-12 (SAFE Wallet). Tracked as follow-up; depends on KI-12 Phases A-C (PR KI-107).

  • syntropicagent referenced from other issue 2 weeks ago
  • syntropicagent changed iterations 2 weeks ago
    Previous Value Current Value
    backlog
    v1.2
  • syntropicagent commented 2 weeks ago

    Phase D implementation complete (2026-08-30)

    All four workstreams implemented on feat/ki14-safe-execution (PR KI-109, CI running):

    • D1 SafeProposeClient — EIP-712 safeTxHash verified against a REAL on-chain tx on the Core Team SAFE (Gnosis nonce 6 → 0x776c65...). 7 tests.
    • D2 Attestation via SAFE (Celo) — propose attest() calls to Core Team SAFE, reconcile on execution. Migration 355. 3 tests.
    • D3 Escrow settlement via SAFE (Gnosis) — credit transfer + fee proposed with 2-of-3 confirmation. Migration 356. 3 tests.
    • D4 Farm treasury ops — kokonut treasury ops-propose. 4 tests.

    17 new tests, all green. Security model: server delegate key is propose-only; humans confirm on SAFE. Delegate key = ATTESTER_PRIVATE_KEY (SOPS).

    Next: Sepolia testnet validation before production chains, then merge when CI green.

  • syntropicagent changed state to 'Closed' 2 weeks ago
    Previous Value Current Value
    Open
    Closed
1/1
Type
New Feature
Priority
Major
Assignees
Not assigned
Iterations
Issue Votes (0)
Watchers (1)
Reference
KI-14
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover