DeFi project party smart contract address clustering method, device and medium

By adopting the clustering method of smart contract addresses in DeFi projects, the problem of insufficient mapping accuracy between smart contract addresses and project parties in blockchain browsers is solved, the security incident response capabilities are improved, and fund tracking and defense coordination is ensured. efficiency.

CN119071224AActive Publication Date: 2024-12-03ZHEJIANG UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410899358.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-05
Publication Date
2024-12-03
Estimated Expiration
2044-07-05

AI Technical Summary

Technical Problem

The existing blockchain browsers have insufficient mapping accuracy between the smart contract address and contract address of the DeFi project party, which makes it difficult to respond and handle security incidents in a timely manner, affecting fund tracking and defense coordination.

Method used

A method of clustering smart contract addresses of DeFi project parties is proposed. By collecting and parsing smart contract address data on the blockchain public chain, and using recursive clustering, fund interaction relationship clustering and same deployer clustering, it improves the The mapping accuracy of the smart contract address and project party.

Benefits of technology

It improves the accuracy of the mapping between smart contract addresses and DeFi project parties, helps DeFi security researchers to process damaged contract addresses in a timely manner, and enhances the ability to handle possible damaged funds.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119071224A_ABST
    Figure CN119071224A_ABST
Patent Text Reader

Abstract

The invention discloses a DeFi project party smart contract address clustering method and device and a medium, and the method comprises the steps: collecting and analyzing the smart contract address of a DeFi project party on a public chain of a block chain and label data corresponding to a corresponding three-party address, and carrying out the re-clustering of the smart contract address; in addition, for the intelligent contract addresses which cannot fully collect the directly related address tags, the intelligent contract addresses are clustered by adopting an indirect tag analysis mode. The clustering process depends on the intelligent contract address data completely disclosed on the public chain of the block chain, can be used for clustering the intelligent contract address data with direct or indirect related tags on the public chain of the block chain, and is beneficial to improving the accuracy and timeliness of classifying the intelligent contract addresses of different DeFi project parties.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of digital currency and blockchain security, and in particular to a method, device and medium for clustering smart contract addresses of a DeFi project party. Background Art

[0002] At present, the expansion speed of the decentralized finance (DeFi) ecosystem is remarkable. It not only reshapes the boundaries of financial services, but also promotes unprecedented innovation and capital flow. However, the rapid development of this field is not without cost. An important issue is the endless security risks and challenges.

[0003] In this context, blockchain browsers, such as the widely trusted Etherscan, play a vital role. They are not only a window for the majority of DeFi users to explore the details of blockchain public chain transactions, but also an indispensable tool for professional DeFi security researchers and DeFi analysts in the industry to analyze, such as through Etherscan, they can parse complex on-chain activities or identify potential security threats. In particular, Etherscan also uniformly manages the mapping relationship between project entities and their smart contract addresses through its Label WordCloud system. These blockchain browsers represented by Etherscan strive to enhance transparency and promote security audits and related risk management of DeFi protocols.

[0004] Unfortunately, existing solutions are not perfect. Take Etherscan's Label Word Cloud as an example. Despite its efforts to provide the above services, it still faces some serious problems, such as the poor accuracy of the mapping between contract addresses and project parties. The problem of insufficient accuracy may affect the timely response and correct assessment of security incidents. When a security attack unfortunately occurs, the chain reaction of this problem is particularly obvious: the victim's funds are often quickly dispersed through complex and difficult-to-trace on-chain transfers. If the project party cannot be accurately located immediately based on the damaged contract address, subsequent emergency response measures will be seriously hindered. Whether trying to freeze funds, track hackers, or coordinate resources inside and outside the industry for collaborative defense, the lack of timely and accurate information is tantamount to a blind man touching an elephant, which greatly limits the ability to deal with possible damaged funds or take rescue measures. Summary of the invention

