Skip to content

completed on-chain behaviour fingerprint generator#214

Open
buggythanos wants to merge 1 commit intobnb-chain:mainfrom
buggythanos:on-chain-behaviour-fingerprint-generator
Open

completed on-chain behaviour fingerprint generator#214
buggythanos wants to merge 1 commit intobnb-chain:mainfrom
buggythanos:on-chain-behaviour-fingerprint-generator

Conversation

@buggythanos
Copy link

@buggythanos buggythanos commented Jan 25, 2026

Description

Adds the On-Chain Behavior Fingerprint Generator to the BNBChain Cookbook. The tool analyzes on-chain transaction patterns of addresses on BNB Smart Chain (BSC) and produces unique behavioral fingerprints (SHA-256). It supports behavior classification (NORMAL, DEX_TRADER, WHALE, BOT, CONTRACT_INTERACTOR, UNKNOWN), risk scoring (0–100), and both a Web UI and CLI. Built with TypeScript, ethers.js v6, and Jest.

on-chain-behaviour-fingerprint-generator

Motivation: Enables bot detection, whale identification, risk assessment, and address clustering via deterministic fingerprints derived from transaction history.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • Unit tests: npm test (Jest). Coverage includes:
    • BSC provider init and BSC_RPC_URL override
    • Contract vs EOA detection (isContract)
    • Transaction fetching and behavior metrics
    • Behavior type classification and risk score
    • Signature and fingerprint generation
    • Error handling
  • Build: npm run build (TypeScript compiles without errors).
  • Setup: bash setup.sh (install, .env from template, build, tests).
  • Manual: Web UI via index.html and CLI via npm start <address> [block-range] with a BSC address (e.g. 0x964eD6E48B658a80878D9b81B35AC1b918bCE350).

Reproduce: Clone → bash setup.shnpm testnpm run build → open index.html or run npm start <address>.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@vivixu-cmd
Copy link

Congratulations! You have received a Cookbook reward. Please reply with your BSC wallet address.Thanks

@buggythanos
Copy link
Author

Congratulations! You have received a Cookbook reward. Please reply with your BSC wallet address.Thanks

Hi there, thank you!
0x4e5d4a29F7b02c8cf1310D112A42231Bde049180

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants