Protocol Architecture

FirstBatch is a privacy-preserving identity protocol that integrates web2 data for attestations. It implements cryptographic tools such as zero-knowledge proofs to provide its utilities for both users and DApps.

A.I. driven attestations

Unlike other identity protocols, users won't create or receive attestations from other users or DApps. FirstBatch provides a trusted API for retrieving and analyzing web2 data (e.g. Twitter) to create attestations, as we name persona traits. This creates a unique approach for identity protocols and forms a solid base for trusted, secure segmentation in Web3.0. Attestations are issued to Persona tokens, utilizing soulbond NFTs.


FirstBatch implements semaphores as zero-knowledge gadgets to prove set memberships. This transform FirstBatch utilities into privacy-preserving ones. Semaphores allow membership proofs for large sets of identity objects named identity commitments. The significance of the semaphore protocol by appliedzkp is that it provides a generic zero-knowledge snark circuit that enables all-around use for privacy-preserving identity protocols.
More on semaphores.

Creating Identities

Semaphore identities can be produced in many ways. In our case, we need identities to be unique for each wallet, and reproducible only by the user.
Users create identities by signing a message seed, which then used to create identity_trapdoor ,identity_nullifier and a secret. Identity information is private to the user, and reproducible anytime.
Users create identities by connecting their socials. TouchID would be a good analogy in this case. Just like how every swipe of a finger increases confidence authenticating fingerprints, a user connecting multiple socials to create an identity obtains a higher rank for PoP, more detailed analysis hence more opportunities in Web3.0.
Alice and Bob creating identities with different sources
Once the user provides OAuth, FirstBatch A.I. API analyzes social data, returning the persona map and proof of personhood reputations.


Groups are sets of user identities organized as Merkle trees. Each group is used separately for membership proofs. Groups are stored both on-chain and off-chain, containing only identity commitments.

PoP as reputation

Proof of personhood, as a reputation system, consists of ranks. FirstBatch ranks PoP in 5 levels and each rank forms a group.
FirstBatch offers a detailed analysis of user profiles to provide an instant, effective proof of personhood score. For users connecting multiple sources, each source is evaluated separately and the maximum is set as the rank.
If the user provides both Twitter and Reddit OAuth, rank is calculated accordingly. This is applied if and only if the rank difference is less than two between different sources.
The ranking is calculated with the same approach, but with a different set of parameters for each source. FirstBatch asks the questions
  • How organic is the user profile?
  • In terms of interests, how diverse is the user profile?
To determine the ranking of a user profile. Just like the probability of a profile being a bot account, the persona/interest diversity of that profile is essential for ranking PoP. A rank 5 reputation represents a multi-interest, organic account owned by a real person.

Persona Traits

As explained in previous chapters, FirstBatch offers proveable persona traits and interests. Just like PoP, each persona trait is represented as a group. Persona attestations are issued by FirstBatch A.I. solely based on profile analysis.


FirstBatch users can mint a free Persona token and utilize it through Web3.0 space with multiple utilities, claiming airdrops, joining events, and more.
The Persona token is a token to test both soulbond and ownership of the token by the wallet owner. Persona NFTs do not reveal or hold any information publicly available on-chain.


Users register to FirstBatch by connecting socials and minting Persona NFTs. On the client-side, users create their identities to create identity commitments. Publicly shareable keys belonging to users.
While minting, and analyzing social profiles, a session_id is issued to temporarily store the persona map without using any id linkable to the wallet. The user sends the id commitment to FirstBatch API along with its session id. Once identity commitment is transferred to FirstBatch, API adds identity commitments to group ids based on the social persona in an aggregated fashion.
Data Flow For Registering
Only data stored off-chain is identity commitments as groups. A registering user creates an identity on the front-end, completely owning their identity information. Identity commitments generated from their identity are transferred off-chain.
FirstBatch infrastructure updates on-chain Merkle roots regularly with new members joined to interest groups. This keeps the system up-to-date while reducing gas costs significantly.

Proving Persona

Users can prove membership to traits and reputations to DApps or other users using zero-knowledge proofs. This allows full anonymity preventing any links between wallet and identity commitment.
For any given time, the proving mechanism works as follows:
  • Reproduce identity client side
  • Create a Merkle proof for the requested group
    • Proofs generating endpoints are authenticated persona token ownership and signature verification.
  • Generate zero-knowledge proof with witness
-> Proofs are verified on-chain, with FirstBatch contracts.

External Nullifiers

FirstBatch utilizes external nullifiers, which prevent double-signaling for each group individually, to prevent double-proving of the tuple (id_commitment, group, verifier). Verifiers are DApps and parties that request proofs of membership.

Proofs for DApps

FirstBatch allows two methods for use of proofs on smart contracts for external parties. The first one is by implementing a re-direct modal, where the user authenticates and creates proofs with a white label FirstBatch platform and which [nullifier_hash, proof, wallet_id] is transferred to the verifier. Off-chain session ids are maintained redirect pipeline. DApp interacts with FirstBatch contracts to verify proof.
The second method is a pure contract-based method where a user sends proof to the contract and after verifying proof, the FirstBatch contract interacts with DApps contracts to change states in EVM on-behalf of the user. This requires an implementation of a medium contract between FirstBatch and DApps therefore harder to complete.


FirstBatch utilizes off-chain databases and volatile data structures to maintain session ids, Merkle proof generation, and other utilities for platform users. The only information stored off-chain is the identity commitments of users. Since identity commitments are public keys, problems such as leakage pose no threat to anonymity.
group_1 : [id_commitment_1, id_commitment_2, ... id_commitment_n]
Off-chain data also makes aggregated statistics on segmentation possible without compromising security and anonymity.

Privacy-preserving Airdrops

Event-specific airdrop links are generated with FirstBatch API, to provide a gateway for users to mint Persona NFT and join the airdrop event.
FirstBatch airdrop is a white label pipeline for collecting participants and performing airdrops for desired segmentations and PoP ranks.
Aggregated statistics for airdrop participants

White label

DApps can create links for directing participants to a one-click minting page (if not already) and allow users to participate in the airdrop. FirstBatch offers branding and customization for DApps to provide a "native" feeling to the community of DApp.

Free minting

Minting Persona token is free. Transactions are executed through a relayer. This removes the obligation for users to own native tokens (e.g. MATIC) therefore significantly improving UX.

Aggregated Anonymous Statistics

As participants join airdrop, FirstBatch provides a dashboard to DApp admins, displaying aggregated statistics on segmentation and proof of personhood ranks.

Determining Airdrop Requirements

Once the participation link is revoked, FirstBatch will halt the gathering process. This allows DApps to create airdrop requirements based on aggregated statistics. After halting, a DApp can determine requirements via the FirstBatch dashboard, even multiple requirements are allowed.
[F1 Fans, Developers, Rank 3 and above]
FirstBatch also offers the ability to set standard requirements such as holding fungible or non-fungible tokens.

Gasless Minting

We're integrating a transaction relayer infrastructure to FirstBatch to provide gasless minting. This is enabled by meta-transactions through gas station networks. The reason why is straightforward, we aim for zero friction on the user-end and increase adoption. We're implementing: the EIP2771 Secure Protocol for Native Meta Transactions to build a meta transaction interface for FirstBatch contracts. Users will be able to mint PNFTs without owning MATIC(for polygon) or ETH.