[0005] In view of the shortcomings of the prior art, the present invention proposes a clustering method, device and medium for the smart contract addresses of DeFi project parties. The method can improve the accuracy of the mapping between smart contract addresses and DeFi project parties, so that DeFi security researchers can promptly process the relevant damaged contract addresses when an attack occurs, and DeFi data analysts can promptly refer to valuable DeFi project party smart contract addresses when making DeFi investments.

[0006] The specific technical solutions are as follows:

[0007] A clustering method for smart contract addresses of DeFi projects, comprising the following steps:

[0008] S1: According to public information sources, collect the smart contract address data currently deployed on the blockchain public chain to form an address data set, and obtain the blockchain public chain corresponding to the smart contract address to be clustered from the address data set;

[0009] S2: Obtain the transaction that creates the smart contract address to be clustered according to the public blockchain, parse the transaction, and obtain the three-party address corresponding to the smart contract address to be clustered, the three-party address is: sender address, receiver address, creator address; obtain multiple address labels directly related to the smart contract address to be clustered and the three-party address through the blockchain browser; clean the address label and only retain the content related to the DeFi project party information as the new address label;

[0010] S3: Determine whether the cleaned address labels obtained in S2 are all empty. If not, execute S4; if yes, execute S5;

[0011] S4, project party attribution clustering: assign different weights to non-empty address labels, and the address label weight of the contract address to be clustered is greater than the address label weight of the sender address and the receiver address, and the address label weight of the creator address is greater than the address label weight of the sender address and the receiver address; merge the same address labels and add weights; output the address label with the highest weight. If its weight reaches the set threshold, the DeFi project party mapping result of the smart contract address to be clustered is obtained based on the address label, otherwise execute S5;

[0012] S5: Clustering is performed in three ways, and the three ways are in descending order of priority: recursive clustering, fund interaction relationship clustering, and same deployer clustering; based on the address label obtained by the highest priority method among the methods that can achieve clustering, the DeFi project party mapping result of the contract address is obtained; the recursive clustering is specifically implemented through the following sub-steps:

[0013] (1) Among the three-party addresses corresponding to the smart contract address to be clustered, the address belonging to the contract address type is used as the new smart contract address;

[0014] (2) Collect the directly related address tags of each new smart contract address and its corresponding new third-party address;

[0015] (3) Determine whether the maximum number of recursive layers has been reached. If not, execute step (4); if so, end the recursion and execute step (5); the larger the number of recursive layers, the smaller the weight of the address label;

[0016] (4) Determine whether there is still an address of the contract address type in the new three-party address. If so, use it as the new smart contract address and repeat steps (2)-(4), with the number of recursive layers increased by one. If not, end the recursion and execute step (5).

[0017] (5) All identical address labels are merged and weighted; the address label with the highest weight is output. If its weight exceeds the set threshold, the DeFi project mapping result of the smart contract address to be clustered is obtained based on the address label; otherwise, it is considered that clustering cannot be achieved using recursive clustering.

[0018] Furthermore, in S2, the directly related address tags include: public tag name, token tag, entity tag; S2 obtains 12 directly related address tags in total.

[0019] Furthermore, in S2, the address label is cleaned by character string interception or concatenation.

[0020] Furthermore, clustering is performed using the capital interaction relationship clustering method, and the specific operations are: determine whether there is a smart contract address that interacts with the smart contract address to be clustered. If not, it is considered that clustering cannot be completed using the capital interaction relationship clustering method; if yes, all smart contract addresses are collected to form a smart contract address list; based on the smart contract address list and the address label corresponding to each smart contract address, a label list is constructed; if all address labels in the label list correspond to only one DeFi project party, a mapping is established between the DeFi project party and the smart contract address to be clustered; otherwise, based on the address label corresponding to the smart contract address that interacted with the smart contract address to be clustered the earliest in time, the DeFi project party mapping result of the smart contract address to be clustered is obtained.

