Demos Global
Demos GlobalSocial MediaDemos AnalyticsDemos dApps
  • Demos Global
  • Demos Overview
    • Introduction
    • Understanding Sybil Attacks and the Need for Robust Sybil Resistance
    • Biometric Proof of Personhood
  • Token and Community
    • πŸ†Leaderboard and Community Engagement
      • Demos Leaderboard
    • πŸͺ™$DEM Token
      • $DEM Overview
      • veDEM Membership System
      • veDEM Mechanics
    • πŸ“–DAO Governance
      • Overview
  • OnlyMeID
    • User Privacy & Safety
      • Understanding User Data
      • User Autonomy and Control
        • How Users Can Initiate the Purge
        • Safeguards to Prevent Misuse
        • Ensuring User Autonomy
      • Future Direction:
    • βš™οΈTechnical Documentation
      • Biometric Authentication
      • On-Chain Implementation
      • Smart Contract Parameters
      • πŸ”§UI Release notes
    • πŸ“Overview
      • Introduction
      • Functionality
      • Use-Cases
      • Unique Selling Points
    • πŸ›£οΈRoadmap
  • Appendix
    • Branding Kit
    • Demos Motivation
      • Demos Motivation
    • Proof of Existence
      • Proof of Existence
  • βš™οΈHow to Section
    • OnlyMeID Enrollment Process
      • Enrollment URL
    • Token Bridge Guide & Add Chains to Wallet
    • Demos dApp Support
    • Demos / Hemi Overview
      • Hemi Support Notes
      • How to connect to Hemi BlockChain
      • πŸ†˜Reported issues & Questions
      • πŸ”₯How to burn/delete enrollment
      • Enrollment Status explained
      • πŸ’²Mint / Verify FAQ
Powered by GitBook
On this page
  1. OnlyMeID
  2. Technical Documentation

On-Chain Implementation

Biometric Authentication with OnlyMeID

OnlyMeID functions as a bridge between off-chain biometric authentication and on-chain activities, acting as an identity oracle. This integration allows users to verify their identity off-chain using the OnlyMeID browser-based interface and then represent this authentication on-chain through attestation.

User Interaction Flow

  1. Web3 Wallet Connection: Users must connect their preferred web3 wallet to the OnlyMeID interface.

  2. Ownership Verification: Users sign a message to confirm ownership of their connected web3 account.

  3. Proof Generation: After engaging with the OnlyMeID product successfully, users generate a cryptographic proof via the interface.

  4. On-Chain Enrollment: This proof is then utilized to update or create their enrollment data on-chain, including:

    • A Soulbound ERC-20 'MeID' token representing the enrollment.

    • A timestamp marking the execution of the enrollment.

Proof of Liveness Verification

When users complete a Proof of Liveness Verification, they update their on-chain enrollment with additional information:

  • The timestamp of their latest verification.

  • It’s crucial to note that no biometric data is linked to the on-chain enrollment, ensuring privacy and data integrity.

Smart Contract Integration for Human Gating

Projects that wish to gate their operations behind OnlyMeID authentication need to adjust their smart contracts as follows:

  1. Import the IERC20 interface balanceOf() read function

  2. Create a global MeID address variable set to the MeID contract address

  3. Add the following line of code to any function intended to be Human Gated:

require(IERC20(MeID).balanceOf(msg.sender) == 1, "User not Authenticated!")

Post-Enrollment Interaction

The above code will enforce logic requiring any user interacting with the corresponding smart contract function to hold a MeID token. Users who are not authorized will not be able to complete the transaction.

After successful enrollment, users can immediately interact with any protected smart contract function as normal, allowing for seamless access and enhanced security measures.

PreviousBiometric AuthenticationNextSmart Contract Parameters

Last updated 1 year ago

βš™οΈ