BioWallet

ERC-4337 Smart Wallet with WebAuthn Passkeys and DNA Social Recovery

Daniel Uribe

GenoBank.io — Sequentia Blockchain Network

April 2026

Version 1.0

Abstract

BioWallet is a self-custodial smart contract wallet purpose-built for biodata ownership on the Sequentia Blockchain. It combines ERC-4337 Account Abstraction for gasless, bundler-relayed transactions with WebAuthn/FIDO2 Passkey authentication (P-256 / secp256r1) so that patients sign every operation with FaceID, TouchID, or a hardware security key—never a seed phrase. For wallet recovery, BioWallet introduces the world's first DNA social recovery guardian: a 96-SNP genetic attestation via the on-chain BioRecovery contract that rotates the wallet's signing key after verifying a biological match (≥94/96 SNPs) and a 48-hour timelock. The wallet custodies BioNFTs (ERC-721) and BioAssetVault tokens (ERC-1155) directly, enabling patients to hold their genomic data ownership tokens in the same wallet that authenticates their identity. Deployed via a CREATE2 deterministic factory, BioWallet addresses are predictable before deployment, enabling counterfactual wallet creation in the ERC-4337 initCode flow. A companion BioPaymaster sponsors all gas on the private Sequentia chain, removing the last friction barrier between patients and sovereign biodata ownership.

Keywords: ERC-4337, Account Abstraction, WebAuthn, FIDO2, Passkeys, P-256, DNA Recovery, Social Recovery, BioNFT, Smart Wallet, Sequentia, BioRecovery, SNP Attestation

Table of Contents

  1. The Problem: Why Wallets Fail in Healthcare
  2. The Solution: BioWallet Architecture
  3. Passkey Authentication (P-256 / WebAuthn)
  4. DNA Social Recovery Guardian
  5. ERC-4337 Account Abstraction on Sequentia
  6. Deterministic Factory and Counterfactual Wallets
  7. Token Custody: BioNFTs and BioAssetVault
  8. Smart Contract Specifications
  9. Security Model
  10. Patent Alignment
  11. Future Work
  12. References

1. The Problem: Why Wallets Fail in Healthcare

Blockchain-based biodata systems promise patients true ownership of their genomic information. Yet the foundational tool of that ownership—the cryptocurrency wallet—was designed for financially-literate early adopters, not patients recovering from chemotherapy or elderly individuals managing a rare disease diagnosis.

1.1 The Seed Phrase Catastrophe

Every externally-owned account (EOA) in Ethereum depends on a 256-bit private key, typically surfaced as a 12- or 24-word mnemonic seed phrase. In the context of healthcare:

1.2 The Healthcare UX Gap

