Sybil Resistance

Use wallet-risk to add a risk signal to onboarding, allowlists, and claim flows.

Create and evaluate a risk proof

Wallet risk is point-in-time: risk can change. For security-sensitive actions, prefer a fresh proof or require recency.

import { NeusClient } from '@neus/sdk';

const client = new NeusClient();

export async function evaluateWalletRisk(walletAddress) {
  const created = await client.verify({
    verifier: 'wallet-risk',
    data: { walletAddress },
    wallet: window.ethereum
  });

  const qHash = created.qHash;
  const final = await client.pollProofStatus(qHash, { interval: 3000, timeout: 60000 });
  const verifier = (final.data?.verifiedVerifiers || []).find(
    (v) => v.verifierId === 'wallet-risk' && v.verified === true
  );

  return verifier?.data || {};
}

Combine with other gates

Use VerifyGate to combine multiple requirements (e.g. “NFT owner + low risk”):

Reference

  • Verifier schema: docs/verifiers/schemas/wallet-risk.json

Last updated

Was this helpful?