[0021] Furthermore, clustering is performed using the same deployer clustering method, and the specific operation is: determine whether there is a clustered smart contract address for the smart contract address to be clustered, and the two have the same creator address. If not, it is considered that clustering cannot be completed using the same deployer method; if so, a mapping is established between the DeFi project party to which the clustered smart contract address belongs and the smart contract address to be clustered, so as to achieve clustering of the smart contract addresses to be clustered.

[0022] Furthermore, in S1, the public information sources include the DeFi third-party intelligence collection platform DeFiLlama.

[0023] Furthermore, in S1, the public blockchain includes Ethereum and Binance.

[0024] Furthermore, in S1, the blockchain browser includes Etherscan and BscScan.

[0025] An electronic device includes a memory and one or more processors, wherein the memory stores executable code, and when the one or more processors execute the executable code, it is used to implement the clustering method of the smart contract address of the DeFi project party.

[0026] A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the clustering method of the smart contract address of the DeFi project party is implemented.

[0027] The beneficial effects of the present invention are:

[0028] A clustering method for DeFi project smart contract addresses proposed in the present invention can be applied to smart contract address data with direct or indirect related labels on the public blockchain; this method uses completely public blockchain data and performs label clustering analysis at a relatively low cost. The effect achieved by this type of analysis is beneficial for DeFi security researchers to promptly handle related damaged contract addresses in the event of an attack, and DeFi data analysts to promptly refer to valuable DeFi project smart contract addresses when making DeFi investments. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 It is a flow chart of a clustering method for a DeFi project party smart contract address proposed in an embodiment of the present invention.

[0030] Figure 2 It is a flowchart of clustering smart contract addresses with directly related address tags in an embodiment of the present invention.

[0031] Figure 3 It is a flowchart of clustering smart contract addresses for which directly related address tags do not exist in an embodiment of the present invention.

[0032] Figure 4 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0033] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0034] In the following description, reference is made to “one specific embodiment”, which describes a subset of all possible embodiments, but it can be understood that “one specific embodiment” describes the same subset or different subsets of all possible embodiments and can be combined with each other without conflict.

[0035] Unless otherwise defined, all technical science and technology used herein have the same meaning as commonly understood by those skilled in the art of the present invention. The terms used herein are only for the purpose of describing the embodiments of the present invention and are not intended to limit the present invention.

[0036] Before further describing the embodiments of the present invention in detail, the nouns and terms involved in the embodiments of the present invention are described. The nouns and terms involved in the embodiments of the present invention are subject to the following explanations.

[0037] (1) Transaction, which is equivalent to the computer term "transaction". Transaction includes operations that need to be submitted to the blockchain network for execution, and does not refer only to transactions in a business context. Since the term "transaction" is commonly used in blockchain technology, the embodiments of the present invention follow this convention.

[0038] (2) Blockchain is an encrypted, chained transaction storage structure formed by blocks.

[0039] (3) Blockchain Network: A collection of nodes that incorporate new blocks into the blockchain through consensus.

[0040] (4) Smart Contracts, also known as chaincode or application code, are programs deployed in the nodes of the blockchain network. The nodes execute the smart contracts called in the received transactions to update or query the key-value data in the state database.

[0041] (5) Public blockchains refer to blockchains that can be read and sent by anyone in the world, where transactions can be effectively confirmed and anyone can participate in the consensus process.

[0042] (6) Smart contract address (Contract Address) is the unique identifier of a smart contract on the blockchain network. It is used to identify the location of a smart contract running on the blockchain network and to identify and call the smart contract. Users can interact with the smart contract through the smart contract address, such as querying the status of the contract, sending transaction requests, and calling functions in the contract.

[0043] Below, in order to explain the present application more clearly, three concepts closely related to the present invention, namely, the "creator address", "sender address" and "receiver address" corresponding to the smart contract address are briefly introduced:

[0044] (1) The creator address of the smart contract address: refers to the address that directly calls the method to create a smart contract to create the smart contract address. For example, for a pool-type smart contract address, the contract address of the factory contract that creates the pool is the creator address of the pool-type smart contract address.

