How to integrate Biomapper with your dApp on Soneium?

How to integrate Biomapper with your dApp on Soneium?

Soneium, an Ethereum Layer 2 developed by Sony Block Solutions Labs, is built to empower creativity, evoke emotion, and advance an open internet that transcends boundaries. 

With its general-purpose scalability and Ethereum compatibility, Soneium provides a versatile platform for developers to launch DeFi, gaming, and social applications. 

As new projects grow on Soneium, preventing Sybil attacks and bot activity is crucial for protecting governance, rewards, and fair user participation.

Humanode Biomapper is now live on Soneium, bringing a privacy-preserving, biometric-based Sybil resistance layer to dApps. Biomapper ensures that every wallet address maps to a unique, real human, no KYC, no personal data exposure.

Key Concepts

  • Generations: User uniqueness is verified for a limited period (“generation”), after which re-verification is required.
  • Integration Flow: Users verify once, bridge their uniqueness proof to Soneium, and can use it across all compatible dApps.

Step-by-Step Integration Guide

1. Install Biomapper SDK

Add the necessary packages to your project:

npm install --save @biomapper-sdk/core @biomapper-sdk/libraries @biomapper-sdk/events

# or

yarn add @biomapper-sdk/core @biomapper-sdk/libraries @biomapper-sdk/events

For Foundry users:

forge install humanode-network/biomapper-sdk

2. Import Biomapper Interface

In your Solidity smart contract, add:

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.20;

import { IBridgedBiomapperRead } from "@biomapper-sdk/core/IBridgedBiomapperRead.sol";

3. Connect to the Bridged Biomapper Contract

The Biomapper contract is deployed on Soneium. Connect using the contract address.

contract SoneiumApp {
    IBridgedBiomapperRead public biomapper;
    constructor(address _biomapperAddress) {
        biomapper = IBridgedBiomapperRead(_biomapperAddress);
    }
    function isUnique(address user) public view returns (bool) {
        return biomapper.isBridgedUnique(user);
    }
}

Let users complete uniqueness verification through the Biomapper app:

< a href="https://biomapper.hmnd.app" target="_blank">Verify Uniqueness< / a>

After verification, users can return and interact with your dApp.

5. (Optional) Local Testing

Use the MockBridgedBiomapper contract from the SDK for local testing. See the SDK docs for setup and usage.

6. Deploy Your dApp

  • Deploy your contract on Soneium (mainnet or testnet).
  • Use the correct BridgedBiomapper contract address for Soneium.
  • Link your frontend to the Biomapper UI for user onboarding.

Resources

By integrating Biomapper with your Soneium dApp, you add Sybil resistance, enable fair access, and protect your platform from bots, while keeping user data private and onboarding simple.

Need help? Join the Humanode Discord or check the docs.