graph LR subgraph "Traditional EOA Flow" A["Patient receives
BioNFT"] --> B["Needs ETH
for gas"] B --> C["Must backup
seed phrase"] C --> D["Signs with
secp256k1"] D --> E["Loses phone?
Loses everything"] end style A fill:#ffcccc,stroke:#cc0000,color:#000000 style B fill:#ffcccc,stroke:#cc0000,color:#000000 style C fill:#ffcccc,stroke:#cc0000,color:#000000 style D fill:#ffcccc,stroke:#cc0000,color:#000000 style E fill:#ff9999,stroke:#cc0000,color:#000000

Figure 1. The EOA anti-pattern in healthcare: every step introduces a failure mode that is unacceptable for patient-critical data.

graph LR subgraph "BioWallet Flow" A2["Patient receives
BioNFT"] --> B2["Gas sponsored
by BioPaymaster"] B2 --> C2["Signs with
FaceID / TouchID"] C2 --> D2["Loses phone?
DNA Recovery"] end style A2 fill:#ccffcc,stroke:#008800,color:#000000 style B2 fill:#ccffcc,stroke:#008800,color:#000000 style C2 fill:#ccffcc,stroke:#008800,color:#000000 style D2 fill:#ccffcc,stroke:#008800,color:#000000

Figure 2. BioWallet eliminates every failure mode: gas is sponsored, authentication uses device biometrics, and recovery uses biological identity.

2. The Solution: BioWallet Architecture

BioWallet is built on four pillars:

Pillar Standard Implementation
Authentication WebAuthn / FIDO2 P-256 ECDSA via OpenZeppelin SignerP256 with RIP-7212 precompile fallback
Account Abstraction ERC-4337 OpenZeppelin Account base, custom SequentiaEntryPoint
Recovery 96-SNP DNA Attestation BioRecovery contract (US Patent 11,915,808), 48hr timelock, ≥94/96 threshold
Gas Sponsorship ERC-4337 Paymaster BioPaymaster sponsors all UserOps on Sequentia (gas is free on private chain)

2.1 System Architecture

graph TB subgraph "Client Layer" USER["Patient / Researcher"] PASSKEY["Device Secure Enclave
(FaceID / TouchID / YubiKey)"] USER --> PASSKEY end subgraph "Bundler Layer" BUNDLER["Bundler / Relayer
(submits UserOps)"] end subgraph "Sequentia Blockchain (Chain 15132025)" EP["SequentiaEntryPoint
(validates + executes UserOps)"] BW["BioWallet
(P-256 signer + ERC-7821)"] PM["BioPaymaster
(sponsors gas)"] BR["BioRecovery
(96-SNP DNA guardian)"] VAULT["BioAssetVault
(ERC-1155 biodata)"] NFT["BioNFT
(ERC-721 consent)"] end subgraph "Factory Layer" FACTORY["BioWalletFactory
(CREATE2 deterministic)"] end PASSKEY -->|"signs UserOp
(P-256)"| BUNDLER BUNDLER -->|"handleOps()"| EP EP -->|"validateUserOp()"| BW EP -->|"validatePaymasterUserOp()"| PM EP -->|"execute callData"| BW BW -->|"holds"| VAULT BW -->|"holds"| NFT BR -->|"authorizes
signer rotation"| BW FACTORY -->|"CREATE2
deploy"| BW style USER fill:#667eea,stroke:#4c51bf,color:#000000 style PASSKEY fill:#b4c6fc,stroke:#4c51bf,color:#000000 style BUNDLER fill:#fef5e7,stroke:#cbd5e0,color:#000000 style EP fill:#667eea,stroke:#4c51bf,color:#000000 style BW fill:#48bb78,stroke:#2f855a,color:#000000 style PM fill:#b4c6fc,stroke:#4c51bf,color:#000000 style BR fill:#fc8181,stroke:#c53030,color:#000000 style VAULT fill:#faf089,stroke:#d69e2e,color:#000000 style NFT fill:#faf089,stroke:#d69e2e,color:#000000 style FACTORY fill:#b4c6fc,stroke:#4c51bf,color:#000000

Figure 3. BioWallet system architecture on Sequentia. The patient's device Secure Enclave signs UserOps with P-256; the Bundler relays them to the EntryPoint; the Paymaster covers gas; BioRecovery stands as the DNA guardian.

3. Passkey Authentication (P-256 / WebAuthn)

BioWallet authenticates every transaction with a WebAuthn Passkey—the same FIDO2 credential that unlocks your phone and laptop. The signing key never leaves the device's Secure Enclave (Apple T2/M-series, Android StrongBox, YubiKey 5). There is no seed phrase, no browser extension, no mnemonic to back up.

3.1 Why P-256 Instead of secp256k1

Property secp256k1 (EOA) P-256 (BioWallet)
Hardware support None (software only) Every Secure Enclave, every YubiKey, every HSM
Browser standard No WebAuthn / FIDO2 (W3C Recommendation)
Key storage Software (browser, file, paper) Hardware-bound, non-exportable
Phishing resistance None Origin-bound by WebAuthn spec
EVM verification Native ecrecover RIP-7212 precompile or OpenZeppelin P256.sol fallback
User experience "Copy this 24-word phrase" FaceID / TouchID / tap YubiKey

3.2 Signature Flow

sequenceDiagram participant Patient participant Device as Device Secure Enclave participant DApp as BioWallet DApp participant Bundler participant EP as SequentiaEntryPoint participant BW as BioWallet Contract Patient->>DApp: Initiate action (e.g., grant consent) DApp->>DApp: Build UserOp (callData, nonce, gas limits) DApp->>EP: getUserOpHash(userOp) EP-->>DApp: opHash (bytes32) DApp->>Device: navigator.credentials.get(opHash) Device->>Patient: FaceID / TouchID prompt Patient-->>Device: Biometric confirmation Device-->>DApp: P-256 signature (r, s) over opHash DApp->>Bundler: Submit signed UserOp Bundler->>EP: handleOps([userOp], beneficiary) EP->>BW: validateUserOp(userOp, opHash, missingFunds) BW->>BW: SignerP256._rawSignatureValidation(opHash, sig) BW-->>EP: validationData = 0 (success) EP->>BW: execute(target, value, data) BW-->>EP: Execution result

Figure 4. End-to-end Passkey authentication flow. The patient's biometric confirmation on-device produces a P-256 signature that the smart contract verifies on-chain via RIP-7212 or the pure-Solidity fallback verifier.

3.3 RIP-7212 Precompile with Graceful Fallback

OpenZeppelin's SignerP256 (v5.6) automatically attempts the RIP-7212 precompile at address 0x100 for P-256 verification. If the precompile is not deployed (as on Sequentia today), it falls back to a pure-Solidity P256.sol implementation that verifies the signature using modular arithmetic on the P-256 curve. This dual-path design means BioWallet works on any EVM chain today and will automatically benefit from native precompile speed once RIP-7212 is adopted.

Implementation detail: The P-256 public key is stored as two bytes32 values (qx, qy) in the contract's immutable storage. The signature is a compact 64-byte r || s encoding (no recovery byte needed, since the public key is known). Low-S normalization is enforced to prevent signature malleability.

4. DNA Social Recovery Guardian

Traditional smart wallet recovery relies on a set of human guardians (friends, family, institutional custodians) who can collectively authorize a signer rotation. BioWallet introduces a fundamentally different paradigm: your DNA is your guardian.

4.1 The BioRecovery Contract

BioRecovery is an independently-deployed contract on Sequentia (address 0x1555eC4e6397645147595918657b713Ebb5c8fBD) that implements 96-SNP DNA attestation as described in US Patent 11,915,808 ("Privacy-Preserving DNA/RNA/Microbiome/COVID-19 Test Kit Kiosk and Locker That Pairs To and Stores Results Data in Private Digital Wallet," Uribe 2024).

The recovery process works as follows:

  1. Sample submission: The wallet owner provides a biological sample (saliva, buccal swab) to an authorized origin lab registered in GenoBank's LabNFT registry.
  2. 96-SNP genotyping: The lab genotypes 96 pre-selected single nucleotide polymorphisms (SNPs) from the sample.
  3. On-chain attestation: The lab calls BioRecovery.attest(requestId, snpFingerprint, targetWallet, matchCount) with the number of matching SNPs (out of 96).
  4. Timelock activation: A 48-hour timelock begins. During this window, the wallet owner (or their legal representative) can challenge the recovery if they suspect unauthorized access.
  5. Signer rotation: After the timelock expires, anyone can call BioWallet.executeSignerRecovery(requestId, newQx, newQy) to install a new Passkey as the wallet's signing key.

4.2 Recovery Flow

sequenceDiagram participant Owner as Wallet Owner participant Lab as Origin Lab (LabNFT) participant BR as BioRecovery Contract participant BW as BioWallet Contract participant NewDevice as New Device Owner->>Lab: Submit biological sample Lab->>Lab: Genotype 96 SNPs Lab->>BR: attest(requestId, snpFingerprint, walletAddr, 95/96) Note over BR: Status = ATTESTED Note over BR: 48-hour timelock begins rect rgb(255, 248, 220) Note over BR: Timelock window (48 hours) Owner-->>BR: [Optional] Challenge if unauthorized end Note over BR: Timelock expires NewDevice->>NewDevice: Generate new P-256 Passkey (newQx, newQy) NewDevice->>BW: executeSignerRecovery(requestId, newQx, newQy) BW->>BR: recoveryRequests(requestId) BR-->>BW: status=ATTESTED, wallet=this, matchCount=95 BW->>BW: Verify: status OK, wallet matches, 95 >= 94 threshold BW->>BW: Verify: block.timestamp > requestedAt + 48h BW->>BW: _setSigner(newQx, newQy) Note over BW: Old Passkey REVOKED Note over BW: New Passkey ACTIVE NewDevice->>BW: Sign transactions with new Passkey

Figure 5. DNA social recovery flow. The patient's biological sample is the recovery factor, genotyped by a trusted lab. A 48-hour timelock provides a challenge window before the signer rotation completes.

4.3 Recovery Safeguards

Safeguard Mechanism Rationale
Biological threshold ≥94 of 96 SNPs must match Prevents recovery by relatives (parent-child share ~48/96). Threshold is configurable per-deployment.
48-hour timelock block.timestamp >= requestedAt + RECOVERY_TIMELOCK Gives the true owner time to detect and challenge an unauthorized recovery attempt.
Replay protection usedRecoveryRequests[requestId] = true Each recovery attestation can only be used once. A second recovery requires a new sample and attestation.
Wallet binding newWallet == address(this) An attestation for wallet A cannot be replayed against wallet B.
Lab authorization Only registered LabNFT holders can attest Prevents arbitrary parties from submitting attestations.

Why not guardians? Traditional social recovery requires the wallet owner to pre-select trusted humans and maintain those relationships over time. In healthcare, patients may be incapacitated, their trusted contacts may change, and institutional guardians introduce custody risks. DNA is immutable, unforgeable (at current technology levels), and inherently bound to the individual. The patient's body is the guardian.

5. ERC-4337 Account Abstraction on Sequentia

ERC-4337 separates the account (a smart contract that validates and executes operations) from the signer (the cryptographic key that authorizes those operations). This separation is what allows BioWallet to use P-256 instead of secp256k1, sponsor gas via a paymaster, and support signer rotation without changing the wallet address.

5.1 The UserOp Lifecycle

graph TB subgraph "1. Construction" A["DApp builds UserOp struct:
sender, nonce, callData,
gas limits, paymasterAndData"] end subgraph "2. Signing" B["EntryPoint.getUserOpHash()"] C["Device signs opHash
with P-256 Passkey"] end subgraph "3. Submission" D["Bundler receives
signed UserOp"] end subgraph "4. On-Chain Execution" E["EntryPoint.handleOps()"] F{"initCode
present?"} G["Deploy wallet
via Factory"] H["BioWallet.validateUserOp()
(P-256 verify)"] I["BioPaymaster.validatePaymasterUserOp()
(auto-approve)"] J["BioWallet.execute()
or executeBatch()"] K["Nonce incremented"] end A --> B B --> C C --> D D --> E E --> F F -->|Yes| G F -->|No| H G --> H H --> I I --> J J --> K style A fill:#b4c6fc,stroke:#4c51bf,color:#000000 style B fill:#b4c6fc,stroke:#4c51bf,color:#000000 style C fill:#b4c6fc,stroke:#4c51bf,color:#000000 style D fill:#fef5e7,stroke:#cbd5e0,color:#000000 style E fill:#667eea,stroke:#4c51bf,color:#000000 style F fill:#ffffff,stroke:#4c51bf,color:#000000 style G fill:#48bb78,stroke:#2f855a,color:#000000 style H fill:#48bb78,stroke:#2f855a,color:#000000 style I fill:#faf089,stroke:#d69e2e,color:#000000 style J fill:#48bb78,stroke:#2f855a,color:#000000 style K fill:#667eea,stroke:#4c51bf,color:#000000

Figure 6. The ERC-4337 UserOp lifecycle on Sequentia. Steps 1–3 happen off-chain; step 4 is a single atomic on-chain transaction executed by the EntryPoint.

5.2 Sequentia EntryPoint

Sequentia is a private EVM chain (Cosmos SDK + CometBFT, chain ID 15132025) with a single validator. The canonical ERC-4337 EntryPoint (v0.6/v0.7) was designed for public, adversarial networks with complex reputation systems and aggregator support. BioWallet deploys a minimal SequentiaEntryPoint that implements the full IEntryPoint interface but omits:

What is implemented is the critical path: nonce management, validateUserOp dispatch, paymaster validation, callData execution, and the getUserOpHash computation that binds UserOps to the EntryPoint address and chain ID (preventing cross-chain replay).

5.3 BioPaymaster: Gasless Transactions

On a private chain where gas is essentially free, the paymaster's role is to remove the UX friction of requiring patients to hold native tokens. BioPaymaster auto-approves all UserOps and maintains a SEQ deposit at the EntryPoint that covers gas for every transaction. The deployer funds the paymaster at deploy time (default: 100 SEQ), and the owner can top up or withdraw at any time.

Production consideration: On a public chain deployment, the BioPaymaster would be extended with rate limiting, allowlisting (e.g., only wallets created by BioWalletFactory), and a stake/unstake mechanism. The current implementation is deliberately minimal for the Sequentia private chain context.

6. Deterministic Factory and Counterfactual Wallets

BioWalletFactory deploys new BioWallet instances via Solidity's CREATE2 opcode, making the wallet address deterministically computable from four inputs:

  1. qx — the P-256 public key X coordinate (from Passkey registration)
  2. qy — the P-256 public key Y coordinate
  3. biosampleSerial — the biosample ID bound to this wallet for BioRecovery
  4. salt — a deployer-chosen value for address uniqueness

6.1 CREATE2 Address Derivation

address = keccak256( 0xff, factory_address, salt, keccak256( BioWallet.creationCode || abi.encode(entryPoint, qx, qy, bioRecovery, biosampleSerial) ) )[12:]

This allows the wallet address to be computed before the wallet is deployed. The ERC-4337 flow exploits this: a UserOp can include initCode that tells the EntryPoint to deploy the wallet on its first operation. The patient gets a wallet address immediately at Passkey registration time, can receive BioNFTs and tokens at that address, and the wallet contract is only deployed when the first transaction is actually sent.

6.2 Counterfactual Wallet Creation

sequenceDiagram participant Patient participant DApp participant Factory as BioWalletFactory participant EP as EntryPoint Patient->>DApp: Register Passkey (generates qx, qy) DApp->>Factory: computeAddress(qx, qy, biosampleSerial, salt) Factory-->>DApp: 0xABC...123 (predicted address) Note over DApp: Address is known, wallet NOT yet deployed Note over DApp: Patient can receive BioNFTs at 0xABC...123 Patient->>DApp: First transaction (e.g., grant consent) DApp->>DApp: Build UserOp with initCode = Factory.createWallet(...) DApp->>EP: handleOps([userOp]) EP->>Factory: createWallet(qx, qy, biosampleSerial, salt) Factory-->>EP: Deployed at 0xABC...123 (matches prediction) EP->>EP: validateUserOp + execute

Figure 7. Counterfactual wallet creation. The address is predictable before deployment; the wallet materializes on-chain only when the patient sends their first transaction.

7. Token Custody: BioNFTs and BioAssetVault

BioWallet implements both ERC1155Holder and ERC721Holder (via IERC721Receiver), enabling it to directly custody:

The wallet reports correct ERC-165 interface support for IERC1155Receiver (0x4e2312e0), IERC721Receiver (0x150b7a02), and IERC165 (0x01ffc9a7), ensuring that safeTransferFrom calls from both token standards succeed.

7.1 Batch Execution

BioWallet supports batched execution via executeBatch(address[], uint256[], bytes[]), allowing a single UserOp to perform multiple operations atomically. This is critical for biodata workflows where a patient might simultaneously:

All three operations execute in a single on-chain transaction, with a single Passkey signature, and zero gas cost to the patient.

8. Smart Contract Specifications

8.1 Contract Inventory

Contract Type Inherits Purpose
BioWallet ERC-4337 Account Account, SignerP256, ERC7821, ERC1155Holder, ERC721Holder Patient smart wallet with P-256 auth + DNA recovery
BioWalletFactory Factory CREATE2 deterministic deployer with address prediction
BioPaymaster ERC-4337 Paymaster Ownable Gas sponsor for Sequentia (auto-approves all UserOps)
SequentiaEntryPoint ERC-4337 EntryPoint IEntryPoint Minimal EntryPoint for private chain (no aggregators/reputation)

8.2 Inheritance Hierarchy

graph BT BW["BioWallet"] ACC["Account (OZ)"] SP256["SignerP256 (OZ)"] E7821["ERC7821 (OZ)"] E1155H["ERC1155Holder (OZ)"] E721H["ERC721Holder"] AS["AbstractSigner (OZ)"] IE4337["IEntryPoint (ERC-4337)"] IBR["IBioRecovery_Wallet"] BW --> ACC BW --> SP256 BW --> E7821 BW --> E1155H BW --> E721H ACC --> AS SP256 --> AS ACC -.->|"reads"| IE4337 BW -.->|"reads"| IBR style BW fill:#48bb78,stroke:#2f855a,color:#000000 style ACC fill:#667eea,stroke:#4c51bf,color:#000000 style SP256 fill:#667eea,stroke:#4c51bf,color:#000000 style E7821 fill:#667eea,stroke:#4c51bf,color:#000000 style E1155H fill:#667eea,stroke:#4c51bf,color:#000000 style E721H fill:#667eea,stroke:#4c51bf,color:#000000 style AS fill:#b4c6fc,stroke:#4c51bf,color:#000000 style IE4337 fill:#faf089,stroke:#d69e2e,color:#000000 style IBR fill:#fc8181,stroke:#c53030,color:#000000

Figure 8. BioWallet inheritance hierarchy. Green = BioWallet. Blue = OpenZeppelin v5.6 primitives. Yellow = ERC-4337 interface. Red = BioRecovery interface.

8.3 BioWallet Interface

// Core execution
function execute(address target, uint256 value, bytes calldata data)
    external onlyEntryPointOrSelf returns (bytes memory);
function executeBatch(address[] targets, uint256[] values, bytes[] datas)
    external onlyEntryPointOrSelf;

// ERC-4337
function entryPoint() public view returns (IEntryPoint);
function validateUserOp(PackedUserOperation, bytes32, uint256)
    external returns (uint256 validationData);

// Recovery
function executeSignerRecovery(bytes32 requestId, bytes32 newQx, bytes32 newQy)
    external;

// State
function biosampleSerial() external view returns (uint256);
function signer() external view returns (bytes32 qx, bytes32 qy);
function usedRecoveryRequests(bytes32) external view returns (bool);
function bioRecovery() external view returns (IBioRecovery_Wallet);

8.4 BioWalletFactory Interface

function createWallet(bytes32 qx, bytes32 qy, uint256 biosampleSerial, bytes32 salt)
    external returns (BioWallet wallet);
function computeAddress(bytes32 qx, bytes32 qy, uint256 biosampleSerial, bytes32 salt)
    external view returns (address);

function entryPoint() external view returns (address);
function bioRecovery() external view returns (address);
function isWallet(address) external view returns (bool);

8.5 SequentiaEntryPoint Key Functions

function handleOps(PackedUserOperation[] calldata ops, address payable beneficiary)
    external;
function getUserOpHash(PackedUserOperation calldata userOp)
    external view returns (bytes32);
function getNonce(address sender, uint192 key)
    external view returns (uint256);
function balanceOf(address account)
    external view returns (uint256);
function depositTo(address account) external payable;

8.6 Events

Contract Event Parameters
BioWallet SignerRotated recoveryRequestId (indexed), newQx, newQy
BioWallet Executed target (indexed), value, data
BioWalletFactory WalletCreated wallet (indexed), qx, qy, biosampleSerial (indexed)
SequentiaEntryPoint UserOperationEvent userOpHash (indexed), sender (indexed), paymaster (indexed), nonce, success, actualGasCost, actualGasUsed

8.7 Custom Errors

Error Contract Condition
RecoveryAlreadyUsed BioWallet Recovery request ID has already been consumed
RecoveryNotAttested BioWallet BioRecovery status is not ATTESTED or EXECUTED
RecoveryWrongWallet BioWallet Attestation targets a different wallet address
RecoveryBelowThreshold BioWallet SNP match count below the required threshold (<94/96)
RecoveryTimelockActive BioWallet 48-hour timelock has not yet expired
AccountUnauthorized BioWallet (inherited) Caller is not the EntryPoint or the wallet itself
FailedOp SequentiaEntryPoint UserOp validation failed (bad signature, bad nonce)

9. Security Model

9.1 Threat Model

graph TB subgraph "Threat: Device Compromise" T1["Attacker steals phone"] M1["Passkey is hardware-bound,
non-exportable.
Secure Enclave requires
biometric to sign."] end subgraph "Threat: Passkey Loss" T2["Device destroyed,
Passkey lost"] M2["DNA Recovery:
96-SNP attestation
+ 48hr timelock
installs new Passkey"] end subgraph "Threat: Unauthorized Recovery" T3["Attacker submits
fake DNA sample"] M3["Must match >= 94/96 SNPs.
Only authorized labs can attest.
48hr challenge window."] end subgraph "Threat: Signature Replay" T4["Replay signed UserOp
on another chain"] M4["UserOpHash includes
EntryPoint address +
chain ID. Nonce
prevents same-chain replay."] end subgraph "Threat: Signature Malleability" T5["Forge alternative
valid signature"] M5["Low-S normalization
enforced by SignerP256.
Only one canonical form."] end T1 --> M1 T2 --> M2 T3 --> M3 T4 --> M4 T5 --> M5 style T1 fill:#fc8181,stroke:#c53030,color:#000000 style T2 fill:#fc8181,stroke:#c53030,color:#000000 style T3 fill:#fc8181,stroke:#c53030,color:#000000 style T4 fill:#fc8181,stroke:#c53030,color:#000000 style T5 fill:#fc8181,stroke:#c53030,color:#000000 style M1 fill:#c6f6d5,stroke:#2f855a,color:#000000 style M2 fill:#c6f6d5,stroke:#2f855a,color:#000000 style M3 fill:#c6f6d5,stroke:#2f855a,color:#000000 style M4 fill:#c6f6d5,stroke:#2f855a,color:#000000 style M5 fill:#c6f6d5,stroke:#2f855a,color:#000000

Figure 9. Threat model and mitigations. Red = threat. Green = mitigation. Every attack vector has a concrete, implemented defense.

9.2 Security Properties

Property Guarantee Mechanism
Key non-extractability Passkey private key never leaves device hardware WebAuthn spec + Secure Enclave + non-exportable key flag
Phishing resistance Passkey is bound to origin (domain) WebAuthn relying party ID prevents cross-origin signing
Cross-chain replay prevention UserOp valid only on Sequentia chain 15132025 getUserOpHash includes block.chainid and EntryPoint address
Same-chain replay prevention Each UserOp can only execute once Nonce management in EntryPoint (key || sequence)
Recovery replay prevention Each DNA attestation usable exactly once usedRecoveryRequests mapping + wallet address binding
Unauthorized execution prevention Only EntryPoint or self can call execute onlyEntryPointOrSelf modifier from OZ Account
Signature malleability prevention Only low-S signatures accepted OpenZeppelin P256.sol enforces canonical form

10. Patent Alignment

BioWallet implements key claims from US Patent 11,915,808 B2 ("Privacy-Preserving DNA/RNA/Microbiome/COVID-19 Test Kit Kiosk and Locker That Pairs To and Stores Results Data in Private Digital Wallet," Uribe 2024):

Patent Reference Claim BioWallet Implementation
Fig. 2 Step 230 "THE USER CREATES A PERSONAL DIGITAL WALLET USING A TELEPHONE NUMBER, OR A PAPER WALLET IS CREATED AND PRINTED" BioWalletFactory.createWallet() — wallet creation is deterministic from Passkey registration. The counterfactual address can be encoded as a QR code (paper wallet branch).
Fig. 2 Step 255 "USER RECEIVES A NON-FUNGIBLE TOKEN REPRESENTING THEIR BIO SPECIMEN IN A PUBLIC BLOCKCHAIN" BioWallet implements ERC721Holder + ERC1155Holder, directly custodying BioNFTs and BioAssetVault tokens that represent the patient's bio specimens.
Fig. 4 #400 "Scan your Genobank Address" QR on the test kit The CREATE2-predicted address is available at Passkey registration time and can be rendered as a QR code on the physical kit, linking the kit to the counterfactual wallet.
Claims 1–20 Privacy-preserving storage of biometric data in a personal digital wallet BioWallet stores the biosampleSerial (opaque reference, not raw data) and gates all access through P-256 Passkey signatures. Raw genomic data lives off-chain in GCS; only ownership pointers are on-chain.

11. Future Work

11.1 Multi-Device Passkey Sync

Apple, Google, and Microsoft now support cross-device Passkey synchronization via iCloud Keychain, Google Password Manager, and Windows Hello respectively. BioWallet can leverage this to reduce recovery scenarios: if a patient registers a Passkey on their iPhone, it automatically becomes available on their iPad and Mac. The on-chain P-256 verifier does not need to change—the synced credential produces the same (qx, qy) public key.

11.2 Session Keys

For high-frequency, low-risk operations (e.g., BioRoutes resolution queries, Bloom filter match requests), BioWallet could issue time-limited session keys that are authorized by a single Passkey signature but execute independently thereafter. This would reduce biometric prompts for routine operations while maintaining the security invariant that the Passkey remains the root of trust.

11.3 Multi-Signer Guardianship

The current recovery model uses a single DNA attestation. Future versions could support M-of-N recovery combining DNA attestation with institutional guardians (e.g., a hospital compliance officer + DNA attestation, or two independent lab attestations). The executeSignerRecovery function's interface is designed to accommodate this extension.

11.4 RIP-7212 Precompile Deployment on Sequentia

Once the Sequentia validator deploys the RIP-7212 precompile (a configuration change in the Cosmos SDK EVM module), P-256 verification gas cost drops from ~330k gas (pure-Solidity) to ~3,450 gas (native precompile)—a 100x improvement. BioWallet's OpenZeppelin SignerP256 will automatically use the precompile with zero contract changes.

11.5 BioRoutes Integration

BioWallet is designed to integrate with the BioRoutes protocol (the "DNS of biodata"), where every storage location of a patient's biodata is an on-chain event. The wallet's executeBatch function enables atomic operations that simultaneously update BioRoutes entries, transfer BioNFT consent tokens, and log BioAssetVault provenance—all in a single gasless UserOp.

12. References

# Reference
1 ERC-4337: Account Abstraction Using Alt Mempool. Ethereum Improvement Proposals, 2021.
2 RIP-7212: Precompile for secp256r1 Curve Support. Rollup Improvement Proposals, 2023.
3 WebAuthn: Web Authentication — An API for Accessing Public Key Credentials (Level 2). W3C Recommendation, 2021.
4 FIDO2: Client to Authenticator Protocol (CTAP). FIDO Alliance, 2019.
5 Uribe, D. US Patent 11,915,808 B2: "Privacy-Preserving DNA/RNA/Microbiome/COVID-19 Test Kit Kiosk and Locker That Pairs To and Stores Results Data in Private Digital Wallet." 2024.
6 Buchanan, W., Grierson, S., & Uribe, D. "Privacy-Aware Single-Nucleotide Polymorphisms (SNPs) Using Bilinear Group Accumulators in Batch Mode." ICISSP 2024, pp. 226–233.
7 OpenZeppelin Contracts v5.6: Account, SignerP256, ERC7821, ERC1155Holder. 2025.
8 ERC-7821: Minimal Batch Executor Interface. Ethereum Improvement Proposals, 2024.
9 Vitalik Buterin. "Why We Need Wide Adoption of Social Recovery Wallets." 2021.
10 NIST FIPS 186-5: Digital Signature Standard (DSS) — ECDSA with P-256 curve. 2023.

BioWallet is part of the GenoBank.io decentralized biodata infrastructure, deployed on the Sequentia Blockchain (Chain ID 15132025).

Your body. Your wallet. Your data.