[0045] The following describes a method for obtaining the address of the creator of a smart contract address through a smart contract address:

[0046] Find the transaction that creates the smart contract address on the public blockchain, and then use transaction parsing tools such as phalcon and tenderly to parse the function call flow within the transaction. In the complete function call flow, the contract address that directly creates the smart contract address by calling the "create contract" function (such as CreateContract, Create, etc.) is the creator address.

[0047] (2) The sender address of the smart contract address: refers to the address (sender address) that sends the transaction in the transaction where the smart contract address is created.

[0048] The following describes a method for obtaining the sender address of a smart contract address through a smart contract address of the present invention:

[0049] Find the transaction that created the smart contract address on the public blockchain, then use the transaction parsing tool to parse the transaction and extract the from field in the transaction. The content of the from field is the sender address.

[0050] (3) The receiver address of the smart contract address: refers to the address that receives the transaction in the transaction where the contract address is created.

[0051] The following describes a method for obtaining the recipient address of a smart contract address through a smart contract address of the present invention:

[0052] Find the transaction that created the smart contract address on the public blockchain, then use the transaction parsing tool to parse the transaction and extract the to field in the transaction. The content of the to field is the recipient address.

[0053] Based on the above architecture, the embodiment of the present invention proposes a clustering method for the smart contract addresses of DeFi project parties, such as Figure 1 As shown, the specific steps include:

[0054] Step 1: Determine the smart contract address to be clustered and the public blockchain on which it is deployed.

[0055] Specifically, based on public information sources, we collect the smart contract address data currently deployed on the public blockchain to form a smart contract address data set. Among them, public information sources include DeFiLlama, a third-party intelligence collection platform for DeFi, official websites or communities or forums of popular projects, etc.; public blockchains include Ethereum, Binance, etc.; blockchain browsers include Etherscan, BscScan, etc.

[0056] According to actual needs, obtain the smart contract address that was damaged when the attack occurred from the smart contract address dataset, or the smart contract address corresponding to the valuable DeFi project that needs to be referenced when making DeFi investments, as well as the blockchain public chain corresponding to the smart contract address.

[0057] Step 2: Get the transaction that creates the smart contract address to be clustered, parse the transaction, and obtain 12 address tags directly related to the smart contract address.

[0058] Through the blockchain public chain information obtained in step 1, according to the full node provided by the public chain, the transaction information for creating the smart contract address is obtained. Then the transaction is parsed to obtain the sender address, receiver address, and creator address corresponding to the smart contract address in the transaction. Then, through the blockchain browser corresponding to the blockchain public chain, the address labels directly related to the four addresses of the smart contract address, sender address, receiver address, and creator address are obtained respectively, including: public tag name (Public Tag Name), token tag (Token Name), entity tag (Entity), and finally 12 address labels are obtained. Then, the content related to the DeFi project party information in the 12 address labels is extracted by string interception or splicing, thereby completing the cleaning of the address labels. The 12 address labels used subsequently are the cleaned address labels.

[0059] Step 3: Determine whether the 12 address labels corresponding to the smart contract address to be clustered are all empty. If not, execute step 4; if all are empty, execute step 5.

[0060] Step 4: Use the project party attribution clustering method to obtain the DeFi project party mapping result of the smart contract address.

