A clustering method, device, and medium for DeFi project smart contract addresses

By parsing and clustering the transaction data of smart contract addresses, the problem of inaccurate address mapping of DeFi project parties is solved, and the accuracy and efficiency of security incident response and DeFi investment are improved.

CN119071224BActive Publication Date: 2025-09-23ZHEJIANG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The existing DeFi project parties' smart contract address mapping is not accurate enough, resulting in untimely responses to security incidents and difficulties in tracking funds, affecting the effective implementation of emergency measures.

Method used

By collecting transaction data of smart contract addresses, parsing and cleaning address tags, and using methods such as recursive clustering, capital interaction relationship clustering, and same deployer clustering, the mapping accuracy between contract addresses and project parties is improved.

Benefits of technology

It enables timely handling of damaged contract addresses in security incidents and reference to valuable project smart contract addresses when investing in DeFi, improving the accuracy and efficiency of security research and analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119071224B_ABST
    Figure CN119071224B_ABST
Patent Text Reader

Abstract

The present invention discloses a clustering method, device, and medium for DeFi project smart contract addresses. By collecting and analyzing the label data corresponding to the smart contract addresses of DeFi project parties and the corresponding three-party addresses on the public blockchain, the smart contract addresses are re-clustered. In addition, for smart contract addresses for which directly related address labels are not fully collected, the smart contract addresses are clustered using indirect label analysis. The clustering process of the present invention relies on the fully disclosed smart contract address data on the public blockchain and can be used to cluster smart contract address data with directly or indirectly related labels on the public blockchain, helping to improve the accuracy and timeliness of classifying smart 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 fields of digital currency and blockchain security, and in particular to a method, device, and medium for clustering smart contract addresses of DeFi project parties. Background Art

[0002] The decentralized finance (DeFi) ecosystem is expanding at an astonishing rate, reshaping the boundaries of financial services and fostering unprecedented innovation and capital flows. However, this rapid development comes at a price: a significant cost: a growing number of security risks and challenges.

[0003] In this context, blockchain explorers, such as the widely trusted Etherscan, play a crucial role. They not only provide DeFi users with a window into public blockchain transactions, but also serve as indispensable tools for professional DeFi security researchers and industry analysts. For example, Etherscan allows them to decipher complex on-chain activity and identify potential security threats. In particular, Etherscan's Label WordCloud system centrally manages the mapping between project entities and their smart contract addresses. These explorers, like Etherscan, strive to enhance transparency and facilitate security audits and risk management of DeFi protocols.

[0004] Unfortunately, existing solutions are not perfect. Take Etherscan's Label Word Cloud, for example. Despite its efforts to provide the aforementioned services, it still faces some serious issues, such as the lack of accuracy in mapping contract addresses to project owners. This lack of accuracy can hinder timely responses and correct assessments of security incidents. This problem has a particularly pronounced knock-on effect when a security attack unfortunately occurs: victim funds are often rapidly dispersed through complex and difficult-to-trace on-chain transfers. Failure to immediately and accurately locate the project owner based on the compromised contract address will severely hinder subsequent emergency response measures. Whether attempting to freeze funds, track hackers, or coordinate resources within and outside the industry for collaborative defense, the lack of timely and accurate information is like a blind man touching an elephant, greatly limiting the ability to handle potentially compromised funds or take remedial measures. Summary of the Invention

[0005] In response to the shortcomings of the existing technology, the present invention proposes a clustering method, device and medium for DeFi project party smart contract addresses. This method can improve the accuracy of the mapping between smart contract addresses and DeFi project parties, thereby enabling DeFi security researchers to promptly process the relevant damaged contract addresses when an attack occurs, and DeFi data analysts to 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: Collect the smart contract address data currently deployed on the blockchain public chain based on public information sources to form an address dataset, and obtain the blockchain public chain corresponding to the smart contract address to be clustered from the address dataset;

[0009] S2: Obtain the transaction that created the smart contract address to be clustered based on the public blockchain, parse the transaction, and obtain the three-party addresses corresponding to the smart contract address to be clustered, where the three-party addresses are: sender address, receiver address, and creator address; obtain multiple address labels directly related to the smart contract address to be clustered and the three-party addresses through a blockchain browser; clean the address labels 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 so, 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 weights of the sender address and the receiver address, and the address label weight of the creator address is greater than the address label weights of the sender address and the receiver address; merge the same address labels and add up the 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 this address label. Otherwise, execute S5;

[0012] S5: Clustering is performed using three methods, which are ranked in descending order of priority: recursive clustering, fund interaction relationship clustering, and same deployer clustering. Based on the address label obtained by the method with the highest priority among the clustering methods, 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, proceed to step (4); if so, end the recursion and proceed to 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 tags are merged and weighted; the address tag 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 tag; 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, asset certificate tag, and entity tag; there are a total of 12 directly related address tags obtained in S2.

