Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /api/token/security/UPAyaoDk7novxcUFPECTacH9ReP9ARgMxifN1sSmeme
- {
- "success": true,
- "data": {
- "mintAddr": "UPAyaoDk7novxcUFPECTacH9ReP9ARgMxifN1sSmeme",
- "securityRating": {
- "color": "red",
- "level": "high",
- "message": "High risk — new wallets, concentrated supply, VPN detected"
- },
- "overallScore": 22.41,
- "componentScores": {
- "walletAge": 9.655172413793103,
- "concentration": 0,
- "top25Analysis": 20,
- "vpn": 100
- },
- "rawData": {
- "creatorWalletAge": 14,
- "top10HoldersPercentage": 100,
- "oldWalletsPercentage": 0,
- "vpnDetected": null,
- "vpnProbability": 0
- },
- "weightedAverage": {
- "walletAge": 2.413793103448276,
- "concentration": 0,
- "top25Analysis": 5,
- "vpn": 15
- },
- "timestamp": "2025-09-01T21:51:09.871Z"
- }
- }
- /api/token/get_token_info?mintAddr=UPAyaoDk7novxcUFPECTacH9ReP9ARgMxifN1sSmeme
- {
- "id": "689f73053e072775fc04969d",
- "name": "b",
- "ticker": "b",
- "mintAddr": "UPAyaoDk7novxcUFPECTacH9ReP9ARgMxifN1sSmeme",
- "desc": "b",
- "logo": "https://arweave.net/K7kNoNsXDfwRLTwQxjGEIcWCHdCU97N_TbBy7t6b7IM",
- "banner": "https://arweave.net/ii8PUHmfwozn9RsiuGp3iR3AZuje6kunnLIkAzhhD4M",
- "twitter": "",
- "telegram": "",
- "website": "",
- "cdate": "2025-08-15T17:48:53.587Z",
- "marketCap": 35.05496315761133,
- "price": {
- "_id": "689f86663e072775fc04fb59",
- "baseReserve": 799442303590474,
- "quoteReserve": 28024420499,
- "price": 3.5054963157611335e-8
- },
- "virtLiq": 56048840998,
- "walletAddr": "J2E4TX4oZyjuThBiuHZzEVMMhn5K8rsQ7SkdeqyxSDGM",
- "username": "J2E4TX",
- "avatar": null,
- "tokenBalance": 0,
- "solBalance": 0,
- "replies": 0,
- "bondingCurveProgress": 0.028729998823529414,
- "kingOfTheHillProgress": 0.048840998,
- "crownDate": null,
- "tokensAvailableForSale": 639442303.590474,
- "realQuoteReserve": 0.024420499,
- "tokenHolderDistribution": [
- {
- "walletAddr": "Qg14pdV9HNd8oVz2YmMkCZ7q32ZyJNzc1igusypCEnz",
- "username": "Qg14pd",
- "bio": null,
- "holdPercent": 79.9442303590474,
- "solAmount": 0.00189312,
- "createdAt": 1755285092,
- "walletAgeInDays": 17,
- "walletAgeFormatted": "17 days",
- "isDev": false,
- "isKnownUser": false,
- "userAvatar": null
- },
- {
- "walletAddr": "4tp3Rgd9HwrZxY4oxeGV1FPG3JSeWtNRu1a217r698Fx",
- "username": "4tp3Rg",
- "bio": null,
- "holdPercent": 20,
- "solAmount": 0,
- "createdAt": 1755534837,
- "walletAgeInDays": 14,
- "walletAgeFormatted": "14 days",
- "isDev": false,
- "isKnownUser": false,
- "userAvatar": null
- },
- {
- "walletAddr": "A6MLwQwFWQymgMPRMc62NkWNuNREkg49kt24bFmXUSue",
- "username": "A6MLwQ",
- "bio": null,
- "holdPercent": 0.0280116338352,
- "solAmount": 0,
- "createdAt": 1755795981,
- "walletAgeInDays": 11,
- "walletAgeFormatted": "11 days",
- "isDev": false,
- "isKnownUser": true,
- "userAvatar": null
- },
- {
- "walletAddr": "J2E4TX4oZyjuThBiuHZzEVMMhn5K8rsQ7SkdeqyxSDGM",
- "username": "J2E4TX",
- "bio": "dev",
- "holdPercent": 0.0277580071174,
- "solAmount": 0,
- "createdAt": 1755534868,
- "walletAgeInDays": 14,
- "walletAgeFormatted": "14 days",
- "isDev": true,
- "isKnownUser": true,
- "userAvatar": null
- }
- ],
- "isFavorited": false,
- "isWatchListed": false,
- "devIpAddress": null,
- "devIsVPN": null,
- "devVPNScore": null,
- "devCountry": null,
- "devIpUpdateTime": null,
- "creatorLoginCountry": null,
- "creatorFirstIP": null,
- "creatorWalletAge": {
- "ageInDays": 14,
- "createdAt": 1755534868,
- "walletAgeFormatted": "14 days"
- },
- "isBundled": false,
- "bundledStatus": "pending",
- "firstTradeTime": null,
- "firstTradeIsBuy": null,
- "bundledTimeDelta": null,
- "firstTradeAmount": 0,
- "creatorFirstBuyAmount": 0,
- "bundledDetectionTime": null,
- "creatorWalletAgeInDays": 14,
- "creatorWalletAgeFormatted": "14 days",
- "totalHolders": 4,
- "bundledTokenPercentage": 0
- }
- Test script:
- test_security_scoring.js
- ```
- /**
- * Test script for security scoring functions
- */
- const {
- calculateWalletAgeScore,
- calculateConcentrationScore,
- calculateTop25AnalysisScore,
- calculateVPNScore,
- calculateOverallSecurityScore,
- getSecurityRating
- } = require('./src/utils/securityScoring');
- // Test wallet age scoring
- console.log('=== Wallet Age Scoring Tests ===');
- console.log('0 days:', calculateWalletAgeScore(0));
- console.log('15 days:', calculateWalletAgeScore(15));
- console.log('29 days:', calculateWalletAgeScore(29));
- console.log('30 days:', calculateWalletAgeScore(30));
- console.log('45 days:', calculateWalletAgeScore(45));
- console.log('89 days:', calculateWalletAgeScore(89));
- console.log('90 days:', calculateWalletAgeScore(90));
- console.log('120 days:', calculateWalletAgeScore(120));
- console.log('179 days:', calculateWalletAgeScore(179));
- console.log('180 days:', calculateWalletAgeScore(180));
- console.log('365 days:', calculateWalletAgeScore(365));
- // Test concentration scoring
- console.log('\n=== Concentration Scoring Tests ===');
- console.log('0%:', calculateConcentrationScore(0));
- console.log('10%:', calculateConcentrationScore(10));
- console.log('19%:', calculateConcentrationScore(19));
- console.log('20%:', calculateConcentrationScore(20));
- console.log('30%:', calculateConcentrationScore(30));
- console.log('39%:', calculateConcentrationScore(39));
- console.log('40%:', calculateConcentrationScore(40));
- console.log('50%:', calculateConcentrationScore(50));
- console.log('59%:', calculateConcentrationScore(59));
- console.log('60%:', calculateConcentrationScore(60));
- console.log('80%:', calculateConcentrationScore(80));
- console.log('100%:', calculateConcentrationScore(100));
- // Test top 25 analysis scoring
- console.log('\n=== Top 25 Analysis Scoring Tests ===');
- console.log('0%:', calculateTop25AnalysisScore(0));
- console.log('20%:', calculateTop25AnalysisScore(20));
- console.log('39%:', calculateTop25AnalysisScore(39));
- console.log('40%:', calculateTop25AnalysisScore(40));
- console.log('50%:', calculateTop25AnalysisScore(50));
- console.log('69%:', calculateTop25AnalysisScore(69));
- console.log('70%:', calculateTop25AnalysisScore(70));
- console.log('80%:', calculateTop25AnalysisScore(80));
- console.log('100%:', calculateTop25AnalysisScore(100));
- // Test VPN scoring
- console.log('\n=== VPN Scoring Tests ===');
- console.log('No VPN:', calculateVPNScore(false, 0));
- console.log('VPN detected (score 0.5):', calculateVPNScore(true, 0.5));
- console.log('VPN detected (score 0.95):', calculateVPNScore(true, 0.95));
- console.log('VPN detected (score 1.0):', calculateVPNScore(true, 1.0));
- // Test overall security scoring
- console.log('\n=== Overall Security Scoring Tests ===');
- const testScores1 = {
- walletAge: 100, // 6+ months
- concentration: 100, // <20% concentration
- top25Analysis: 100, // 70%+ old wallets
- vpn: 100 // No VPN
- };
- console.log('Perfect scores:', calculateOverallSecurityScore(testScores1));
- const testScores2 = {
- walletAge: 40, // 1-3 months
- concentration: 40, // 40-60% concentration
- top25Analysis: 60, // 40-70% old wallets
- vpn: 40 // VPN detected
- };
- console.log('Medium scores:', calculateOverallSecurityScore(testScores2));
- const testScores3 = {
- walletAge: 10, // <1 month
- concentration: 10, // 60%+ concentration
- top25Analysis: 20, // <40% old wallets
- vpn: 35 // VPN detected
- };
- console.log('Low scores:', calculateOverallSecurityScore(testScores3));
- // Test security rating interpretation
- console.log('\n=== Security Rating Tests ===');
- console.log('Score 95:', getSecurityRating(95));
- console.log('Score 80:', getSecurityRating(80));
- console.log('Score 65:', getSecurityRating(65));
- console.log('Score 50:', getSecurityRating(50));
- console.log('Score 30:', getSecurityRating(30));
- console.log('Score 0:', getSecurityRating(0));
- console.log('\n=== Test Complete ===');
- ```
- Test result:
- ```
- > node test_security_scoring.js
- === Wallet Age Scoring Tests ===
- 0 days: 0
- 15 days: 10.344827586206897
- 29 days: 20
- 30 days: 40
- 45 days: 40
- 89 days: 40
- 90 days: 70
- 120 days: 70
- 179 days: 70
- 180 days: 100
- 365 days: 100
- === Concentration Scoring Tests ===
- 0%: 100
- 10%: 100
- 19%: 100
- 20%: 100
- 30%: 70
- 39%: 70
- 40%: 70
- 50%: 40
- 59%: 40
- 60%: 40
- 80%: 10
- 100%: 0
- === Top 25 Analysis Scoring Tests ===
- 0%: 20
- 20%: 20
- 39%: 20
- 40%: 60
- 50%: 60
- 69%: 60
- 70%: 100
- 80%: 100
- 100%: 100
- === VPN Scoring Tests ===
- No VPN: 100
- VPN detected (score 0.5): 40
- VPN detected (score 0.95): 31
- VPN detected (score 1.0): 30
- === Overall Security Scoring Tests ===
- Perfect scores: 100
- Medium scores: 45
- Low scores: 16.25
- === Security Rating Tests ===
- Score 95: {
- color: 'green',
- level: 'safe',
- message: 'Likely safe, decentralized, older wallets'
- }
- Score 80: {
- color: 'green',
- level: 'safe',
- message: 'Likely safe, decentralized, older wallets'
- }
- Score 65: {
- color: 'yellow',
- level: 'medium',
- message: 'Medium risk — investigate further'
- }
- Score 50: {
- color: 'yellow',
- level: 'medium',
- message: 'Medium risk — investigate further'
- }
- Score 30: {
- color: 'red',
- level: 'high',
- message: 'High risk — new wallets, concentrated supply, VPN detected'
- }
- Score 0: {
- color: 'red',
- level: 'high',
- message: 'High risk — new wallets, concentrated supply, VPN detected'
- }
- === Test Complete ===
- ```
Advertisement
Add Comment
Please, Sign In to add comment