Skip to main content

Attestations

An attestation is a statement made by an attester about a subject through a registered portal and according to a registered schema.

Examples:

  • "This address passed KYC."
  • "This contract was audited."
  • "This user belongs to this organization."
  • "This attestation references that other attestation."

Payload shape​

Portals issue attestations with the AttestationPayload struct:

struct AttestationPayload {
bytes32 schemaId;
uint64 expirationDate;
bytes subject;
bytes attestationData;
}

subject is intentionally bytes, not address, so Verax can attest more than EVM accounts.

Stored attestation metadata​

When an attestation is created, AttestationRegistry stores both the payload and protocol metadata.

FieldTypeMeaning
attestationIdbytes32Unique chain-prefixed attestation identifier
schemaIdbytes32Registered schema used by the attestation
replacedBybytes32ID of the replacement attestation, if any
attesteraddressAccount recorded as issuer for this attestation
portaladdressPortal that created the attestation
attestedDateuint64Block timestamp at issuance
expirationDateuint64Expiration timestamp, or 0 for no expiry
revocationDateuint64Timestamp of revocation or replacement, if revoked
versionuint16Registry version number at issuance
revokedboolRevocation status
subjectbytesRaw subject identifier
attestationDatabytesABI-encoded payload

ID format​

Verax prefixes attestation IDs with a chain-specific prefix stored in AttestationRegistry. That makes the same numeric counter produce different IDs on different networks.

This matters for:

  • multi-chain indexing;
  • cross-chain discovery;
  • linked-data workflows that reference attestations by ID.

Creation checks​

AttestationRegistry.attest(...) rejects a new attestation when:

  • the schema is not registered;
  • the subject field is empty;
  • the attestationData field is empty;
  • the caller is not a registered portal.

Any additional issuer-specific rules are handled in the portal and its modules before the registry write happens.

Revocation and replacement​

Revocation and replacement are portal-mediated lifecycle actions.

  • revoke(attestationId) marks the existing attestation as revoked.
  • replace(attestationId, newPayload, ...) revokes the existing attestation, creates a new one, and sets replacedBy.

By default, AbstractPortalV2 restricts revoke and replace operations to the portal owner.

Reading attestations​

There are three common read paths:

  • onchain through AttestationRegistry or AttestationReader;
  • indexed reads through the subgraph;
  • typed reads through veraxSdk.attestation.

The SDK adds useful decoding and enrichment:

  • decodedPayload based on the schema string;
  • findByMultiChain(...);
  • getRelatedAttestations(...);
  • offchain payload resolution for the canonical Offchain schema.