[0019] Furthermore, in S2, the address label is cleaned by intercepting or concatenating character strings.

[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 so, 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. 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, thereby realizing clustering of the smart contract addresses to be clustered.

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

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

[0024] Furthermore, in said 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 DeFi project party smart contract address.

[0026] A computer-readable storage medium having a computer program stored therein, wherein the computer program, when executed by a processor, implements the clustering method of the smart contract addresses of the DeFi project parties.

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

[0028] The proposed method for clustering DeFi project smart contract addresses can be applied to smart contract address data with directly or indirectly related tags on the public blockchain. This method uses fully public blockchain data and performs tag clustering analysis at a relatively low cost. The results achieved by this type of analysis are beneficial for DeFi security researchers to promptly handle related damaged contract addresses in the event of an attack, and for DeFi data analysts to promptly reference valuable DeFi project smart contract addresses when making DeFi investments. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 This is a flowchart of a clustering method for DeFi project smart contract addresses proposed in an embodiment of the present invention.

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

[0031] Figure 3 2 is a flow chart 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 diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0033] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts 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 is 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 terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present invention pertains. The terms used herein are for the purpose of describing embodiments of the present invention only 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 explained. The nouns and terms involved in the embodiments of the present invention are subject to the following explanations.

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

[0038] (2) Blockchain is an encrypted, chain-like 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 is the unique identifier of a smart contract on the blockchain network. It is used to identify the location of the 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, calling functions in the contract, etc.

[0043] To more clearly explain this application, let's first briefly introduce three concepts closely related to the present invention: the "creator address," "sender address," and "recipient address" corresponding to the smart contract address.

[0044] (1) The creator address of a 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 created the pool is the creator address of the pool-type smart contract address.

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

[0046] Find the transaction that created 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 that sends the transaction in the transaction where the smart contract address is created (sender address).

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

