メインコンテンツまでスキップ

BioAnchorRegistry

BioAnchorRegistry is a Smart Contract for storing Poseidon commitments that bind a did:bio Decentralized Identifier to a user's genomic identity profile on the blockchain.

注記

BioAnchorRegistry is an optional extension of the BIA system. Users who want self-sovereign identity anchoring can register a commitment on the blockchain. For those who prefer a lighter approach, the OIDC Provider can be used without blockchain.

Key Features

FeatureDetails
One Anchor Per AddressEach Ethereum address can register only one genomic commitment, creating a 1:1 binding between a wallet and a genome
Sybil ResistanceUses commitmentOwner reverse mapping to prevent the same commitment from being registered by two addresses. Since each genome produces a unique Poseidon hash, this prevents a single person from creating multiple identities
Assurance Levels (0-3)Specifies the trust level of genomic data verification. Trusted attesters can upgrade the level after laboratory verification
RevocationUsers can revoke their own anchor, for example in the case of genomic data compromise. After revocation, a new commitment can be registered

Data Structures

BioAnchorRecord

struct BioAnchorRecord {
bytes32 commitment; // Poseidon hash of (salt || snpVector || hlaVector || mtDNA)
uint8 assuranceLevel; // Assurance level (0=none, 1=self, 2=lab, 3=multi)
uint256 registeredAt; // Block timestamp of registration
bool active; // Active status (false after revocation)
}

State Mappings

// Binds wallet address to bio-anchor record (1 anchor per 1 address)
mapping(address => BioAnchorRecord) public anchors;

// Reverse mapping from commitment hash back to owner address (Sybil prevention)
mapping(bytes32 => address) public commitmentOwner;

// Set of addresses authorized to upgrade assurance level
mapping(address => bool) public trustedAttesters;

Assurance Levels

LevelNameDescriptionExample
0NoneNo verificationCommitment registered without evidence
1Self-AttestedUser uploads VCF themselvesUser submits VCF file from a sequencing service
2Lab-VerifiedLaboratory verifies that VCF matches commitmentTrusted attester confirms results
3Multi-SourceTwo independent laboratories confirm the dataTwo sequencing sources produce matching results

Typical upgrade path: 0 -> 1 (user uploads VCF) -> 1 -> 2 (lab confirms) -> 2 -> 3 (second lab confirms)

Core Functions

Interface: Core Functions

contract BioAnchorRegistry {

// ──── Events ────
event AnchorRegistered(
address indexed account, bytes32 commitment,
uint8 assuranceLevel, uint256 timestamp
);
event AssuranceUpgraded(
address indexed account, uint8 oldLevel,
uint8 newLevel, address indexed attester
);
event AnchorRevoked(
address indexed account, bytes32 commitment, uint256 timestamp
);

// ──── Core Functions ────
function registerAnchor(bytes32 commitment, uint8 assuranceLevel) external;
function upgradeAssurance(address account, uint8 newLevel) external; // onlyAttester
function revokeAnchor() external;

// ──── View Functions ────
function verifyAnchor(address account) external view
returns (bool exists, bytes32 commitment, uint8 assuranceLevel, bool active);
function getCommitmentOwner(bytes32 commitment) external view returns (address owner);
function isAttester(address attester) external view returns (bool isTrusted);

// ──── Admin Functions ────
function addAttester(address attester) external; // onlyAdmin
function removeAttester(address attester) external; // onlyAdmin
function transferAdmin(address newAdmin) external; // onlyAdmin
}

registerAnchor : Registers a genomic commitment as a biological identity anchor. The commitment is a Poseidon hash computed from Poseidon(salt, snpVector, hlaVector, mtDNA). The salt is stored only in the user's sovereign wallet and is never sent to the blockchain.

upgradeAssurance : Upgrades the assurance level of an existing anchor. Can only be called by trusted attesters (e.g., sequencing laboratories). The new level must always be higher than the current level.

revokeAnchor : Revokes one's own bio-anchor. Used in cases where genomic data has been compromised, or when re-registration with a new commitment (new salt) is desired. After revocation, the reverse mapping is deleted, allowing re-registration.

verifyAnchor : The primary view function for checking an account's bio-anchor. The OIDC Provider uses this function when a relying party requests authentication for a did:bio:ever:0x... subject.

getCommitmentOwner : Looks up the address that owns a commitment. Returns address(0) if the commitment is not registered or has been revoked.

BIA Registration & Verification Flow
VCF File
Genomic data
SNP Panel
128 markers
Poseidon Hash
Zero-knowledge
BioAnchorRegistry
On-chain
Bio-OIDC Provider
1. Verify anchor exists & is active
2. Check commitment matches server-side
3. Confirm assurance level meets RP requirements
Issues id_token
Relying Party
Your application receives a JWT with bio claims:
sub: did:bio:ever:0x...
bio_assurance_level: 2
bio_liveness_active: true
Level 0: NoneLevel 1: Self-AttestedLevel 2: Lab-VerifiedLevel 3: Multi-Source
Biological Identity Attestation — VCF to OIDC token

OIDC Integration

When a relying party sends an authentication request for a did:bio:ever:0x... subject to the OIDC Provider, the system performs the following checks:

  1. Reads verifyAnchor() to verify that the anchor exists and is active
  2. Checks that the commitment matches the value stored server-side
  3. Verifies that the assurance level meets the relying party's requirements

For more details about the OIDC flow, see BIA Architecture.

Estimated Gas Costs

Actual costs depend on the network used.

OperationGas (estimated)
registerAnchor~65,000
upgradeAssurance~30,000
revokeAnchor~35,000
verifyAnchor0 (view function)

See Also