The Solana Attestation Service (SAS) from solana.com/developers/docs/tools/attestations, modeled in pure Lean 4 as Poc/Attestations.lean — first faithfully, then updated for dark DeFi: commitment-only on-chain records, selective disclosure, and one-show nullifier presentation.
SAS is "a public good program for associating offchain data with onchain accounts", built on three components:
Credential — an attestation authority. Each credential has authorized signers who can create attestations under it. In the model: an id, an authority, and a signer list.
Schema — a template under a credential defining the structure and validation rules: an ordered list of named, typed fields (natK / strK / boolK) plus a version.
Attestation — a verified claim about a subject account, optionally linked to a specific token account, issued by an authorized signer following a schema. issue succeeds only for an authorized signer with schema-conforming data; verify additionally checks revocation, expiry, and credential/schema linkage.
The catch the docs state plainly: SAS keeps attestation data on-chain "for transparency and permanence". For dark DeFi that is the failure mode — a KYC tier or jurisdiction claim readable by everyone, forever, is a targeting list, not a credential. Layer B is the fix.
PrivateAttestation — the on-chain record stores only a whole-record commitment sha256(recordPreimage) (record fields + encoded data + salt), the per-field hashes, and public metadata (subject, schema/credential ids, signer, expiry, revocation). There is no plaintext data field — by construction.
verifyDisclosure — selective disclosure: the holder reveals exactly one field, and anyone can check its hash against the stored per-field hash at that index. Revealing the tier does not reveal the jurisdiction.
present — nullifier one-show presentation: presenting derives nullifier = sha256(encode(recordId, holderSecret)) and succeeds only if the record is valid (unrevoked, unexpired, authorized signer), the required disclosure verifies, and the nullifier is fresh. The gate state spends the nullifier — double-presentation is impossible, and that is a theorem (present_double), not a comment.
darkGate — the composed gate for a dark pool: accept only a presentation disclosing field 0 (the tier) at value ≥ 2 — the accredited/KYC tier — with a fresh nullifier consumed.
Expiry and revocation still bite at presentation time: an expired or revoked record cannot be presented, even with a correct disclosure and a fresh nullifier.
issue_signer_mem · issue_conformsPROVEN — anything issue returns was signed by an authorized signer and carries schema-conforming data.
issue_unauthorized · issue_nonconformingPROVEN — an unauthorized signer, or non-conforming data, can never issue.
verify_sound · verify_expired_false · verify_revoked_falsePROVEN — a public verify = true means every checked fact holds; expired or revoked attestations never verify.
recordPreimage_inj · encData_inj_of_length · encVal_injPROVEN — the commitment preimage encoding is injective: equal preimages fix every record field, the full data list, and the salt bytes.
issuePrivate_signer · issuePrivate_fieldHashes · issuePrivate_fieldHash_atPROVEN — private issuance has the same authorization gate, and the stored per-field hashes are exactly the hashes of the issued data, in order, at every index.
verifyDisclosure_sound · verifyDisclosure_wrongPROVEN — a verified disclosure means the revealed value's hash byte-matches the stored hash at that index; a value whose hash differs cannot verify.
present_facts · present_double · present_expired · present_revokedPROVEN — a successful presentation means a valid record, a sound disclosure, and a fresh nullifier; presenting again against the resulting state always fails; expired or revoked records cannot be presented.
darkGate_factsPROVEN — if the dark gate accepts, there is a valid private attestation behind it whose disclosed tier is ≥ 2 (its hash is the stored hash at field 0) and a fresh nullifier was consumed.
Distinct data ⇒ distinct commitmentsASSUMPTION — follows from recordPreimage_inj plus SHA-256 collision resistance, which is assumed, not proven (the same assumption every hash-commitment scheme makes).
ZK proofs · ed25519 verification · TEE attestationNOT MODELED — disclosure reveals the one field (that is the design); signer authorization is credential membership, with signature crypto out of scope; a ZK or TEE verifier would slot in where verifyDisclosure sits, and the gate composition above it would not change.
The binary's scenario: a dark-pool access schema (tier, jurisdiction, epoch), data (tier 3, jurisdiction 840, epoch 12) issued by authorized signer 7. The private record's on-chain footprint is exactly the hashes below.