Lissanro

Scopium security API endpoint

Sep 1st, 2025
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.50 KB | None | 0 0
  1. /api/token/security/UPAyaoDk7novxcUFPECTacH9ReP9ARgMxifN1sSmeme
  2. {
  3. "success": true,
  4. "data": {
  5. "mintAddr": "UPAyaoDk7novxcUFPECTacH9ReP9ARgMxifN1sSmeme",
  6. "securityRating": {
  7. "color": "red",
  8. "level": "high",
  9. "message": "High risk — new wallets, concentrated supply, VPN detected"
  10. },
  11. "overallScore": 22.41,
  12. "componentScores": {
  13. "walletAge": 9.655172413793103,
  14. "concentration": 0,
  15. "top25Analysis": 20,
  16. "vpn": 100
  17. },
  18. "rawData": {
  19. "creatorWalletAge": 14,
  20. "top10HoldersPercentage": 100,
  21. "oldWalletsPercentage": 0,
  22. "vpnDetected": null,
  23. "vpnProbability": 0
  24. },
  25. "weightedAverage": {
  26. "walletAge": 2.413793103448276,
  27. "concentration": 0,
  28. "top25Analysis": 5,
  29. "vpn": 15
  30. },
  31. "timestamp": "2025-09-01T21:51:09.871Z"
  32. }
  33. }
  34.  
  35.  
  36. /api/token/get_token_info?mintAddr=UPAyaoDk7novxcUFPECTacH9ReP9ARgMxifN1sSmeme
  37. {
  38. "id": "689f73053e072775fc04969d",
  39. "name": "b",
  40. "ticker": "b",
  41. "mintAddr": "UPAyaoDk7novxcUFPECTacH9ReP9ARgMxifN1sSmeme",
  42. "desc": "b",
  43. "logo": "https://arweave.net/K7kNoNsXDfwRLTwQxjGEIcWCHdCU97N_TbBy7t6b7IM",
  44. "banner": "https://arweave.net/ii8PUHmfwozn9RsiuGp3iR3AZuje6kunnLIkAzhhD4M",
  45. "twitter": "",
  46. "telegram": "",
  47. "website": "",
  48. "cdate": "2025-08-15T17:48:53.587Z",
  49. "marketCap": 35.05496315761133,
  50. "price": {
  51. "_id": "689f86663e072775fc04fb59",
  52. "baseReserve": 799442303590474,
  53. "quoteReserve": 28024420499,
  54. "price": 3.5054963157611335e-8
  55. },
  56. "virtLiq": 56048840998,
  57. "walletAddr": "J2E4TX4oZyjuThBiuHZzEVMMhn5K8rsQ7SkdeqyxSDGM",
  58. "username": "J2E4TX",
  59. "avatar": null,
  60. "tokenBalance": 0,
  61. "solBalance": 0,
  62. "replies": 0,
  63. "bondingCurveProgress": 0.028729998823529414,
  64. "kingOfTheHillProgress": 0.048840998,
  65. "crownDate": null,
  66. "tokensAvailableForSale": 639442303.590474,
  67. "realQuoteReserve": 0.024420499,
  68. "tokenHolderDistribution": [
  69. {
  70. "walletAddr": "Qg14pdV9HNd8oVz2YmMkCZ7q32ZyJNzc1igusypCEnz",
  71. "username": "Qg14pd",
  72. "bio": null,
  73. "holdPercent": 79.9442303590474,
  74. "solAmount": 0.00189312,
  75. "createdAt": 1755285092,
  76. "walletAgeInDays": 17,
  77. "walletAgeFormatted": "17 days",
  78. "isDev": false,
  79. "isKnownUser": false,
  80. "userAvatar": null
  81. },
  82. {
  83. "walletAddr": "4tp3Rgd9HwrZxY4oxeGV1FPG3JSeWtNRu1a217r698Fx",
  84. "username": "4tp3Rg",
  85. "bio": null,
  86. "holdPercent": 20,
  87. "solAmount": 0,
  88. "createdAt": 1755534837,
  89. "walletAgeInDays": 14,
  90. "walletAgeFormatted": "14 days",
  91. "isDev": false,
  92. "isKnownUser": false,
  93. "userAvatar": null
  94. },
  95. {
  96. "walletAddr": "A6MLwQwFWQymgMPRMc62NkWNuNREkg49kt24bFmXUSue",
  97. "username": "A6MLwQ",
  98. "bio": null,
  99. "holdPercent": 0.0280116338352,
  100. "solAmount": 0,
  101. "createdAt": 1755795981,
  102. "walletAgeInDays": 11,
  103. "walletAgeFormatted": "11 days",
  104. "isDev": false,
  105. "isKnownUser": true,
  106. "userAvatar": null
  107. },
  108. {
  109. "walletAddr": "J2E4TX4oZyjuThBiuHZzEVMMhn5K8rsQ7SkdeqyxSDGM",
  110. "username": "J2E4TX",
  111. "bio": "dev",
  112. "holdPercent": 0.0277580071174,
  113. "solAmount": 0,
  114. "createdAt": 1755534868,
  115. "walletAgeInDays": 14,
  116. "walletAgeFormatted": "14 days",
  117. "isDev": true,
  118. "isKnownUser": true,
  119. "userAvatar": null
  120. }
  121. ],
  122. "isFavorited": false,
  123. "isWatchListed": false,
  124. "devIpAddress": null,
  125. "devIsVPN": null,
  126. "devVPNScore": null,
  127. "devCountry": null,
  128. "devIpUpdateTime": null,
  129. "creatorLoginCountry": null,
  130. "creatorFirstIP": null,
  131. "creatorWalletAge": {
  132. "ageInDays": 14,
  133. "createdAt": 1755534868,
  134. "walletAgeFormatted": "14 days"
  135. },
  136. "isBundled": false,
  137. "bundledStatus": "pending",
  138. "firstTradeTime": null,
  139. "firstTradeIsBuy": null,
  140. "bundledTimeDelta": null,
  141. "firstTradeAmount": 0,
  142. "creatorFirstBuyAmount": 0,
  143. "bundledDetectionTime": null,
  144. "creatorWalletAgeInDays": 14,
  145. "creatorWalletAgeFormatted": "14 days",
  146. "totalHolders": 4,
  147. "bundledTokenPercentage": 0
  148. }
  149.  
  150.  
  151. Test script:
  152.  
  153. test_security_scoring.js
  154. ```
  155. /**
  156. * Test script for security scoring functions
  157. */
  158.  
  159. const {
  160. calculateWalletAgeScore,
  161. calculateConcentrationScore,
  162. calculateTop25AnalysisScore,
  163. calculateVPNScore,
  164. calculateOverallSecurityScore,
  165. getSecurityRating
  166. } = require('./src/utils/securityScoring');
  167.  
  168. // Test wallet age scoring
  169. console.log('=== Wallet Age Scoring Tests ===');
  170. console.log('0 days:', calculateWalletAgeScore(0));
  171. console.log('15 days:', calculateWalletAgeScore(15));
  172. console.log('29 days:', calculateWalletAgeScore(29));
  173. console.log('30 days:', calculateWalletAgeScore(30));
  174. console.log('45 days:', calculateWalletAgeScore(45));
  175. console.log('89 days:', calculateWalletAgeScore(89));
  176. console.log('90 days:', calculateWalletAgeScore(90));
  177. console.log('120 days:', calculateWalletAgeScore(120));
  178. console.log('179 days:', calculateWalletAgeScore(179));
  179. console.log('180 days:', calculateWalletAgeScore(180));
  180. console.log('365 days:', calculateWalletAgeScore(365));
  181.  
  182. // Test concentration scoring
  183. console.log('\n=== Concentration Scoring Tests ===');
  184. console.log('0%:', calculateConcentrationScore(0));
  185. console.log('10%:', calculateConcentrationScore(10));
  186. console.log('19%:', calculateConcentrationScore(19));
  187. console.log('20%:', calculateConcentrationScore(20));
  188. console.log('30%:', calculateConcentrationScore(30));
  189. console.log('39%:', calculateConcentrationScore(39));
  190. console.log('40%:', calculateConcentrationScore(40));
  191. console.log('50%:', calculateConcentrationScore(50));
  192. console.log('59%:', calculateConcentrationScore(59));
  193. console.log('60%:', calculateConcentrationScore(60));
  194. console.log('80%:', calculateConcentrationScore(80));
  195. console.log('100%:', calculateConcentrationScore(100));
  196.  
  197. // Test top 25 analysis scoring
  198. console.log('\n=== Top 25 Analysis Scoring Tests ===');
  199. console.log('0%:', calculateTop25AnalysisScore(0));
  200. console.log('20%:', calculateTop25AnalysisScore(20));
  201. console.log('39%:', calculateTop25AnalysisScore(39));
  202. console.log('40%:', calculateTop25AnalysisScore(40));
  203. console.log('50%:', calculateTop25AnalysisScore(50));
  204. console.log('69%:', calculateTop25AnalysisScore(69));
  205. console.log('70%:', calculateTop25AnalysisScore(70));
  206. console.log('80%:', calculateTop25AnalysisScore(80));
  207. console.log('100%:', calculateTop25AnalysisScore(100));
  208.  
  209. // Test VPN scoring
  210. console.log('\n=== VPN Scoring Tests ===');
  211. console.log('No VPN:', calculateVPNScore(false, 0));
  212. console.log('VPN detected (score 0.5):', calculateVPNScore(true, 0.5));
  213. console.log('VPN detected (score 0.95):', calculateVPNScore(true, 0.95));
  214. console.log('VPN detected (score 1.0):', calculateVPNScore(true, 1.0));
  215.  
  216. // Test overall security scoring
  217. console.log('\n=== Overall Security Scoring Tests ===');
  218. const testScores1 = {
  219. walletAge: 100, // 6+ months
  220. concentration: 100, // <20% concentration
  221. top25Analysis: 100, // 70%+ old wallets
  222. vpn: 100 // No VPN
  223. };
  224. console.log('Perfect scores:', calculateOverallSecurityScore(testScores1));
  225.  
  226. const testScores2 = {
  227. walletAge: 40, // 1-3 months
  228. concentration: 40, // 40-60% concentration
  229. top25Analysis: 60, // 40-70% old wallets
  230. vpn: 40 // VPN detected
  231. };
  232. console.log('Medium scores:', calculateOverallSecurityScore(testScores2));
  233.  
  234. const testScores3 = {
  235. walletAge: 10, // <1 month
  236. concentration: 10, // 60%+ concentration
  237. top25Analysis: 20, // <40% old wallets
  238. vpn: 35 // VPN detected
  239. };
  240. console.log('Low scores:', calculateOverallSecurityScore(testScores3));
  241.  
  242. // Test security rating interpretation
  243. console.log('\n=== Security Rating Tests ===');
  244. console.log('Score 95:', getSecurityRating(95));
  245. console.log('Score 80:', getSecurityRating(80));
  246. console.log('Score 65:', getSecurityRating(65));
  247. console.log('Score 50:', getSecurityRating(50));
  248. console.log('Score 30:', getSecurityRating(30));
  249. console.log('Score 0:', getSecurityRating(0));
  250.  
  251. console.log('\n=== Test Complete ===');
  252. ```
  253.  
  254.  
  255. Test result:
  256.  
  257. ```
  258. > node test_security_scoring.js
  259. === Wallet Age Scoring Tests ===
  260. 0 days: 0
  261. 15 days: 10.344827586206897
  262. 29 days: 20
  263. 30 days: 40
  264. 45 days: 40
  265. 89 days: 40
  266. 90 days: 70
  267. 120 days: 70
  268. 179 days: 70
  269. 180 days: 100
  270. 365 days: 100
  271.  
  272. === Concentration Scoring Tests ===
  273. 0%: 100
  274. 10%: 100
  275. 19%: 100
  276. 20%: 100
  277. 30%: 70
  278. 39%: 70
  279. 40%: 70
  280. 50%: 40
  281. 59%: 40
  282. 60%: 40
  283. 80%: 10
  284. 100%: 0
  285.  
  286. === Top 25 Analysis Scoring Tests ===
  287. 0%: 20
  288. 20%: 20
  289. 39%: 20
  290. 40%: 60
  291. 50%: 60
  292. 69%: 60
  293. 70%: 100
  294. 80%: 100
  295. 100%: 100
  296.  
  297. === VPN Scoring Tests ===
  298. No VPN: 100
  299. VPN detected (score 0.5): 40
  300. VPN detected (score 0.95): 31
  301. VPN detected (score 1.0): 30
  302.  
  303. === Overall Security Scoring Tests ===
  304. Perfect scores: 100
  305. Medium scores: 45
  306. Low scores: 16.25
  307.  
  308. === Security Rating Tests ===
  309. Score 95: {
  310. color: 'green',
  311. level: 'safe',
  312. message: 'Likely safe, decentralized, older wallets'
  313. }
  314. Score 80: {
  315. color: 'green',
  316. level: 'safe',
  317. message: 'Likely safe, decentralized, older wallets'
  318. }
  319. Score 65: {
  320. color: 'yellow',
  321. level: 'medium',
  322. message: 'Medium risk — investigate further'
  323. }
  324. Score 50: {
  325. color: 'yellow',
  326. level: 'medium',
  327. message: 'Medium risk — investigate further'
  328. }
  329. Score 30: {
  330. color: 'red',
  331. level: 'high',
  332. message: 'High risk — new wallets, concentrated supply, VPN detected'
  333. }
  334. Score 0: {
  335. color: 'red',
  336. level: 'high',
  337. message: 'High risk — new wallets, concentrated supply, VPN detected'
  338. }
  339.  
  340. === Test Complete ===
  341. ```
Advertisement
Add Comment
Please, Sign In to add comment