[0061] like Figure 2 As shown, when the 12 address labels corresponding to the smart contract addresses to be clustered are not all empty, different weights are assigned to the non-empty address labels. After setting different weights for the 12 address labels corresponding to each smart contract address, and testing the accuracy of the mapping between the smart contract addresses and the project parties, in order to maximize the accuracy of the mapping between the smart contract addresses to be clustered and the project parties, it is necessary to ensure that the weight of the address label of the smart contract addresses to be clustered is greater than the weight of the address label of the sender address and the weight of the address label of the receiver address, and the weight of the address label of the creator address is greater than the weight of the address label of the sender address and the weight of the address label of the receiver address. The address labels assigned with different weights are combined, that is, the address label is used as the key and the weight is used as the value, and the weights corresponding to the 12 address labels are put into a dict type or map type data structure. The weights of the address labels with the same weight are merged. For example, if the public label name is not empty, the weights corresponding to the public label names of the four addresses are added to obtain the weight of the public label name; a dictionary without duplicate address labels is obtained. Finally, the dictionary is sorted in descending order by weight, and the address label with the highest weight is output. If the weight of the address label reaches the set weight threshold, the DeFi project mapping result of the smart contract address to be clustered is obtained based on the address label, thereby completing the clustering of the smart contract address to be clustered; otherwise, jump to step five.

[0062] Step 5: When all 12 address tags corresponding to the smart contract addresses to be clustered are empty, as Figure 3 shown, three clustering methods are adopted respectively. The three methods are in descending order of priority: recursive clustering, fund interaction relationship clustering, and same deployer clustering. Select the address tag obtained by the method with the highest priority among the methods that can achieve clustering, and based on this address tag, obtain the mapping result of the DeFi project party of the smart contract address to be clustered. The process of clustering using the three methods in order of priority is as follows:

[0063] (5.1) Adopt the method of recursive clustering for clustering, which is specifically implemented through the following sub-steps:

[0064] (5.1.1) Among the sender address, receiver address, and creator address corresponding to the smart contract address to be clustered, the addresses that are of the contract address type are respectively used as new smart contract addresses.

[0065] (5.1.2) Collect the public tag name, token name, and entity of the three address tags for each new smart contract address and its corresponding new sender address, new receiver address, and new creator address.

[0066] (5.1.3) Determine whether the maximum recursion level is reached (generally set within five levels, and set to five levels in this embodiment). If not, jump to execute (5.1.4); if so, the recursion ends and jump to execute step (5.1.5). As the recursion level increases, the weight of the address tags of the deeper smart contract addresses needs to be multiplied by a smaller factor t (0 < t < 1, and the larger the recursion level, the smaller t), that is, as the recursion level increases, the weight of the corresponding address tags becomes smaller.

[0067] (5.1.4) Determine whether there are still addresses of the contract address type among the new sender address, new receiver address, and new creator address. If so, continue to use these addresses of the contract address type as new smart contract addresses, repeat steps (5.1.2)-(5.1.4), and increase the recursion level by one; if not, the recursion ends and jump to execute step (5.1.5).

[0068] (5.1.5) For all address tags obtained in the recursive process, the same address tags are merged and weighted; finally, the address tag with the highest weight is output. If the weight of the address tag exceeds the set weight threshold, the DeFi project mapping result of the smart contract address to be clustered is obtained based on the address tag; if the weight of the address tag does not reach the set weight threshold, it is considered that clustering cannot be completed using the recursive clustering method, and jump to step (5.2).

[0069] (5.2) Clustering is performed using the method of capital interaction relationship clustering: all smart contract addresses that interact with the smart contract addresses to be clustered are collected to form a smart contract address list. Based on this smart contract address list and the address label corresponding to each smart contract address, a label list is constructed. If all the address labels in this label list correspond to only one DeFi project party, it is determined that the DeFi project party is mapped with the smart contract address to be clustered, and the clustering of the smart contract address to be clustered is completed; if the number of project parties corresponding to all the labels in this label list exceeds one, the address label corresponding to the smart contract address that interacted with the smart contract address to be clustered the earliest in time is selected, and the DeFi project party mapping result of the smart contract address to be clustered is obtained based on the address label, thereby completing the clustering of the smart contract address to be clustered. If there is no smart contract address that interacts with the smart contract address to be clustered, it is considered that clustering cannot be completed using the method of capital interaction relationship clustering, and jump to step (5.3).

