Mitigate Vanity Account Name Misdirection #2829
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements comprehensive account name validation to prevent the recurring "vanity account name misdirection" scam that has been plaguing the BitShares ecosystem. It addresses issue #2828 by blocking registration of account names that match known blockchain address formats and scam patterns.
Changes Overview
New Files
libraries/protocol/account_name_validation.hpp- Validation class interfacelibraries/protocol/account_name_validation.cpp- Comprehensive validation implementationModified Files
libraries/protocol/account.cpp- Added validation toaccount_create_operation::validate()libraries/chain/account_evaluator.cpp- Added validation toaccount_create_evaluator::do_evaluate()libraries/protocol/CMakeLists.txt- Added new source file to buildtests/tests/account_tests.cpp- Comprehensive test suiteValidation Coverage
The implementation blocks account names matching:
0x[a-fA-F0-9]{40}(ETH, BSC, Polygon, Avalanche C-Chain, etc.)1...,3...) and Bech32 (bc1...,tb1...)cosmos1...,osmo1...,juno1...,secret1...,thor1...,kava1..., etc.)Key Features
Integration Points
Validation occurs at both protocol and chain layers to ensure comprehensive protection:
account_create_operation::validate()provides early validationaccount_create_evaluator::do_evaluate()provides final enforcementImpact
This implementation directly addresses the weekly scam incidents described in issue #2828, where victims lose hundreds to thousands of dollars by sending BTS to accounts mimicking foreign blockchain addresses. Thereby it mitigates, the need to say "Welcome to Bitshares, you've been scammed, scroll up and see many other such cases @BitsharesScams"
Closes #2828