How to integrate Biomapper with your dApp on Anrdomeda Metis
Metis is an Ethereum Layer 2 rollup designed for high-performance, low-cost dApps with native support for DAOs, DeFi, and Web3 social. But with lower costs and scalability comes a growing risk of Sybil attacks, bots, and fake accounts exploiting systems built for real users.
Humanode Biomapper brings biometric Sybil resistance to Andromeda Metis, ensuring one human = one account, without KYC. This guide walks you through integrating Biomapper into your smart contracts and frontend on Metis.
Why Use Biomapper on Metis?
Biomapper helps Andromeda Metis dApps:
- Block bots from reward farming and staking abuse.
- Build one-human-one-vote DAO governance.
- Ensure fair participation in airdrops, NFT drops, and play-to-earn games.
- Maintain user privacy with private biometric verification.
Key Concepts
Before integrating, get familiar with:
- Generations: A biomapping is valid for a fixed time window (a generation) after which it resets.
- Integration Flow: Users verify once, bridge their uniqueness proof to Metis, and can use that across all dApps.
Step-by-Step Guide
1. Install the Biomapper SDK
Install the required SDK packages in 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 Interfaces
In your smart contract, import the Biomapper interface and libraries:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import { IBridgedBiomapperRead } from "@biomapper-sdk/core/IBridgedBiomapperRead.sol";
3. Connect to the Bridged Biomapper Contract on Metis
The Bridged Biomapper is already deployed on Metis. You just need to connect.
4. Add Biomapper UI Link to Frontend
Let users verify their biomapping by linking them to the UI:
< a href="https://biomapper.hmnd.app" target="_blank">Verify Uniqueness< /a>
Once verified, they can return to your dApp and interact normally.
5. Test Using Mocks (Optional)
For local development, use the MockBridgedBiomapper contract from the SDK:
function generationsBridgingTxPointsListItem(uint256 ptr) external view returns (GenerationBridgingTxPoint memory);
Check the SDK docs for simulation examples.
6. Deploy Your Smart Contract on Metis
Once tested:
- Deploy your contract on Metis mainnet or testnet.
- Retrieve the deployed BridgedBiomapper contract address on Andromeda Metis.
- Link the frontend to the main Biomapper UI.