[0070] (5.3) Clustering by clustering with the same deployer: cluster the smart contract addresses to be clustered with the DeFi project party of the creator address of the clustered smart contract address, which have not yet determined the DeFi project party; that is, if a smart contract address to be clustered has the same creator address as another smart contract address that has been clustered, then the DeFi project party to which the clustered smart contract address belongs is also the DeFi project party to which the smart contract address to be clustered belongs, thereby achieving clustering of the smart contract address to be clustered. If the smart contract address to be clustered does not have a clustered smart contract address with the same creator address, it is considered that clustering cannot be completed using the same deployer method, indicating that the smart contract address to be clustered does not have any label information on the blockchain public chain, and the mapping relationship between the smart contract address to be clustered and the DeFi project party is ignored.

[0071] like Figure 4As shown, an electronic device provided by an embodiment of the present invention includes a memory and one or more processors, wherein executable code is stored in the memory, and when the one or more processors execute the executable code, it is used to implement the clustering method of the DeFi project party smart contract address in the above embodiment.

[0072] An electronic device proposed in the present invention can be applied to any device with data processing capability, and the device with data processing capability can be a device or apparatus such as a computer. The electronic device can be implemented by software, or by hardware or a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, the processor of any device with data processing capability reads the corresponding computer program instructions in the non-volatile memory into the memory and runs them. From the hardware level, if Figure 4 As shown, it is a hardware structure diagram of an electronic device of the present invention, in which any device with data processing capability is located, except Figure 4 In addition to the processor, memory, network interface, and non-volatile memory shown, any device with data processing capabilities in which the device of the present invention is located in the embodiments may also include other hardware, which will not be described in detail.

[0073] For the electronic device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The electronic device embodiment described above is only schematic, and the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the present invention. Ordinary technicians in this field can understand and implement it without paying creative work.

[0074] An embodiment of the present invention also provides a computer-readable storage medium on which a program is stored. When the program is executed by a processor, the clustering method of the DeFi project party smart contract address in the above embodiment is implemented.

[0075] The computer-readable storage medium may be an internal storage unit of any device with data processing capability in any of the aforementioned embodiments, such as a hard disk or a memory. The computer-readable storage medium may also be an external storage device of any device with data processing capability, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), an SD card, a flash card (Flash Card), etc. equipped on the device. Furthermore, the computer-readable storage medium may also include both an internal storage unit and an external storage device of any device with data processing capability. The computer-readable storage medium is used to store computer programs and other programs and data required by any device with data processing capability, and may also be used to temporarily store data that has been output or is to be output.

[0076] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0077] The above description is only the preferred embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various changes and variations, and the various modifications to these embodiments will be obvious to those skilled in the art. The general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention shall be included in the protection scope of the present invention.

Claims

1. A clustering method for smart contract addresses of DeFi projects, characterized in that: The following steps are involved: S1: According to public information sources, collect the smart contract address data currently deployed on the blockchain public chain to form an address data set, and obtain the blockchain public chain corresponding to the smart contract address to be clustered from the address data set; S2: Obtain the transaction that creates the smart contract address to be clustered according to the public blockchain, parse the transaction, and obtain the three-party address corresponding to the smart contract address to be clustered, the three-party address is: sender address, receiver address, creator address; obtain multiple address labels directly related to the smart contract address to be clustered and the three-party address through the blockchain browser; clean the address label, and only retain the content related to the DeFi project party information as the new address label; S3: Determine whether the cleaned address labels obtained in S2 are all empty. If not, execute S4; if yes, execute S5; S4. Project party attribution clustering: assign different weights to non-empty address labels, and the address label weight of the contract address to be clustered is greater than the address label weight of the sender address and the receiver address, and the address label weight of the creator address is greater than the address label weight of the sender address and the receiver address; merge the same address labels and add weights; Output the address tag with the highest weight. If its weight reaches the set threshold, the DeFi project mapping result of the smart contract address to be clustered is obtained based on the address tag. Otherwise, execute S5. S5: Clustering is performed in three ways, and the three ways are in descending order of priority: recursive clustering, fund interaction relationship clustering, and same deployer clustering; based on the address label obtained by the highest priority method among the methods that can achieve clustering, the DeFi project party mapping result of the contract address is obtained; the recursive clustering is specifically implemented through the following sub-steps: (1) The address of the contract address type among the three-party addresses corresponding to the smart contract address to be clustered is used as the new smart contract address; (2) Collect the directly related address tags of each new smart contract address and its corresponding new third-party address; (3) Determine whether the maximum number of recursive layers has been reached. If not, execute step (4); if so, end the recursion and execute step (5); the larger the number of recursive layers, the smaller the weight of the address label; (4) Determine whether there is still an address of the contract address type in the new three-party address. If so, use it as the new smart contract address and repeat steps (2)-(4), with the number of recursive layers increased by one. If not, end the recursion and execute step (5). (5) Merge all identical address labels and add up their weights; Output the address label with the highest weight. If its weight exceeds the set threshold, the DeFi project mapping result of the smart contract address to be clustered is obtained based on the address label; otherwise, it is considered that clustering cannot be achieved using recursive clustering.

