Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Network of smart contracts #11

Open
Mokita-J opened this issue Sep 9, 2024 · 3 comments
Open

Network of smart contracts #11

Mokita-J opened this issue Sep 9, 2024 · 3 comments

Comments

@Mokita-J
Copy link
Contributor

Mokita-J commented Sep 9, 2024

On the Ethereum blockchain structure: A complex networks theory perspective 2019 Journal Concurrency and Computation: Practice and Experience
Network of Ethereum Accounts (nodes) and its interactions (edges).
The interactions considered are the transactions persisted on the blockchain (internal transactions were not considered).
Tool: EtherNet Galaxy

@Mokita-J
Copy link
Contributor Author

Mokita-J commented Sep 9, 2024

DApps Ecosystems: Mapping the Network Structure of Smart Contract Interactions 2024 arxiv paper
Network of Smart contracts (nodes) and their function calls (edges).
Function calls are detected through static analysis on the source code of dApps.
Dataset: 66 dApps written in Solidity.
Tool used: MindTheDapp

  • What is different from our idea
    • They analyze the relationship of functions within protocol, our view is the whole ethereum system
    • They analyze the source code functions, while we plan to look into runtime
  • What is useful for us
    • the graph theory is interesting
    • the way the present the node&edge might be helpful for us
  • summary
    • This work analyze 66 DApps(51 Ethereum-based, and 15 dApps on other blockchains),
  • Method
    • Tool: use MindTheDApp to break down smart contracts to sub-components, the tool use ANTLR4 to traverse AST
    • Category: Categorize size of DApp by source contracts(Small: 3-23 contracts; Medium:24-45; Large: 46-193)[method by https://dl.acm.org/doi/10.1145/3628354.3629533]
    • Contract Network: build the network’s adjacency matrix(Source contract & Target Contracts)
      • result: A total of 54 networks have a minimum of 40% of nodes with self-loops, and 33 networks (more than half of the dataset) have at least 60% of their nodes connected solely through self-loop. Use Louvain modularity analysis -> an average modularity coefficient of 0.8. -> high level inpendence and minimal inter-contract dependencies
    • Function Network:
      • 1.build the bi-adjacency matrix(Source Function&Target Contracts) -> obtain a weighted bipartite graph
        1. use probabilistic spreading approach(method by https://journals.aps.org/pre/abstract/10.1103/PhysRevE.76.046115) -> obtain for each dApp a weighted directed monopartite network of functions interactions
        • result: the spring layout; present by highest betweenness and highest clustering coefficient -> there is always a largest component for the main functionality and a series of minor ones.
    • assess the statistical significance:
    • Characteristics of networks of functions in dApps
      • Nodes with higher clustering coefficient tend to have lower betweenness centrality.
      • networks inherently consist of highly interconnected communities within each component, with only few nodes serving as bridges between them
      • DApps exhibit high clustering coefficients and low average path lengths, similar to the ones of random networks with same number of nodes and links.
      • the prevalence of large maximal cliques, meaning that the information on a function is just one step away from another, so the information diffusion process is immediate
    • Network Resilience
      • (only consider networks with more than 50 nodes in the largest component)
      • in the majority of cases (20 dApps out of 29), component becomes disconnected after the removal of just 2% of the nodes
      • an attack on a small percentage of those functions characterised by the highest betweenness centrality has the potential to disrupt the dApp’s functionality.

Results:

Thanks @Mokita-J @Stamp9

@Mokita-J
Copy link
Contributor Author

Mokita-J commented Sep 11, 2024

Bubblemaps
First supply audit for Tokens and NFTs.
It shows a network per token. This network consists of token owners (nodes) and ownership transfers (edges).
By visualizing and analyzing each token network, Bubblemaps argues that it's possible to detect market manipulation techniques such as wash trading.

The target of this supply transparency tool is crypto investors.

interview
https://www.youtube.com/watch?v=Z_52VunVQnk

Speak
https://ethcc.io/archive/Is-Privacy-Gone-What-Blockchain-Data-Reveals

NFT wash trading literature

@Stamp9
Copy link
Contributor

Stamp9 commented Sep 20, 2024

Transaction graph based key node identification for blockchain regulation
https://link.springer.com/article/10.1007/s12083-024-01783-y

summary

  • This work proposed a multi-stage key node detection algorithm that made large improvement in algorithm execution time.
  • Data(https://xblock.pro/defi_nft.html) from block number 46147 to block number 780334 on the Ethereum are used and the algothrigm performed better in all metrics(Computation Time, Closeness Centrality, Eigenvector Centrality, Degree Centrality and Betweenness Centrality)

Method:

1. Node screening pre‑detection

Hierarchical culling
the k-shell graph decomposition algorithm for hierarchical operations, obtaining nodes distributed across different k-shell layers

Filtering operation
For each layer of nodes commences with an information entropy calculation coupled with an evaluation of their clustering coefficient

Pre-detection
By systematically identifying and scanning the remaining nodes, calculating the similarity between nodes, and evaluating the structural importance of each node concerning its neighbors, discern a set of core nodes.

2. Local Community Expansion

Latent Factor Model (LFM) for community expansion.

3. Node Importance Ranking
LeaderRank algorithm is employed for importance ranking

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants