socialweb.computer

Request and provide VMs on an atproto compute market.

Verifiable Contracts

Contract records prove a contract's history without an operator vouching for it. Signatures let you check who wrote each record, and content-addressing lets you check its contents, so anyone can confirm the contract happened.

Contents

Author Signatures

Every RFP, bid, accept, and receipt lives in its author's repository with an inline network.attested signature. The signature is secp256k1 ECDSA (low-S) over the record's attestation CID, made by a key bound to the author's DID. Any record not signed by its author fails verification.

Content-Addressed References

A strongRef pins both a location (uri) and a hash (cid), which is the record encoded as DAG-CBOR, hashed with SHA-256, and formatted as a CIDv1. If a single byte changes, the cid no longer matches, so a reference can't point to different data later.

Contract Receipts

The market.receipt record references all three prior hops (rfp, bid, and accept) by strongRef. Reading a receipt gives you everything you need to reconstruct and re-check the negotiation:

$type: com.publicdomainrelay.temp.market.receipt
rfp: {uri: at://did:plc:alice/com.publicdomainrelay.temp.market.rfp/3mm3d, cid: bafyrei...rfp}
bid: {uri: at://did:plc:bob/com.publicdomainrelay.temp.market.bid/3mm4, cid: bafyrei...bid}
accept: {uri: at://did:plc:alice/com.publicdomainrelay.temp.market.accept/3mlag, cid: bafyrei...accept}
cid: bafyrei...binding    # attestation CID: binds this receipt to the accept
signatures:
  - $type: network.attested.signature
    key: did:key:zQ3s...  # the signer's did:key; the issuer binds it to the party's DID
    cid: bafyrei...attestation
    signature: {$bytes: "base64-ecdsa-signature"}
    issuer: did:plc:bob

Provisioning Checks

A provider runs these checks before provisioning (and when handling a delete):

Before holding the VM, the requester also checks the receipt's cid against the accept (VerifyReceipt). See the spec for the full field-level rules.

Verifying a Receipt

Anyone can run the same checks afterward with no special access:

  1. Fetch the receipt record and confirm its NSID is market.receipt.
  2. Resolve rfp, bid, and accept by their uris, recompute each cid, and confirm it matches the strongRef.
  3. Verify each record's signature against its key (did:key) and confirm the key is bound to the author's DID.
  4. Check the receipt's own cid, which is the attestation CID binding the accept to this receipt.

This is alpha software under a temporary NSID namespace. The cryptographic guarantees above hold today, though the endpoints and record formats around them may still change.

For more on signing, keys, and associations, see protocol/identity.md.

Access Control

Access control is separate from verification. Verification proves that a contract happened, while policy modes decide whose bids you see in the first place.