2. The clustering method of the smart contract address of the DeFi project party according to claim 1 is characterized in that: In S2, the directly related address tags include: public tag name, token tag, entity tag; there are 12 directly related address tags obtained by S2.

3. The clustering method of the DeFi project party smart contract address according to claim 1 is characterized in that: In S2, the address label is cleaned by character string interception or concatenation.

4. The clustering method of the smart contract address of the DeFi project party according to claim 1 is characterized in that: Clustering is performed using the fund interaction relationship clustering method. The specific operation is: determining whether there is a smart contract address that interacts with the smart contract address to be clustered. If not, it is considered that clustering cannot be completed using the fund interaction relationship clustering method; If yes, all smart contract addresses are collected to form a smart contract address list; based on the smart contract address list and the address label corresponding to each smart contract address, a label list is constructed; If all the address labels in the label list correspond to only one DeFi project party, a mapping is established between the DeFi project party and the smart contract address to be clustered; otherwise, the DeFi project party mapping result of the smart contract address to be clustered is obtained based on the address label corresponding to the smart contract address that interacted with the smart contract address to be clustered the earliest in time.

5. The clustering method of the smart contract address of the DeFi project party according to claim 1 is characterized in that: Clustering is performed using the same deployer clustering method. The specific operation is as follows: determine whether there is a clustered smart contract address for the smart contract address to be clustered, and the two have the same creator address. If not, it is considered that clustering cannot be completed using the same deployer method; if so, the DeFi project party to which the clustered smart contract address belongs is mapped with the smart contract address to be clustered, so as to achieve clustering of the smart contract addresses to be clustered.

6. The clustering method of the DeFi project party smart contract address according to claim 1 is characterized in that: In S1, the public information sources include DeFi Llama, a DeFi third-party intelligence collection platform.

7. The clustering method of the smart contract address of the DeFi project party according to claim 1 is characterized in that: In S1, the public blockchains include Ethereum and Binance.

8. The clustering method of DeFi project smart contract addresses according to claim 1, characterized in that: In S1, the blockchain browsers include Etherscan and BscScan.

9. An electronic device, characterized in that: It includes a memory and one or more processors, wherein the memory stores executable code, and when the one or more processors execute the executable code, it is used to implement the clustering method of the DeFi project party smart contract address described in any one of claims 1-8.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the method for clustering the smart contract addresses of the DeFi project parties described in any one of claims 1-8 is implemented.

Citation Information

Patent Citations

  • Associated contract identification system and method based on intelligent contract interaction relationship

    CN114911585A

  • Block chain-based asset circulation traceability method, apparatus and device, and storage medium

    CN117829990A

  • Data processing method and apparatus for block chain

    WO2020133069A1

  • Chain structure address generation method, transaction data processing method, apparatus, and storage medium

    WO2022227694A1