Skip to main content

Overview

Attestations are cryptographically signed statements that provide verifiable claims about identities, behaviors, skills, or achievements. They serve as the building blocks of trust in the ZKScore ecosystem, enabling applications to make informed decisions based on verified information.
Think of attestations as digital certificates that prove something about a user. Like a driver’s license proves you can drive, an attestation proves you have DeFi experience, completed a course, or are a verified member of an organization.

What are Attestations?

An attestation is a structured data record that contains verifiable claims about a subject. Unlike traditional certificates, attestations are:
  • Cryptographically signed - Tamper-proof and verifiable
  • On-chain stored - Immutable and decentralized
  • Schema-based - Structured and standardized
  • Revocable - Can be invalidated if needed
  • Expirable - Can have time limits

Attestation Structure

Every attestation follows a standardized structure:

Core Fields

Types of Attestations

1. Identity Attestations

Verify personal or organizational identity information:
Use Cases:
  • KYC/AML compliance
  • Age verification
  • Geographic restrictions
  • Professional licensing
  • Organization membership

2. Behavioral Attestations

Track and verify on-chain behavior patterns:
Use Cases:
  • DeFi protocol access control
  • Risk assessment for lending
  • Trading limit determination
  • Insurance eligibility
  • Yield farming rewards

3. Skill Attestations

Certify abilities, knowledge, and expertise:
Use Cases:
  • Developer verification
  • Code audit qualifications
  • Project team assembly
  • Freelance marketplace reputation
  • Educational achievements

4. Achievement Attestations

Recognize accomplishments and milestones:
Use Cases:
  • Gamification systems
  • Community recognition
  • Airdrop eligibility
  • Special access privileges
  • Leaderboard rankings

5. Compliance Attestations

Ensure adherence to regulations and standards:
Use Cases:
  • Regulatory compliance
  • Data protection verification
  • Security audit results
  • Industry standard adherence
  • Legal requirement fulfillment

Creating Attestations

The easiest way to create attestations is through the ZKScore API:

2. Via Smart Contract

For advanced use cases, you can create attestations directly on-chain:

3. Batch Creation

Create multiple attestations efficiently:

Attestation Schemas

Schemas define the structure and validation rules for attestation data. They ensure consistency and interoperability across the ecosystem.

Schema Structure

Creating Custom Schemas

Querying Attestations

1. Get All Attestations for a User

2. Filter by Schema

3. Filter by Attester

4. Advanced Queries

Attestation Verification

1. Verify Attestation Signature

2. Check Attestation Status

3. Verify On-Chain

Revoking Attestations

Sometimes attestations need to be revoked due to errors, fraud, or changes in circumstances.

1. Revoke via API

2. Revoke via Smart Contract

3. Batch Revocation

Best Practices

1. Data Quality

  • Verify before issuing: Always verify data before creating attestations
  • Use reliable sources: Only use trusted data sources for attestations
  • Validate schemas: Ensure data conforms to schema requirements
  • Regular audits: Periodically review and validate existing attestations

2. Security

  • Secure API keys: Protect your API keys and rotate them regularly
  • Access controls: Implement proper access controls for attestation creation
  • Monitor usage: Track and monitor attestation creation patterns
  • Fraud detection: Implement systems to detect fraudulent attestations

3. User Experience

  • Clear schemas: Use descriptive field names and documentation
  • Reasonable expiration: Set appropriate expiration times
  • Transparent process: Clearly communicate the attestation process to users
  • Easy verification: Make it easy for users to verify their attestations

4. Compliance

  • Privacy by design: Minimize data collection and protect user privacy
  • Regulatory compliance: Ensure compliance with relevant regulations
  • Audit trails: Maintain comprehensive audit trails
  • Data retention: Implement appropriate data retention policies

Common Use Cases

1. DeFi Protocol Access

2. NFT Marketplace Verification

3. Community Membership

Integration Examples

React Hook for Attestations

Express.js Middleware