[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's 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 (receiver address).

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

[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's address.

[0053] Based on the above architecture, the embodiment of the present invention proposes a clustering method for the smart contract addresses of DeFi projects, 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, we collected data on smart contract addresses currently deployed on public blockchains from publicly available information sources to form a smart contract address dataset. Public information sources include DeFiLlama, a third-party DeFi intelligence platform, official websites, communities, and forums of popular projects; public blockchains include Ethereum and Binance; and blockchain explorers include Etherscan and BscScan.

[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: Obtain the transaction that created the smart contract address to be clustered, parse the transaction, and obtain 12 address tags directly related to the smart contract address.

[0058] Using the public blockchain information obtained in step 1 and the full nodes provided by the public blockchain, the transaction information for creating the smart contract address is obtained. The transaction is then parsed to obtain the sender, receiver, and creator addresses corresponding to the smart contract address in the transaction. Using the blockchain explorer corresponding to the public blockchain, the address tags directly associated with the smart contract address, sender address, receiver address, and creator address are retrieved, including the public tag name, token name, and entity tag, ultimately resulting in 12 address tags. The content related to the DeFi project owner is then extracted from these 12 address tags through string truncation or concatenation, completing the address tag cleansing. The 12 address tags subsequently used are the cleaned address tags.

[0059] Step 3: Determine whether all 12 address tags corresponding to the smart contract address to be clustered are empty. If not, proceed to step 4; if all are empty, proceed to 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 tags corresponding to the smart contract addresses to be clustered are not all empty, different weights are assigned to the non-empty address tags. By assigning different weights to each of the 12 address tags corresponding to the smart contract addresses and testing the accuracy of the mapping between smart contract addresses and project entities, it is determined that to maximize the accuracy of the mapping between the smart contract addresses to be clustered and the project entities, the weights of the address tags of the smart contract addresses to be clustered must be greater than the weights of the address tags of the sender and receiver addresses, and the weights of the address tags of the creator address must be greater than the weights of the address tags of the sender and receiver addresses, respectively. The weights of the 12 address tags assigned different weights are combined, using the address tags as keys and the weights as values, and stored in a dict or map data structure. Address tags with the same weights are merged. For example, if the public tag name is not empty, the weights corresponding to the public tag names of the four addresses are summed to obtain the weight of the public tag name. This results in a dictionary without duplicate address tags. Finally, the dictionary is sorted in descending order by weight, and the address tag with the highest weight is output. If the weight of the address tag reaches the set weight threshold, the DeFi project mapping result of the smart contract address to be clustered is obtained based on the address tag, 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 order of priority from high to low: 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 used as new smart contract addresses respectively.

[0065] (5.1.2) Collect the public tag name, token name, and entity of the three address tags of 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 tag of the deeper smart contract address 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 tag decreases.

[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 have interacted with the smart contract address 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, then the DeFi project party is determined to be 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, then 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 based on this address label, the DeFi project party mapping result of the smart contract address to be clustered is obtained, thereby completing the clustering of the smart contract address to be clustered. If there is no smart contract address that has interacted 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 using the same deployer clustering method: cluster the smart contract addresses to be clustered whose DeFi project party has not yet been determined by the creator address of the smart contract address that has been clustered; that is, if a smart contract address to be clustered and another smart contract address that has been clustered have the same creator address, then the DeFi project party to which the clustered smart contract address belongs is deemed to be the same DeFi project party to which the smart contract address to be clustered belongs, thereby achieving clustering of the smart contract addresses 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 public blockchain. At this time, 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. The memory stores executable code. 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] The electronic device proposed by the present invention can be applied to any device with data processing capabilities, and the device with data processing capabilities 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, it is formed by the processor of any device with data processing capabilities in which it is located, reading the corresponding computer program instructions in the non-volatile memory into the memory and running them. From the hardware level, if Figure 4 As shown, this is a hardware structure diagram of an electronic device of the present invention, which is any device with data processing capability, 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 embodiment may also include other hardware based on the actual functions of the device with data processing capabilities, 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 be referred to the partial description of the method embodiment. The electronic device embodiment described above is only exemplary, 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 solution of the present invention. Ordinary technicians in this field can understand and implement it without paying any 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 can be an internal storage unit of any device with data processing capabilities in any of the aforementioned embodiments, such as a hard disk or memory. The computer-readable storage medium can also be an external storage device of any device with data processing capabilities, such as a plug-in hard disk, a Smart Media Card (SMC), an SD card, a flash card, etc. equipped on the device. Furthermore, the computer-readable storage medium can include both an internal storage unit and an external storage device of any device with data processing capabilities. The computer-readable storage medium is used to store computer programs and other programs and data required by any device with data processing capabilities, and can also be used to temporarily store data that has been output or is to be output.

[0076] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.

[0077] The foregoing description is merely a preferred embodiment of the present invention, which is provided to enable those skilled in the art to understand and implement the present invention and is not intended to limit the present invention. Various modifications and variations of the present invention are readily apparent to those skilled in the art, and modifications to these embodiments will be readily apparent 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, and the like made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.

Claims

1. A clustering method for smart contract addresses of DeFi projects, characterized by: The following steps are involved: S1: Collect the smart contract address data currently deployed on the blockchain public chain based on public information sources to form an address dataset, and obtain the blockchain public chain corresponding to the smart contract address to be clustered from the address dataset; S2: Obtain the transaction that created the smart contract address to be clustered based on the public blockchain, parse the transaction, and obtain the three-party addresses corresponding to the smart contract address to be clustered, where the three-party addresses are: sender address, receiver address, and creator address; obtain multiple address tags directly related to the smart contract address to be clustered and the three-party addresses through a blockchain browser; clean the address tags, and only retain the content related to the DeFi project party information as the new address tags; S3: Determine whether the cleaned address labels obtained in S2 are all empty. If not, execute S4; if so, execute S5; S4. Project party attribution clustering: assign different weights to non-empty address tags, and the address tag weight of the contract address to be clustered is greater than the address tag weights of the sender address and the receiver address, and the address tag weight of the creator address is greater than the address tag weights of the sender address and the receiver address; merge the same address tags and add up the 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 using three methods, which are ranked in descending order of priority: recursive clustering, fund interaction relationship clustering, and same deployer clustering. Based on the address label obtained by the method with the highest priority among the clustering methods, the DeFi project party mapping result of the contract address is obtained. The recursive clustering is specifically implemented through the following sub-steps: (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; (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, proceed to step (4); if so, end the recursion and proceed to 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 tag 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 tag; otherwise, it is considered that clustering cannot be achieved using recursive clustering.

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

3. The clustering method for DeFi project smart contract addresses according to claim 1, characterized in that: In S2, the address label is cleaned by intercepting or concatenating character strings.

4. The clustering method for DeFi project smart contract addresses according to claim 1, characterized in that: Clustering is performed using the aforementioned fund interaction relationship clustering method. Specifically, the following operations are performed: 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, collect all smart contract addresses to form a smart contract address list; build a tag list based on the smart contract address list and the address tag corresponding to each smart contract address; If all the address tags in the tag 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 tag corresponding to the smart contract address that interacted with the smart contract address to be clustered the earliest.

5. The clustering method for DeFi project smart contract addresses according to claim 1, 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, thereby achieving clustering of the smart contract addresses to be clustered.

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

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

8. The clustering method for 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: The method comprises a memory and one or more processors, wherein the memory stores executable code, and when the one or more processors execute the executable code, the method is used to implement the clustering method of the DeFi project party smart contract address according to any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the clustering method for the DeFi project party smart contract address according to any one of claims 1 to 8.

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